[Bug 822459] Re: Python 2.6/SQLite: blank SQL gives sqlite3.ProgrammingError

Philip Semanchuk 822459 at bugs.launchpad.net
Sun Aug 7 22:53:00 UTC 2011


** Description changed:

  When I feed a blank SQL statement to sqlite via Python 2.6 via the executescript() call, I get the following:
-    sqlite3.ProgrammingError: you did not provide a complete SQL statement
+    sqlite3.ProgrammingError: you did not provide a complete SQL statement
  
  One can argue that rejecting a blank SQL statement is correct behavior,
  but that behavior appears to be specific only to Python 2.6 (not 2.5 or
  2.7) on Ubuntu (not any other OS).
  
  This one line bash command tests the problem:
  python -c 'import sqlite3; print sqlite3.sqlite_version_info; c=sqlite3.Connection(":memory:"); c.executescript("")'
  
  If successful it just prints out something like "(3, 7, 4)" which is the
  the SQLite version.
  
  The following combinations of operating system/SQLite version/Python version all accept the test command with no complaint:
+ {{{
  Ubuntu 8.04              sqlite 3.4.2,    Python 2.5.2
  Ubuntu 10.10             sqlite 3.7.2,    Python 2.7.0+
  Ubuntu 11.04             sqlite 3.7.4,    Python 2.7.1+
  WinXP                    sqlite 3.3.4,    Python 2.5.4
  WinXP                    sqlite 3.5.9,    Python 2.6.5
  OS X 10.6                sqlite 3.6.11,   Python 2.6.6
  OpenSUSE 11.2 64 bit     sqlite 3.6.16,   Python 2.6.2
  Ubuntu 09.10             sqlite 3.6.16,   Python 2.6.4
  RHEL6 Beta               sqlite 3.6.19,   Python 2.6.6 (EPD)
  Scientific Linux 6.0     sqlite 3.6.20,   Python 2.6.6
  WinXP                    sqlite 3.6.21,   Python 2.7.1
  Fedora 14                sqlite 3.6.23.1, Python 2.7
  Fedora 15                sqlite 3.7.5,    Python 2.7.1
+ }}}
  
  The following combinations raise the sqlite3.ProgrammingError:
+ {{{
  Ubuntu 10.04             sqlite 3.6.22,   Python 2.6.5
  Ubuntu 10.10             sqlite 3.7.2,    Python 2.6.6
  Ubuntu 11.04             sqlite 3.7.4,    Python 2.6.6
+ }}}
  
  Any easy workaround is to just add a semicolon, i.e. this:
-    c.executescript(";")
+    c.executescript(";")
  instead of this:
-    c.executescript("")
+    c.executescript("")
  
  ProblemType: Bug
  DistroRelease: Ubuntu 11.04
  Package: python2.6 2.6.6-6ubuntu7
  ProcVersionSignature: Ubuntu 2.6.38-10.46-generic 2.6.38.7
  Uname: Linux 2.6.38-10-generic i686
  Architecture: i386
  Date: Sun Aug  7 18:21:50 2011
  InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Release i386 (20110427.1)
  ProcEnviron:
-  LANGUAGE=en_US:en
-  LANG=en_US.UTF-8
-  SHELL=/bin/bash
+  LANGUAGE=en_US:en
+  LANG=en_US.UTF-8
+  SHELL=/bin/bash
  SourcePackage: python2.6
  UpgradeStatus: No upgrade log present (probably fresh install)

** Description changed:

  When I feed a blank SQL statement to sqlite via Python 2.6 via the executescript() call, I get the following:
     sqlite3.ProgrammingError: you did not provide a complete SQL statement
  
  One can argue that rejecting a blank SQL statement is correct behavior,
  but that behavior appears to be specific only to Python 2.6 (not 2.5 or
  2.7) on Ubuntu (not any other OS).
  
  This one line bash command tests the problem:
  python -c 'import sqlite3; print sqlite3.sqlite_version_info; c=sqlite3.Connection(":memory:"); c.executescript("")'
  
  If successful it just prints out something like "(3, 7, 4)" which is the
  the SQLite version.
  
  The following combinations of operating system/SQLite version/Python version all accept the test command with no complaint:
- {{{
+ `
  Ubuntu 8.04              sqlite 3.4.2,    Python 2.5.2
  Ubuntu 10.10             sqlite 3.7.2,    Python 2.7.0+
  Ubuntu 11.04             sqlite 3.7.4,    Python 2.7.1+
  WinXP                    sqlite 3.3.4,    Python 2.5.4
  WinXP                    sqlite 3.5.9,    Python 2.6.5
  OS X 10.6                sqlite 3.6.11,   Python 2.6.6
  OpenSUSE 11.2 64 bit     sqlite 3.6.16,   Python 2.6.2
  Ubuntu 09.10             sqlite 3.6.16,   Python 2.6.4
  RHEL6 Beta               sqlite 3.6.19,   Python 2.6.6 (EPD)
  Scientific Linux 6.0     sqlite 3.6.20,   Python 2.6.6
  WinXP                    sqlite 3.6.21,   Python 2.7.1
  Fedora 14                sqlite 3.6.23.1, Python 2.7
  Fedora 15                sqlite 3.7.5,    Python 2.7.1
- }}}
+ `
  
  The following combinations raise the sqlite3.ProgrammingError:
- {{{
+ `
  Ubuntu 10.04             sqlite 3.6.22,   Python 2.6.5
  Ubuntu 10.10             sqlite 3.7.2,    Python 2.6.6
  Ubuntu 11.04             sqlite 3.7.4,    Python 2.6.6
- }}}
+ `
  
  Any easy workaround is to just add a semicolon, i.e. this:
     c.executescript(";")
  instead of this:
     c.executescript("")
  
  ProblemType: Bug
  DistroRelease: Ubuntu 11.04
  Package: python2.6 2.6.6-6ubuntu7
  ProcVersionSignature: Ubuntu 2.6.38-10.46-generic 2.6.38.7
  Uname: Linux 2.6.38-10-generic i686
  Architecture: i386
  Date: Sun Aug  7 18:21:50 2011
  InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Release i386 (20110427.1)
  ProcEnviron:
   LANGUAGE=en_US:en
   LANG=en_US.UTF-8
   SHELL=/bin/bash
  SourcePackage: python2.6
  UpgradeStatus: No upgrade log present (probably fresh install)

** Description changed:

  When I feed a blank SQL statement to sqlite via Python 2.6 via the executescript() call, I get the following:
     sqlite3.ProgrammingError: you did not provide a complete SQL statement
  
  One can argue that rejecting a blank SQL statement is correct behavior,
  but that behavior appears to be specific only to Python 2.6 (not 2.5 or
  2.7) on Ubuntu (not any other OS).
  
  This one line bash command tests the problem:
  python -c 'import sqlite3; print sqlite3.sqlite_version_info; c=sqlite3.Connection(":memory:"); c.executescript("")'
  
  If successful it just prints out something like "(3, 7, 4)" which is the
  the SQLite version.
  
  The following combinations of operating system/SQLite version/Python version all accept the test command with no complaint:
- `
  Ubuntu 8.04              sqlite 3.4.2,    Python 2.5.2
  Ubuntu 10.10             sqlite 3.7.2,    Python 2.7.0+
  Ubuntu 11.04             sqlite 3.7.4,    Python 2.7.1+
  WinXP                    sqlite 3.3.4,    Python 2.5.4
  WinXP                    sqlite 3.5.9,    Python 2.6.5
  OS X 10.6                sqlite 3.6.11,   Python 2.6.6
  OpenSUSE 11.2 64 bit     sqlite 3.6.16,   Python 2.6.2
  Ubuntu 09.10             sqlite 3.6.16,   Python 2.6.4
  RHEL6 Beta               sqlite 3.6.19,   Python 2.6.6 (EPD)
  Scientific Linux 6.0     sqlite 3.6.20,   Python 2.6.6
  WinXP                    sqlite 3.6.21,   Python 2.7.1
  Fedora 14                sqlite 3.6.23.1, Python 2.7
  Fedora 15                sqlite 3.7.5,    Python 2.7.1
- `
  
  The following combinations raise the sqlite3.ProgrammingError:
- `
  Ubuntu 10.04             sqlite 3.6.22,   Python 2.6.5
  Ubuntu 10.10             sqlite 3.7.2,    Python 2.6.6
  Ubuntu 11.04             sqlite 3.7.4,    Python 2.6.6
- `
  
  Any easy workaround is to just add a semicolon, i.e. this:
     c.executescript(";")
  instead of this:
     c.executescript("")
  
  ProblemType: Bug
  DistroRelease: Ubuntu 11.04
  Package: python2.6 2.6.6-6ubuntu7
  ProcVersionSignature: Ubuntu 2.6.38-10.46-generic 2.6.38.7
  Uname: Linux 2.6.38-10-generic i686
  Architecture: i386
  Date: Sun Aug  7 18:21:50 2011
  InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Release i386 (20110427.1)
  ProcEnviron:
   LANGUAGE=en_US:en
   LANG=en_US.UTF-8
   SHELL=/bin/bash
  SourcePackage: python2.6
  UpgradeStatus: No upgrade log present (probably fresh install)

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to python2.6 in Ubuntu.
https://bugs.launchpad.net/bugs/822459

Title:
  Python 2.6/SQLite: blank SQL gives sqlite3.ProgrammingError

Status in “python2.6” package in Ubuntu:
  New

Bug description:
  When I feed a blank SQL statement to sqlite via Python 2.6 via the executescript() call, I get the following:
     sqlite3.ProgrammingError: you did not provide a complete SQL statement

  One can argue that rejecting a blank SQL statement is correct
  behavior, but that behavior appears to be specific only to Python 2.6
  (not 2.5 or 2.7) on Ubuntu (not any other OS).

  This one line bash command tests the problem:
  python -c 'import sqlite3; print sqlite3.sqlite_version_info; c=sqlite3.Connection(":memory:"); c.executescript("")'

  If successful it just prints out something like "(3, 7, 4)" which is
  the the SQLite version.

  The following combinations of operating system/SQLite version/Python version all accept the test command with no complaint:
  Ubuntu 8.04              sqlite 3.4.2,    Python 2.5.2
  Ubuntu 10.10             sqlite 3.7.2,    Python 2.7.0+
  Ubuntu 11.04             sqlite 3.7.4,    Python 2.7.1+
  WinXP                    sqlite 3.3.4,    Python 2.5.4
  WinXP                    sqlite 3.5.9,    Python 2.6.5
  OS X 10.6                sqlite 3.6.11,   Python 2.6.6
  OpenSUSE 11.2 64 bit     sqlite 3.6.16,   Python 2.6.2
  Ubuntu 09.10             sqlite 3.6.16,   Python 2.6.4
  RHEL6 Beta               sqlite 3.6.19,   Python 2.6.6 (EPD)
  Scientific Linux 6.0     sqlite 3.6.20,   Python 2.6.6
  WinXP                    sqlite 3.6.21,   Python 2.7.1
  Fedora 14                sqlite 3.6.23.1, Python 2.7
  Fedora 15                sqlite 3.7.5,    Python 2.7.1

  The following combinations raise the sqlite3.ProgrammingError:
  Ubuntu 10.04             sqlite 3.6.22,   Python 2.6.5
  Ubuntu 10.10             sqlite 3.7.2,    Python 2.6.6
  Ubuntu 11.04             sqlite 3.7.4,    Python 2.6.6

  Any easy workaround is to just add a semicolon, i.e. this:
     c.executescript(";")
  instead of this:
     c.executescript("")

  ProblemType: Bug
  DistroRelease: Ubuntu 11.04
  Package: python2.6 2.6.6-6ubuntu7
  ProcVersionSignature: Ubuntu 2.6.38-10.46-generic 2.6.38.7
  Uname: Linux 2.6.38-10-generic i686
  Architecture: i386
  Date: Sun Aug  7 18:21:50 2011
  InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Release i386 (20110427.1)
  ProcEnviron:
   LANGUAGE=en_US:en
   LANG=en_US.UTF-8
   SHELL=/bin/bash
  SourcePackage: python2.6
  UpgradeStatus: No upgrade log present (probably fresh install)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/python2.6/+bug/822459/+subscriptions




More information about the foundations-bugs mailing list