[sqlite] sqlite bug report
Summary Alter table rename to fails if the database contains a view which selects from a nonexistent table. Seen on sqlite 3.27.2. Script to reproduce it: create view view_1 as select * from table_1; create table table_2 (col_1 text, col_2 text); alter table table_2 rename to table_3; The problem seems to be a side-effect of the change introduced in version 3.25.0 to ALTER TABLE which made it update references to the renamed table in triggers and views. renameTableFunc walks through the schema looking for views and triggers which reference the renamed table. It overwrites the schema entries unconditionally even if it has not changed them. I don't know why you do this unnecessary work, but I assume there is a reason. However it then calls sqlite3SelectPrep for each entry. This is definitely wrong, since sqlite3SelectPrep apparently tries to populate the view and fails in sqlite3LocateTable at line 106955. Views are a bit like the box containing Schrödinger's cat: you don't know what is inside until you look, so sqlite shouldn't look until the user explicitly asks it do so. You could argue that users shouldn't create a view that selects from a nonexistent table, but sqlite currently allows it (and also allows you to drop the table). Banning such views would break a lot of existing scripts: many of mine modify a table in ways which ALTER TABLE can't do by creating a new table, dropping the original one, and renaming the new table as the old one. This paradigm is already broken by the change in the semantics of ALTER TABLE, but I can reinstate the old behaviour with a PRAGMA. However not allowing views on nonexistent tables would break it more thoroughly. Richard Parkins http://www.zen224037.zen.co.uk rparkins999/sqliteman | | | | | | | | | | | rparkins999/sqliteman http://sqliteman.com/. Contribute to rparkins999/sqliteman development by creating an account on GitHub. | | | ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] sqlite bug report
Bug report I downloaded sqlite 3.10.0 released in 2016-1-6, earlier I downloaded sqlite 3.9.2 and earlier version. I found below 2 bugs: bug1: Database directory which contains Simplified Chinese Character not support. bug2: Simplified Chinese Character in database table display error. bug1: Database directory which contains Simplified Chinese Character not support OS: Simplified Chinese Windows XP SP3 + 195 hotfixes sqlite version: 3.10.0 and earlier version bug description: in sqlite3.exe command line, if database directory contains Simplified Chinese Character, Simplified Chinese Character will not function. like this: suppose directory c:\test\?? exists, employee.db does not exist. // "??" is Simplified Chinese Charater. in sqlite 3.9.2 and earlier version, run below command: C:\>sqlite3.exe c:\test\??\employee.db "create table employee(name, age);" Error: unable to open database "c:\test\??\employee.db": unable to open database file in sqlite 3.10.0, run below same command: C:\>sqlite3.exe c:\test\??\employee.db "create table employee(name, age);" Error: unable to open database "c:\test\?\employee.db": unable to open database file // extra bug: "??" displayed as "?" in sqlite 3.10.0 if delete "??" in directory c:\test\??, run below command success in sqlite 3.10.0, 3.9.2 and earlier version: C:\>sqlite3.exe c:\test\employee.db "create table employee(name, age);" C:\>dir c:\test 2016-01-08 09:54 2,048 employee.db bug2: Simplified Chinese Character in database table display error. OS: Simplified Chinese Windows XP SP3 + 195 hotfixes sqlite version: 3.10.0 bug description: in sqlite 3.9.2, run below command C:\>sqlite3.exe test.db -cmd ".header on" "select * from employee" name|age ??|37 // Simplified Chinese Character displayed normal. ??|29 // Simplified Chinese Character displayed normal. Tom|8 Jerry|7 but for same database test.db, in sqlite 3.10.0, run below command C:\>sqlite3.exe test.db -cmd ".header on" "select * from employee" name|age |37 // bug: Simplified Chinese Character disappear. |29 // bug: Simplified Chinese Character disappear. Tom|8 Jerry|7 bug2 caused by sqlite 3.10.0 new enhancements to the command-line shell: Translate between MBCS and UTF8 when running in cmd.exe on Windows. In Simplified Chinese Windows XP, all Chinese Characters input in cmd.exe must be MBCS, not one of UTF-8, UTF16LE, UTF16BE. So I hope to delete codes that converts MBCS to UTF-8 and vice versa in shell.c when display field value. Maybe another better solution is to add new command line switch(ex: /mbcs) to next version of sqlite3.exe 3.10.0.
Re: [sqlite] sqlite bug report
On Thu, Nov 13, 2014 at 4:41 PM, Hinrichsen, John wrote: > In this example, bad data is returned. There is no assert. valgrind does > not complain either. > It asserts if you recompile with -DSQLITE_DEBUG > > Is there an ETA on when 3.8.7.2 will be released? > Next week sometime. Why not just pull the latest code from the source tree? > > > On Thu, Nov 13, 2014 at 1:12 PM, Richard Hipp wrote: > > > This is https://www.sqlite.org/src/info/094d39a4c95ee4 which has been > > fixed > > in trunk and will be fixed in 3.8.7.2. > > > > On Thu, Nov 13, 2014 at 1:05 PM, Hinrichsen, John > > wrote: > > > > > The following SQL produces an incorrect result with sqlite-3.8.7.1: > > > > > > CREATE TABLE A( > > > symbol TEXT, > > > type TEXT > > > ); > > > INSERT INTO A VALUES('ABCDEFG','chars'); > > > INSERT INTO A VALUES('1234567890','num'); > > > CREATE TABLE B( > > > chars TEXT, > > > num TEXT > > > ); > > > > > > CREATE TABLE IF NOT EXISTS C AS > > > SELECT A.symbol AS symbol,A.type, > > > CASE A.type > > > WHEN 'chars' THEN A.symbol > > > WHEN 'num' THEN B.chars > > > ELSE NULL > > > END AS chars > > > FROM A LEFT OUTER JOIN B ON A.type='num' AND B.num=A.symbol; > > > > > > SELECT * FROM C; > > > > > > with 3.8.7.1: > > > > > > sqlite> SELECT * FROM C; > > > ABCDEFG|chars|ABCDEFG > > > 1234567890|num|1234567 > > > > > > with 3.8.6: > > > > > > sqlite> SELECT * FROM C; > > > ABCDEFG|chars|ABCDEFG > > > 1234567890|num| > > > > > > -- > > > > > > This message contains confidential information and is intended only for > > the > > > individual named. If you are not the named addressee, you should not > > > disseminate, distribute, alter or copy this e-mail. Please notify the > > > sender immediately by e-mail if you have received this e-mail by > mistake > > > and delete this e-mail from your system. E-mail transmissions cannot be > > > guaranteed to be secure or without error as information could be > > > intercepted, corrupted, lost, destroyed, or arrive late or incomplete. > > The > > > sender, therefore, does not accept liability for any errors or > omissions > > in > > > the contents of this message which arise during or as a result of > e-mail > > > transmission. If verification is required, please request a hard-copy > > > version. This message is provided for information purposes and should > not > > > be construed as a solicitation or offer to buy or sell any securities > or > > > related financial instruments in any jurisdiction. > > > ___ > > > sqlite-users mailing list > > > sqlite-users@sqlite.org > > > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > > > > > > > > > > > -- > > D. Richard Hipp > > d...@sqlite.org > > ___ > > sqlite-users mailing list > > sqlite-users@sqlite.org > > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > > > > -- > > This message contains confidential information and is intended only for the > individual named. If you are not the named addressee, you should not > disseminate, distribute, alter or copy this e-mail. Please notify the > sender immediately by e-mail if you have received this e-mail by mistake > and delete this e-mail from your system. E-mail transmissions cannot be > guaranteed to be secure or without error as information could be > intercepted, corrupted, lost, destroyed, or arrive late or incomplete. The > sender, therefore, does not accept liability for any errors or omissions in > the contents of this message which arise during or as a result of e-mail > transmission. If verification is required, please request a hard-copy > version. This message is provided for information purposes and should not > be construed as a solicitation or offer to buy or sell any securities or > related financial instruments in any jurisdiction. > ___ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > -- D. Richard Hipp d...@sqlite.org ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] sqlite bug report
In this example, bad data is returned. There is no assert. valgrind does not complain either. Is there an ETA on when 3.8.7.2 will be released? On Thu, Nov 13, 2014 at 1:12 PM, Richard Hipp wrote: > This is https://www.sqlite.org/src/info/094d39a4c95ee4 which has been > fixed > in trunk and will be fixed in 3.8.7.2. > > On Thu, Nov 13, 2014 at 1:05 PM, Hinrichsen, John > wrote: > > > The following SQL produces an incorrect result with sqlite-3.8.7.1: > > > > CREATE TABLE A( > > symbol TEXT, > > type TEXT > > ); > > INSERT INTO A VALUES('ABCDEFG','chars'); > > INSERT INTO A VALUES('1234567890','num'); > > CREATE TABLE B( > > chars TEXT, > > num TEXT > > ); > > > > CREATE TABLE IF NOT EXISTS C AS > > SELECT A.symbol AS symbol,A.type, > > CASE A.type > > WHEN 'chars' THEN A.symbol > > WHEN 'num' THEN B.chars > > ELSE NULL > > END AS chars > > FROM A LEFT OUTER JOIN B ON A.type='num' AND B.num=A.symbol; > > > > SELECT * FROM C; > > > > with 3.8.7.1: > > > > sqlite> SELECT * FROM C; > > ABCDEFG|chars|ABCDEFG > > 1234567890|num|1234567 > > > > with 3.8.6: > > > > sqlite> SELECT * FROM C; > > ABCDEFG|chars|ABCDEFG > > 1234567890|num| > > > > -- > > > > This message contains confidential information and is intended only for > the > > individual named. If you are not the named addressee, you should not > > disseminate, distribute, alter or copy this e-mail. Please notify the > > sender immediately by e-mail if you have received this e-mail by mistake > > and delete this e-mail from your system. E-mail transmissions cannot be > > guaranteed to be secure or without error as information could be > > intercepted, corrupted, lost, destroyed, or arrive late or incomplete. > The > > sender, therefore, does not accept liability for any errors or omissions > in > > the contents of this message which arise during or as a result of e-mail > > transmission. If verification is required, please request a hard-copy > > version. This message is provided for information purposes and should not > > be construed as a solicitation or offer to buy or sell any securities or > > related financial instruments in any jurisdiction. > > ___ > > sqlite-users mailing list > > sqlite-users@sqlite.org > > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > > > > > > -- > D. Richard Hipp > d...@sqlite.org > ___ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > -- This message contains confidential information and is intended only for the individual named. If you are not the named addressee, you should not disseminate, distribute, alter or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmissions cannot be guaranteed to be secure or without error as information could be intercepted, corrupted, lost, destroyed, or arrive late or incomplete. The sender, therefore, does not accept liability for any errors or omissions in the contents of this message which arise during or as a result of e-mail transmission. If verification is required, please request a hard-copy version. This message is provided for information purposes and should not be construed as a solicitation or offer to buy or sell any securities or related financial instruments in any jurisdiction. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] sqlite bug report
This is https://www.sqlite.org/src/info/094d39a4c95ee4 which has been fixed in trunk and will be fixed in 3.8.7.2. On Thu, Nov 13, 2014 at 1:05 PM, Hinrichsen, John wrote: > The following SQL produces an incorrect result with sqlite-3.8.7.1: > > CREATE TABLE A( > symbol TEXT, > type TEXT > ); > INSERT INTO A VALUES('ABCDEFG','chars'); > INSERT INTO A VALUES('1234567890','num'); > CREATE TABLE B( > chars TEXT, > num TEXT > ); > > CREATE TABLE IF NOT EXISTS C AS > SELECT A.symbol AS symbol,A.type, > CASE A.type > WHEN 'chars' THEN A.symbol > WHEN 'num' THEN B.chars > ELSE NULL > END AS chars > FROM A LEFT OUTER JOIN B ON A.type='num' AND B.num=A.symbol; > > SELECT * FROM C; > > with 3.8.7.1: > > sqlite> SELECT * FROM C; > ABCDEFG|chars|ABCDEFG > 1234567890|num|1234567 > > with 3.8.6: > > sqlite> SELECT * FROM C; > ABCDEFG|chars|ABCDEFG > 1234567890|num| > > -- > > This message contains confidential information and is intended only for the > individual named. If you are not the named addressee, you should not > disseminate, distribute, alter or copy this e-mail. Please notify the > sender immediately by e-mail if you have received this e-mail by mistake > and delete this e-mail from your system. E-mail transmissions cannot be > guaranteed to be secure or without error as information could be > intercepted, corrupted, lost, destroyed, or arrive late or incomplete. The > sender, therefore, does not accept liability for any errors or omissions in > the contents of this message which arise during or as a result of e-mail > transmission. If verification is required, please request a hard-copy > version. This message is provided for information purposes and should not > be construed as a solicitation or offer to buy or sell any securities or > related financial instruments in any jurisdiction. > ___ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > -- D. Richard Hipp d...@sqlite.org ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] sqlite bug report
The following SQL produces an incorrect result with sqlite-3.8.7.1: CREATE TABLE A( symbol TEXT, type TEXT ); INSERT INTO A VALUES('ABCDEFG','chars'); INSERT INTO A VALUES('1234567890','num'); CREATE TABLE B( chars TEXT, num TEXT ); CREATE TABLE IF NOT EXISTS C AS SELECT A.symbol AS symbol,A.type, CASE A.type WHEN 'chars' THEN A.symbol WHEN 'num' THEN B.chars ELSE NULL END AS chars FROM A LEFT OUTER JOIN B ON A.type='num' AND B.num=A.symbol; SELECT * FROM C; with 3.8.7.1: sqlite> SELECT * FROM C; ABCDEFG|chars|ABCDEFG 1234567890|num|1234567 with 3.8.6: sqlite> SELECT * FROM C; ABCDEFG|chars|ABCDEFG 1234567890|num| -- This message contains confidential information and is intended only for the individual named. If you are not the named addressee, you should not disseminate, distribute, alter or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmissions cannot be guaranteed to be secure or without error as information could be intercepted, corrupted, lost, destroyed, or arrive late or incomplete. The sender, therefore, does not accept liability for any errors or omissions in the contents of this message which arise during or as a result of e-mail transmission. If verification is required, please request a hard-copy version. This message is provided for information purposes and should not be construed as a solicitation or offer to buy or sell any securities or related financial instruments in any jurisdiction. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] SQLite bug report: type mismatch security issue in sqlite3.c version 3.7.13
On Fri, Jul 25, 2014 at 9:50 AM, Yunjiao Xue wrote: > To whom it may concern, > > We are using SQLite 3.7.13 with an amalgamation version of sqlite3.c. We > discovered a type mismatch security issue with a recent Fortify scan. The > problem is on lines 22407, 51807, 63005, 93150 of sqlite3.c. > Thank you for reporting compiler warnings. All of the warnings above are completely benign and harmless. > > For example, the function strHash() in sqlite3.c is declared to return an > unsigned value on line 22400, but on line 22407 it returns a signed value. > This would cause a type mismatch security issue ( > http://www.hpenterprisesecurity.com/vulncat/en/vulncat/cpp/type_mismatch_signed_to_unsigned.html > ). > Hype and bluster. Please see also: http://www.sqlite.org/mark/testing.html?Static+analysis+has*static+analysis.#staticanalysis http://www.sqlite.org/faq.html#q17 > > We are not sure if the problem still exists in the latest version but most > probably it's still there. It would be much appreciated if you could fix it. > > Thanks, > > Jay Xue > > ___ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > -- D. Richard Hipp d...@sqlite.org ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] SQLite bug report: type mismatch security issue in sqlite3.c version 3.7.13
To whom it may concern, We are using SQLite 3.7.13 with an amalgamation version of sqlite3.c. We discovered a type mismatch security issue with a recent Fortify scan. The problem is on lines 22407, 51807, 63005, 93150 of sqlite3.c. For example, the function strHash() in sqlite3.c is declared to return an unsigned value on line 22400, but on line 22407 it returns a signed value. This would cause a type mismatch security issue (http://www.hpenterprisesecurity.com/vulncat/en/vulncat/cpp/type_mismatch_signed_to_unsigned.html). We are not sure if the problem still exists in the latest version but most probably it's still there. It would be much appreciated if you could fix it. Thanks, Jay Xue ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Sqlite Bug Report!
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 > When I compile sqlite3 in VC++6.0, it does not work, but in VS2010 it > can work. http://www.beiww.com/doc/oss/smart-questions.html Roger -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAk9Q/kIACgkQmOOfHg372QTAsQCgz126gE6l6fJPFolDA7CROFhi EhQAnidLD7eg4Zgh9Iyfo9iFJnKGJY4W =IICY -END PGP SIGNATURE- ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] Sqlite Bug Report!
Hello. (I am Chinese, not good at English. ^_^) When I compile sqlite3 in VC++6.0, it does not work, but in VS2010 it can work. It report a runtime errro. My code as following. #include #include #include #include #include "sqlite3.h" #include #include int main() { char db[] = "db.db"; sqlite3 * p_db = NULL; printf("pre open\n"); sqlite3_open(db, &p_db); printf("aft open\n"); return 0; } ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] SQLite bug report: Bad truncation in column mode with non ASCII characters
In ".mode column", the function used to compute the length of the string to print does not account for multi-byte characters, resulting in a shorter string, and all remaining fields in the line shifted to the left. Example: sqlite> select * from test limit 3; namename2 name3 zipcode cityaddress -- -- -- -- -- -- Feuerwehrt des Landkr Soltau-Fal 29664 Walsrode Leitstelle Rettungsds des Kreis 59555 Lippstadt Geiststr. Feuerwehr der Freiwi Schönböc 23556 Lübeck Bernsteind Two first lines are OK. On the third line, the two ö cause 23556 to be shifted two chars left, then the ü causes an additional one char shift for Bernsteind. I noticed this bug while using version 3.6.22, and looking at the release notes, I don't read about a fix for this issue in more recent versions. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] SQLite bug report - large databases only - 'database or disk is full'
Apologies for not answering earlier, I* was away. I've never used Process Monitor - the whole setup you describing is new to me - but I will try to do something about it in the coming week. It has to be a background project for me - I do not use SQLite in production. -Original Message- From: Filip Navara To: General Discussion of SQLite Database Sent: Thu, Dec 10, 2009 1:35 am Subject: Re: [sqlite] SQLite bug report - large databases only - 'database or disk is full' On Mon, Dec 7, 2009 at 10:21 PM, wrote: SQLite bug report Summary: -- error message: Error: near line 2: database or disk is full It happens with plenty of disk space available and with 'unlimited' database ize. It does not happen on all systems. It does not happen on small databases. I run your scripts with SQLite 3.6.21 on Windows 7 64-bit on NTFS rive and unfortunately I run out of disk space before the problem anifested. Would it be possible for you to setup Process Monitor with ilter on the database path (just the path, so both journal and the ain database file are in the log) and history depth set to 1 million the lowest value) and then capture the file accesses during the run f the reproduction scripts? It is possible to save and export the ata then for further analysis and hopefully it will give a clue on hy it happens. Best regards, ilip Navara __ qlite-users mailing list qlite-us...@sqlite.org ttp://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] SQLite bug report - large databases only - 'database or disk is full'
On Mon, Dec 7, 2009 at 10:21 PM, wrote: > > SQLite bug report > > Summary: > -- > > error message: > > Error: near line 2: database or disk is full > > It happens with plenty of disk space available and with 'unlimited' database > size. > It does not happen on all systems. It does not happen on small databases. > I run your scripts with SQLite 3.6.21 on Windows 7 64-bit on NTFS drive and unfortunately I run out of disk space before the problem manifested. Would it be possible for you to setup Process Monitor with filter on the database path (just the path, so both journal and the main database file are in the log) and history depth set to 1 million (the lowest value) and then capture the file accesses during the run of the reproduction scripts? It is possible to save and export the data then for further analysis and hopefully it will give a clue on why it happens. Best regards, Filip Navara ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] SQLite bug report - large databases only - 'database or disk is full'
On Mon, Dec 7, 2009 at 10:21 PM, wrote: > > SQLite bug report > > Summary: > -- > > error message: > > Error: near line 2: database or disk is full > > It happens with plenty of disk space available and with 'unlimited' database > size. > It does not happen on all systems. It does not happen on small databases. > > > Details: > -- > > > The error occurs on > - windows server 2003 SP2 64bit, windows server 2009 64bit > - windows vista, windows 7 rc1, windows 7 - all 64-bit > > The error does _not_ occur on > - windows server 2003 SP2 32bit, windows xp sp3 32 bit Just a short note, we experience very similar problem with our program and the symptoms match exactly. So far we were unable to reproduce it reliably on our systems, but we have plenty of bug reports from production systems. I will post more details soon. Our database files have page size 4Kb and all of the affected systems are running Windows. We use incremental vacuum mode and the file sizes are commonly over 1 Gb large, file system is NTFS (afaik). Best regards, Filip Navara ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] SQLite bug report - large databases only - 'database or disk is full'
SQLite bug report Summary: -- error message: Error: near line 2: database or disk is full It happens with plenty of disk space available and with 'unlimited' database size. It does not happen on all systems. It does not happen on small databases. Details: -- The error occurs on - windows server 2003 SP2 64bit, windows server 2009 64bit - windows vista, windows 7 rc1, windows 7 - all 64-bit The error does _not_ occur on - windows server 2003 SP2 32bit, windows xp sp3 32 bit SQLite3 versions affected: all the ones released in 2009, possibly all the earlier ones, too. The bug was 'distilled' with the reproduction described below. Reproduction -- We (1) create a table in the database, (2) create an input file; (3) import the input file into the table mulltiple times. Using the files attached below the error did occur during the third/fourth import, at database size around 22-28gb. Additional information and observations 1. This is not a new bug - it's been around for the last year, probably two - but it was difficult to spot and isolate. 2. The problem is 'touchy' - with different random seed in the generated table the problem may occur at 45gb db size instead of 20-30gb. When I tried to use, as input data, the same line repeated millions of times - the problem did not occur at all - tests were aborted by me at 160-260 gb database size. 3.The problem does _not_ depend _purely_ on the data being imported. The reproduction script loads the same data set multiple times and fails on the third/fourth time - so it is the database size which triggers it. 4. When the input file is smaller (1gb instead of 8gb), the problem still occurs in the 20-30gb database size range - so there is nothing magical about the number of imports. 5. The test database here is created with pragma page_size = 32768. The same error message occurs for other page sizes and at various cache sizes. 6. In some other tests (not using to the scripts here, with different data) the import was good (about 20gb size) but an attempt to create an index on the imported data resulted in the same error diagnostic - after about 30mins of running. 7. This is not an SQLITE3 problem - when using .NET wrapper for SQLite or using any of the admin tools - the problems occurs in the same area, even though messages are not reported the same way by these tools [and I am getting sometimes 'database image in malformed' after such tools]. Scripts to reproduce the bug -- ++ == awk program to produce the table - save as: t1b.w BEGIN { srand(13) # assure all tests have the same data for (i=0;i inpb.txt echo - load table with data sets the first 10 times time /T for %%i in (1,2,3,4,5,6,7,8,9,10) do c:\apps\sqlite3 tstb.db http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users