File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -239,9 +239,13 @@ fn make_sqlite_fun(name: &str, f: fn(&str) -> String) -> Function {
239239 } )
240240}
241241
242- fn set_custom_connect_options_odbc ( odbc_options : & mut OdbcConnectOptions , _config : & AppConfig ) {
242+ fn set_custom_connect_options_odbc ( odbc_options : & mut OdbcConnectOptions , config : & AppConfig ) {
243243 // Allow fetching very large text fields when using ODBC by removing the max column size limit
244- * odbc_options = std:: mem:: take ( odbc_options) . max_column_size ( None ) ;
244+ let batch_size = config. max_pending_rows . clamp ( 1 , 1024 ) ;
245+ odbc_options. batch_size ( batch_size) ;
246+ log:: trace!( "ODBC batch size set to {batch_size}" ) ;
247+ // Disables ODBC batching, but avoids truncation of large text fields
248+ odbc_options. max_column_size ( None ) ;
245249}
246250
247251fn set_database_password ( options : & mut AnyConnectOptions , password : & str ) {
You can’t perform that action at this time.
0 commit comments