alexeyr / erlang-sqlite3

Sqlite gen_server port for Erlang. Creates, reads and writes to sqlite database.
Other
90 stars 33 forks source link

enable_load_extension test fails #30

Closed bborowin closed 10 years ago

bborowin commented 10 years ago

Running sqlite3 version 3.7.9, and erl R14B04. After make to compile as per doc, make test fails with the following error message:

  sqlite3_test: all_test_ (enable_load_extension)...*failed*
::error:{assertEqual_failed,
          [{module,sqlite3_test},
           {line,340},
           {expression,"sqlite3 : enable_load_extension ( ct , 1 )"},
           {expected,ok},
           {value,
               {error,21,
                   "extension loading not enabled, recompile erlang-sqlite3 with ERLANG_SQLITE3_LOAD_EXTENSION defined"}}]}
  in function sqlite3_test:'-enable_load_extension/0-fun-0-'/1

The solution is to uncomment c_src/sqlite3_drv.h:7 - IMO all tests should pass in default install, is there a good reason the line is commented out?

alexeyr commented 10 years ago

I was thinking about possibility of SQlite being compiled with SQLITE_OMIT_LOAD_EXTENSION but you are right: it should be enabled by default and disabled if necessary.