[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#505210: marked as done (ocaml-sqlite3: New function : caml_sqlite3_enable_load_extension)



Your message dated Sat, 11 Apr 2009 23:38:38 +0200
with message-id <49E10DDE.7080906@glondu.net>
and subject line Closing bug fixed by new upstream release
has caused the Debian Bug report #505210,
regarding ocaml-sqlite3: New function : caml_sqlite3_enable_load_extension
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
505210: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=505210
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: ocaml-sqlite3
Severity: normal
Tags: patch


This simple patch allows to enable/disable the load_extension
functionality in sqlite3. 

:)
p


-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.18-6-xen-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_GB, LC_CTYPE=en_GB (charmap=ANSI_X3.4-1968) (ignored: LC_ALL set to C)
Shell: /bin/sh linked to /bin/bash
diff -r -u ocaml-sqlite3-1.2.0/sqlite3.ml ocaml-sqlite3-1.2.1/sqlite3.ml
--- ocaml-sqlite3-1.2.0/sqlite3.ml      2008-05-12 04:40:40.000000000 +0200
+++ ocaml-sqlite3-1.2.1/sqlite3.ml      2008-11-10 16:39:21.000000000 +0100
@@ -135,6 +135,7 @@

 external db_open : string -> db = "caml_sqlite3_open"
 external db_close : db -> bool = "caml_sqlite3_close"
+external load_extension : db -> bool -> bool = "caml_sqlite3_enable_load_extension"

 external errcode : db -> Rc.t = "caml_sqlite3_errcode"
 external errmsg : db -> string = "caml_sqlite3_errmsg"
diff -r -u ocaml-sqlite3-1.2.0/sqlite3.mli ocaml-sqlite3-1.2.1/sqlite3.mli
--- ocaml-sqlite3-1.2.0/sqlite3.mli     2008-05-12 04:40:40.000000000 +0200
+++ ocaml-sqlite3-1.2.1/sqlite3.mli     2008-11-10 16:39:31.000000000 +0100
@@ -168,6 +168,12 @@
     @raise SqliteError if an invalid database handle is passed.
 *)

+external load_extension : db -> bool -> bool = "caml_sqlite3_enable_load_extension"
+(** [db_load_extension db onoff] enable/disable the sqlite3 load extension.
+    @return [false] if the operation fails, [true] otherwise.
+    @param onoff enable / disable the extension.
+*)
+
 external errcode : db -> Rc.t = "caml_sqlite3_errcode"
 (** [errcode db] @return the error code of the last operation on database
     [db].
diff -r -u ocaml-sqlite3-1.2.0/sqlite3_stubs.c ocaml-sqlite3-1.2.1/sqlite3_stubs.c
--- ocaml-sqlite3-1.2.0/sqlite3_stubs.c 2008-05-12 04:40:40.000000000 +0200
+++ ocaml-sqlite3-1.2.1/sqlite3_stubs.c 2008-11-10 17:04:44.000000000 +0100
@@ -344,6 +344,13 @@
   return Val_bool(not_busy);
 }

+CAMLprim value caml_sqlite3_enable_load_extension(value v_db, value v_onoff)
+{
+       int ret;
+       db_wrap *dbw = Sqlite3_val(v_db);
+       ret = sqlite3_enable_load_extension(dbw->db, Bool_val(v_onoff));
+       return Val_bool(ret);
+}

 /* Informational functions */



--- End Message ---
--- Begin Message ---
tags 505210 + fixed-upstream
fixed 505210 1.4.0-1
thanks

The patch has been submitted upstream, and accepted.

-- 
Stéphane



--- End Message ---

Reply to: