Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(707)

Side by Side Diff: third_party/sqlite/src/test/autoinc.test

Issue 2751253002: [sql] Import SQLite 3.17.0. (Closed)
Patch Set: also clang on Linux i386 Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/sqlite/src/test/auth3.test ('k') | third_party/sqlite/src/test/autoindex2.test » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # 2004 November 12 1 # 2004 November 12
2 # 2 #
3 # The author disclaims copyright to this source code. In place of 3 # The author disclaims copyright to this source code. In place of
4 # a legal notice, here is a blessing: 4 # a legal notice, here is a blessing:
5 # 5 #
6 # May you do good and not evil. 6 # May you do good and not evil.
7 # May you find forgiveness for yourself and forgive others. 7 # May you find forgiveness for yourself and forgive others.
8 # May you share freely, never taking more than you give. 8 # May you share freely, never taking more than you give.
9 # 9 #
10 #************************************************************************* 10 #*************************************************************************
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 SELECT name FROM sqlite_sequence; 337 SELECT name FROM sqlite_sequence;
338 } 338 }
339 } {} 339 } {}
340 340
341 # AUTOINCREMENT on TEMP tables. 341 # AUTOINCREMENT on TEMP tables.
342 # 342 #
343 ifcapable tempdb { 343 ifcapable tempdb {
344 do_test autoinc-4.1 { 344 do_test autoinc-4.1 {
345 execsql { 345 execsql {
346 SELECT 1, name FROM sqlite_master WHERE type='table'; 346 SELECT 1, name FROM sqlite_master WHERE type='table';
347 SELECT 2, name FROM sqlite_temp_master WHERE type='table'; 347 SELECT 2, name FROM temp.sqlite_master WHERE type='table';
348 } 348 }
349 } {1 sqlite_sequence} 349 } {1 sqlite_sequence}
350 do_test autoinc-4.2 { 350 do_test autoinc-4.2 {
351 execsql { 351 execsql {
352 CREATE TABLE t1(x INTEGER PRIMARY KEY AUTOINCREMENT, y); 352 CREATE TABLE t1(x INTEGER PRIMARY KEY AUTOINCREMENT, y);
353 CREATE TEMP TABLE t3(a INTEGER PRIMARY KEY AUTOINCREMENT, b); 353 CREATE TEMP TABLE t3(a INTEGER PRIMARY KEY AUTOINCREMENT, b);
354 SELECT 1, name FROM sqlite_master WHERE type='table'; 354 SELECT 1, name FROM sqlite_master WHERE type='table';
355 SELECT 2, name FROM sqlite_temp_master WHERE type='table'; 355 SELECT 2, name FROM sqlite_temp_master WHERE type='table';
356 } 356 }
357 } {1 sqlite_sequence 1 t1 2 t3 2 sqlite_sequence} 357 } {1 sqlite_sequence 1 t1 2 t3 2 sqlite_sequence}
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
656 CREATE VIEW va69637_2 AS SELECT * FROM ta69637_2; 656 CREATE VIEW va69637_2 AS SELECT * FROM ta69637_2;
657 CREATE TRIGGER ra69637_2 INSTEAD OF INSERT ON va69637_2 BEGIN 657 CREATE TRIGGER ra69637_2 INSTEAD OF INSERT ON va69637_2 BEGIN
658 INSERT INTO ta69637_1(y) VALUES(new.z+10000); 658 INSERT INTO ta69637_1(y) VALUES(new.z+10000);
659 END; 659 END;
660 INSERT INTO va69637_2 VALUES(123); 660 INSERT INTO va69637_2 VALUES(123);
661 SELECT * FROM ta69637_1; 661 SELECT * FROM ta69637_1;
662 } 662 }
663 } {1 124 2 10123} 663 } {1 124 2 10123}
664 } 664 }
665 665
666 # 2016-10-03 ticket https://www.sqlite.org/src/tktview/7b3328086a5c1
667 # Make sure autoincrement plays nicely with the xfer optimization
668 #
669 do_execsql_test autoinc-10.1 {
670 DELETE FROM sqlite_sequence;
671 CREATE TABLE t10a(a INTEGER PRIMARY KEY AUTOINCREMENT, b UNIQUE);
672 INSERT INTO t10a VALUES(888,9999);
673 CREATE TABLE t10b(x INTEGER PRIMARY KEY AUTOINCREMENT, y UNIQUE);
674 INSERT INTO t10b SELECT * FROM t10a;
675 SELECT * FROM sqlite_sequence;
676 } {t10a 888 t10b 888}
677
666 678
667 679
668 finish_test 680 finish_test
OLDNEW
« no previous file with comments | « third_party/sqlite/src/test/auth3.test ('k') | third_party/sqlite/src/test/autoindex2.test » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698