nette/database

Test failure with old sqlite version

Closed this issue · 4 comments

  • bug report? yes
  • feature request? no
  • version: 2.4.4

Running test suite on RHEL/CentOS 7 and with libsqlite 3.7.17

-- FAILED: /builddir/build/BUILD/database-9b16e3ea2d9c21579962a17d81e17e4f71f59d6b/tests/Database/ResultSet.exceptions.sqlite.phpt dataprovider=sqlite|/builddir/build/BUILD/database-9b16e3ea2d9c21579962a17d81e17e4f71f59d6b/tests/Database/databases.ini
   Failed: Nette\Database\NotNullConstraintViolationException was expected but got Nette\Database\ConstraintViolationException (SQLSTATE[23000]: Integrity constraint violation: 19 author.name may not be NULL)
   
   in tests/Database/ResultSet.exceptions.sqlite.phpt(33) Tester\Assert::exception()
   
   (previous) Nette\Database\ConstraintViolationException: SQLSTATE[23000]: Integrity constraint violation: 19 author.name may not be NULL
   
   in Nette/Database/DriverException.php(25) 
   in Database/Drivers/SqliteDriver.php(58) Nette\Database\DriverException::from()
   in Nette/Database/ResultSet.php(75) Nette\Database\Drivers\SqliteDriver->convertException()
   in Nette/Database/Connection.php(180) Nette\Database\ResultSet->__construct()
   in tests/Database/ResultSet.exceptions.sqlite.phpt(32) Nette\Database\Connection->query()
   in [internal function]{closure}()
   in Tester/Framework/Assert.php(293) call_user_func()
   in tests/Database/ResultSet.exceptions.sqlite.phpt(33) Tester\Assert::exception()
   
   (previous) PDOException: SQLSTATE[23000]: Integrity constraint violation: 19 author.name may not be NULL
   
   in Nette/Database/ResultSet.php(72) 
   in Nette/Database/ResultSet.php(72) PDOStatement->execute()
   in Nette/Database/Connection.php(180) Nette\Database\ResultSet->__construct()
   in tests/Database/ResultSet.exceptions.sqlite.phpt(32) Nette\Database\Connection->query()
   in [internal function]{closure}()
   in Tester/Framework/Assert.php(293) call_user_func()
   in tests/Database/ResultSet.exceptions.sqlite.phpt(33) Tester\Assert::exception()

Test suite passes with more recent version (tested with 3.11 and up)

Strangely... passes with 3.6.20 on RHEL / CentOS 6

dg commented

PHP version 5.6 (the oldiest supported) is compiled with SQLite Library 3.8.4.3, so support for 3.7.17 is probably no need to deal with it.

(I am using windows binaries)

Linux distributions never use bundled libraries (per packaging Guidelines), but use shared system libraries instead.

dg commented

I do not know what I can do with it. Perhaps note it in the documentation.