I've recorded the SQLs done to the original file (with all the tables,
not the stripped one) which makes it corrupted, see below (I've removed
"SELECT" queries from the list, assuming they are not relevant).
The issue is that it works OK when I feed it into sqlite command line
tool with (it correctly SELECTs the item at the end):
sqlite3.exe test.db < sql_corrupt_no_select.txt
The difference may be compile flags between official sqlite3.exe and my
version of sqlite lib, so I'll have to do more debugging here.
Regards,
Miroslav
PRAGMA synchronous=FULL;
PRAGMA count_changes=OFF;
ALTER TABLE [notes] ADD [hash] VARCHAR(64) NULL;
ALTER TABLE [attachments] ADD [hash] VARCHAR(64) NULL;
ALTER TABLE [notes] ADD [hash_html] VARCHAR(64) NULL;
CREATE TABLE IF NOT EXISTS [anchors] ( [anc_id] INTEGER PRIMARY KEY
AUTOINCREMENT NOT NULL, [note_id] VARCHAR(30) NULL, [anc_name]
VARCHAR(255) NOT NULL, [anc_offset] INTEGER NOT NULL );
CREATE INDEX IF NOT EXISTS [IDX_NOTE_HASH] ON [notes] ( [hash] DESC );
CREATE INDEX IF NOT EXISTS [IDX_NOTE_HASH_HTML] ON [notes] ( [hash_html]
DESC );
CREATE TABLE IF NOT EXISTS [deletions] ( [del_id] INTEGER NOT NULL
PRIMARY KEY AUTOINCREMENT, [note_id] VARCHAR(30) UNIQUE NOT NULL );
ALTER TABLE [tasks] ADD [script_path] TEXT NULL;
CREATE INDEX IF NOT EXISTS [IDX_DELETIONS_NOTE] ON [deletions] (
[note_id] DESC );
CREATE TABLE IF NOT EXISTS [deletions_attachments] ( [del_id] INTEGER
PRIMARY KEY AUTOINCREMENT NOT NULL, [att_code] VARCHAR(30) NOT NULL );
CREATE INDEX IF NOT EXISTS [IDX_DELETIONS_ATT_NOTE] ON
[deletions_attachments] ( [att_code] DESC );
ALTER TABLE [attachments] ADD [att_code] VARCHAR(30) NULL;
BEGIN EXCLUSIVE;
PRAGMA page_count;
PRAGMA freelist_count;
UPDATE notes_tree SET is_expanded=1 WHERE note_id='Q961n1K.d-H5Q9IZ.hNTbQ';
UPDATE notes SET date_created=0, date_modified=0, icon_type=-2,
icon_info='', is_finished=0, is_readonly=0, is_template=0,
syntax_highlight='', note_clone_id='', use_custom_txt_color=0,
use_custom_bkg_color=0, use_custom_font=0, custom_txt_color='#000000',
custom_bkg_color='#000000', custom_font='', use_custom_note_bkg_color=0,
custom_note_bkg_color='#000000' WHERE note_id='Q961n1K.d-H5Q9IZ.hNTbQ';
UPDATE notes_tree SET is_expanded=1 WHERE note_id='F3N3YO3MJMeqBAy7kJOYIA';
UPDATE notes SET date_created=0, date_modified=1317743245, icon_type=0,
icon_info='blog', is_finished=0, is_readonly=0, is_template=0,
syntax_highlight='', note_clone_id='', use_custom_txt_color=0,
use_custom_bkg_color=0, use_custom_font=0, custom_txt_color='#000000',
custom_bkg_color='#000000', custom_font='', use_custom_note_bkg_color=0,
custom_note_bkg_color='#000000' WHERE note_id='F3N3YO3MJMeqBAy7kJOYIA';
ROLLBACK;
SELECT * FROM images WHERE note_id="2O7Ej89J3K8Fax5OedEiQQ" ;
On 13.7.2016. 13:05, Richard Hipp wrote:
On 7/13/16, Miroslav Rajcic <miroslav.raj...@inet.hr> wrote:
Issue can be reproduced on Windows and Mac
Can you please send the steps needed to reproduce the problem?
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users