3 # The author disclaims copyright to this source code. In place of
4 # a legal notice, here is a blessing:
6 # May you do good and not evil.
7 # May you find forgiveness for yourself and forgive others.
8 # May you share freely, never taking more than you give.
10 #***********************************************************************
12 # Test cases found by Matthew Denton's fuzzer at Chrome.
16 set testdir [file dirname $argv0]
17 source $testdir/tester.tcl
19 do_execsql_test fuzz4-100 {
20 CREATE TABLE Table0 (Col0 NOT NULL DEFAULT (CURRENT_TIME IS 1 > 1));
21 INSERT OR REPLACE INTO Table0 DEFAULT VALUES ;
25 do_execsql_test fuzz4-110 {
27 Col0 TEXT DEFAULT (CASE WHEN 1 IS 3530822107858468864
28 THEN 1 ELSE quote(1) IS 3530822107858468864 END)
30 INSERT INTO Table1 DEFAULT VALUES;
34 do_execsql_test fuzz4-200 {
36 Col0 NOT NULL DEFAULT (CURRENT_TIME IS 1 IS NOT 1 > 1)
38 INSERT OR REPLACE INTO Table2a DEFAULT VALUES;
39 SELECT * FROM Table2a;
42 do_execsql_test fuzz4-210 {
43 CREATE TABLE Table2b (Col0 NOT NULL DEFAULT (CURRENT_TIME IS NOT FALSE)) ;
44 INSERT OR REPLACE INTO Table2b DEFAULT VALUES ;
45 SELECT * FROM Table2b;
48 do_execsql_test fuzz4-300 {
49 CREATE TABLE Table3 (Col0 DEFAULT (CURRENT_TIMESTAMP BETWEEN 1 AND 1));
50 INSERT INTO Table3 DEFAULT VALUES;
54 do_execsql_test fuzz4-400 {
55 CREATE TABLE Table4 (Col0 DEFAULT (1 BETWEEN CURRENT_TIMESTAMP AND 1));
56 INSERT INTO Table4 DEFAULT VALUES;
60 do_execsql_test fuzz4-500 {
61 CREATE TABLE Table5 (Col0 DEFAULT (1 BETWEEN 1 AND CURRENT_TIMESTAMP));
62 INSERT INTO Table5 DEFAULT VALUES;
66 do_execsql_test fuzz4-600 {
67 CREATE TEMPORARY TABLE Table6(
68 Col0 DEFAULT (CASE x'5d' WHEN 1 THEN
69 CASE CURRENT_TIMESTAMP WHEN 1 THEN 1 ELSE 1 END
70 ELSE CASE WHEN 1 THEN FALSE END END )
72 INSERT INTO temp.Table6 DEFAULT VALUES ;
75 do_execsql_test fuzz4-610 {
76 WITH TableX AS (SELECT DISTINCT * ORDER BY 1 , 1 COLLATE RTRIM)
77 DELETE FROM Table6 WHERE Col0 || +8388608 ;