@@ -41,7 +41,7 @@ use crate::{
4141 json:: json_arrow_extract, json:: json_arrow_shift_extract, json:: json_error_position,
4242 json:: json_extract, json:: json_type,
4343} ;
44- use crate :: { Connection , Result , Rows , TransactionState , DATABASE_VERSION } ;
44+ use crate :: { resolve_ext_path , Connection , Result , Rows , TransactionState , DATABASE_VERSION } ;
4545use datetime:: { exec_date, exec_datetime_full, exec_julianday, exec_time, exec_unixepoch} ;
4646use insn:: {
4747 exec_add, exec_bit_and, exec_bit_not, exec_bit_or, exec_divide, exec_multiply, exec_remainder,
@@ -1863,6 +1863,14 @@ impl Program {
18631863 let replacement = & state. registers [ * start_reg + 2 ] ;
18641864 state. registers [ * dest] = exec_replace ( source, pattern, replacement) ;
18651865 }
1866+ #[ cfg( not( target_family = "wasm" ) ) ]
1867+ ScalarFunc :: LoadExtension => {
1868+ let extension = & state. registers [ * start_reg] ;
1869+ let ext = resolve_ext_path ( & extension. to_string ( ) ) ?;
1870+ if let Some ( conn) = self . connection . upgrade ( ) {
1871+ conn. load_extension ( ext) ?;
1872+ }
1873+ }
18661874 } ,
18671875 crate :: function:: Func :: External ( f) => {
18681876 call_external_function ! { f. func, * dest, state, arg_count, * start_reg } ;
0 commit comments