SQLite

Check-in [f4a701d55f]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Modifications to test files to omit any tests that intentionally access out-of-bounds locations in clang -fsanitize=address builds.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: f4a701d55f5c4e1e62ed64b779ad4fff89dd31b7
User & Date: dan 2014-01-23 14:44:08.207
Context
2014-01-24
11:16
Add test cases showing the use of ORDER BY on a recursive query to control depth-first versus breath-first search of a tree. (check-in: 83b0b29165 user: drh tags: trunk)
2014-01-23
14:44
Modifications to test files to omit any tests that intentionally access out-of-bounds locations in clang -fsanitize=address builds. (check-in: f4a701d55f user: dan tags: trunk)
2014-01-22
19:23
Avoid an extra seek when inserting records into the epheremal index used to ensure that rows returned by UNION recursive queries are unique. (check-in: 72c4b3f07a user: dan tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/test1.c.
238
239
240
241
242
243
244




















245

246
247
248
249
250
251
252
    }
    sqlite3IoTrace = io_trace_callback;
  }
#endif
  return TCL_OK;
}























/*
** Usage:  sqlite3_exec_printf  DB  FORMAT  STRING
**
** Invoke the sqlite3_exec_printf() interface using the open database
** DB.  The SQL is the string FORMAT.  The format string should contain
** one %s or %q.  STRING is the value inserted into %s or %q.
*/







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
>







238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
    }
    sqlite3IoTrace = io_trace_callback;
  }
#endif
  return TCL_OK;
}

/*
** Usage:  clang_sanitize_address 
**
** Returns true if the program was compiled using clang with the 
** -fsanitize=address switch on the command line. False otherwise.
*/
static int clang_sanitize_address(
  void *NotUsed,
  Tcl_Interp *interp,    /* The TCL interpreter that invoked this command */
  int argc,              /* Number of arguments */
  char **argv            /* Text of each argument */
){
  int res = 0;
#if defined(__has_feature)
# if __has_feature(address_sanitizer)
  res = 1;
# endif
#endif
  Tcl_SetObjResult(interp, Tcl_NewIntObj(res));
  return TCL_OK;
}
  
/*
** Usage:  sqlite3_exec_printf  DB  FORMAT  STRING
**
** Invoke the sqlite3_exec_printf() interface using the open database
** DB.  The SQL is the string FORMAT.  The format string should contain
** one %s or %q.  STRING is the value inserted into %s or %q.
*/
6319
6320
6321
6322
6323
6324
6325

6326
6327
6328
6329
6330
6331
6332
     { "sqlite_delete_function",        (Tcl_CmdProc*)delete_function       },
     { "sqlite_delete_collation",       (Tcl_CmdProc*)delete_collation      },
     { "sqlite3_get_autocommit",        (Tcl_CmdProc*)get_autocommit        },
     { "sqlite3_stack_used",            (Tcl_CmdProc*)test_stack_used       },
     { "sqlite3_busy_timeout",          (Tcl_CmdProc*)test_busy_timeout     },
     { "printf",                        (Tcl_CmdProc*)test_printf           },
     { "sqlite3IoTrace",              (Tcl_CmdProc*)test_io_trace         },

  };
  static struct {
     char *zName;
     Tcl_ObjCmdProc *xProc;
     void *clientData;
  } aObjCmd[] = {
     { "sqlite3_connection_pointer",    get_sqlite_pointer, 0 },







>







6340
6341
6342
6343
6344
6345
6346
6347
6348
6349
6350
6351
6352
6353
6354
     { "sqlite_delete_function",        (Tcl_CmdProc*)delete_function       },
     { "sqlite_delete_collation",       (Tcl_CmdProc*)delete_collation      },
     { "sqlite3_get_autocommit",        (Tcl_CmdProc*)get_autocommit        },
     { "sqlite3_stack_used",            (Tcl_CmdProc*)test_stack_used       },
     { "sqlite3_busy_timeout",          (Tcl_CmdProc*)test_busy_timeout     },
     { "printf",                        (Tcl_CmdProc*)test_printf           },
     { "sqlite3IoTrace",              (Tcl_CmdProc*)test_io_trace         },
     { "clang_sanitize_address",        (Tcl_CmdProc*)clang_sanitize_address },
  };
  static struct {
     char *zName;
     Tcl_ObjCmdProc *xProc;
     void *clientData;
  } aObjCmd[] = {
     { "sqlite3_connection_pointer",    get_sqlite_pointer, 0 },
Changes to test/capi3.test.
175
176
177
178
179
180
181

182
183
184
185
186
187
188
189
190
191

192
193
194
195
196
197
198
} {SQLITE_CANTOPEN}
do_test capi3-3.4 {
  sqlite3_errmsg $db2
} {unable to open database file}
do_test capi3-3.5 {
  sqlite3_close $db2
} {SQLITE_OK}

do_test capi3-3.6.1-misuse {
  sqlite3_close $db2
} {SQLITE_MISUSE}
do_test capi3-3.6.2-misuse {
  sqlite3_errmsg $db2
} {library routine called out of sequence}
ifcapable {utf16} {
  do_test capi3-3.6.3-misuse {
    utf8 [sqlite3_errmsg16 $db2]
  } {library routine called out of sequence}

}

do_test capi3-3.7 {
  set db2 [sqlite3_open]
  sqlite3_errcode $db2
} {SQLITE_OK}
do_test capi3-3.8 {







>
|
|
|
|
|
|
|
|
|
|
>







175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
} {SQLITE_CANTOPEN}
do_test capi3-3.4 {
  sqlite3_errmsg $db2
} {unable to open database file}
do_test capi3-3.5 {
  sqlite3_close $db2
} {SQLITE_OK}
if {[clang_sanitize_address]==0} {
  do_test capi3-3.6.1-misuse {
    sqlite3_close $db2
  } {SQLITE_MISUSE}
  do_test capi3-3.6.2-misuse {
    sqlite3_errmsg $db2
  } {library routine called out of sequence}
  ifcapable {utf16} {
    do_test capi3-3.6.3-misuse {
      utf8 [sqlite3_errmsg16 $db2]
    } {library routine called out of sequence}
  }
}

do_test capi3-3.7 {
  set db2 [sqlite3_open]
  sqlite3_errcode $db2
} {SQLITE_OK}
do_test capi3-3.8 {
657
658
659
660
661
662
663

664
665
666
667

668
669
670
671
672
673
674
  sqlite3_step $STMT
} {SQLITE_ROW}
#check_data $STMT capi3-6.3 {INTEGER} {1} {1.0} {1}
do_test capi3-6.3 {
  sqlite3_finalize $STMT
} {SQLITE_OK}


do_test capi3-6.4-misuse {
  db cache flush
  sqlite3_close $DB
} {SQLITE_OK}

db close

# This procedure sets the value of the file-format in file 'test.db'
# to $newval. Also, the schema cookie is incremented.
# 
proc set_file_format {newval} {
  hexio_write test.db 44 [hexio_render_int32 $newval]







>
|
|
|
|
>







659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
  sqlite3_step $STMT
} {SQLITE_ROW}
#check_data $STMT capi3-6.3 {INTEGER} {1} {1.0} {1}
do_test capi3-6.3 {
  sqlite3_finalize $STMT
} {SQLITE_OK}

if {[clang_sanitize_address]==0} {
  do_test capi3-6.4-misuse {
    db cache flush
    sqlite3_close $DB
  } {SQLITE_OK}
}
db close

# This procedure sets the value of the file-format in file 'test.db'
# to $newval. Also, the schema cookie is incremented.
# 
proc set_file_format {newval} {
  hexio_write test.db 44 [hexio_render_int32 $newval]
1056
1057
1058
1059
1060
1061
1062
1063

1064
1065
1066
1067

1068
1069
1070
1071
1072
1073
1074
  do_test capi3-13-5 {
    set ms [sqlite3_sleep 80]
    expr {$ms==80 || $ms==1000}
  } {1}
}

# Ticket #1219:  Make sure binding APIs can handle a NULL pointer.
#

do_test capi3-14.1-misuse {
  set rc [catch {sqlite3_bind_text 0 1 hello 5} msg]
  lappend rc $msg
} {1 SQLITE_MISUSE}


# Ticket #1650:  Honor the nBytes parameter to sqlite3_prepare.
#
do_test capi3-15.1 {
  set sql {SELECT * FROM t2}
  set nbytes [string length $sql]
  append sql { WHERE a==1}







|
>
|
|
|
|
>







1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
  do_test capi3-13-5 {
    set ms [sqlite3_sleep 80]
    expr {$ms==80 || $ms==1000}
  } {1}
}

# Ticket #1219:  Make sure binding APIs can handle a NULL pointer.
# 
if {[clang_sanitize_address]==0} {
  do_test capi3-14.1-misuse {
    set rc [catch {sqlite3_bind_text 0 1 hello 5} msg]
      lappend rc $msg
  } {1 SQLITE_MISUSE}
}

# Ticket #1650:  Honor the nBytes parameter to sqlite3_prepare.
#
do_test capi3-15.1 {
  set sql {SELECT * FROM t2}
  set nbytes [string length $sql]
  append sql { WHERE a==1}
Changes to test/capi3c.test.
165
166
167
168
169
170
171

172
173
174
175
176
177
178
179
180
181

182
183
184
185
186
187
188
} {SQLITE_CANTOPEN}
do_test capi3c-3.4 {
  sqlite3_errmsg $db2
} {unable to open database file}
do_test capi3c-3.5 {
  sqlite3_close $db2
} {SQLITE_OK}

do_test capi3c-3.6.1-misuse {
  sqlite3_close $db2
} {SQLITE_MISUSE}
do_test capi3c-3.6.2-misuse {
  sqlite3_errmsg $db2
} {library routine called out of sequence}
ifcapable {utf16} {
  do_test capi3c-3.6.3-misuse {
    utf8 [sqlite3_errmsg16 $db2]
  } {library routine called out of sequence}

}

# rename sqlite3_open ""
# rename sqlite3_open_old sqlite3_open

ifcapable {utf16} {
do_test capi3c-4.1 {







>
|
|
|
|
|
|
|
|
|
|
>







165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
} {SQLITE_CANTOPEN}
do_test capi3c-3.4 {
  sqlite3_errmsg $db2
} {unable to open database file}
do_test capi3c-3.5 {
  sqlite3_close $db2
} {SQLITE_OK}
if {[clang_sanitize_address]==0} {
  do_test capi3c-3.6.1-misuse {
    sqlite3_close $db2
  } {SQLITE_MISUSE}
  do_test capi3c-3.6.2-misuse {
    sqlite3_errmsg $db2
  } {library routine called out of sequence}
  ifcapable {utf16} {
    do_test capi3c-3.6.3-misuse {
      utf8 [sqlite3_errmsg16 $db2]
    } {library routine called out of sequence}
  }
}

# rename sqlite3_open ""
# rename sqlite3_open_old sqlite3_open

ifcapable {utf16} {
do_test capi3c-4.1 {
623
624
625
626
627
628
629

630
631
632
633
634
635
636



637
638
639
640
641
642
643
do_test capi3c-6.2 {
  sqlite3_step $STMT
} {SQLITE_ROW}
check_data $STMT capi3c-6.3 {INTEGER} {1} {1.0} {1}
do_test capi3c-6.3 {
  sqlite3_finalize $STMT
} {SQLITE_OK}

do_test capi3c-6.4 {
  db cache flush
  sqlite3_close $DB
} {SQLITE_OK}
do_test capi3c-6.99-misuse {
  db close
} {}




# This procedure sets the value of the file-format in file 'test.db'
# to $newval. Also, the schema cookie is incremented.
# 
proc set_file_format {newval} {
  hexio_write test.db 44 [hexio_render_int32 $newval]
  set schemacookie [hexio_get_int [hexio_read test.db 40 4]]







>
|
|
|
|
|
|
|
>
>
>







625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
do_test capi3c-6.2 {
  sqlite3_step $STMT
} {SQLITE_ROW}
check_data $STMT capi3c-6.3 {INTEGER} {1} {1.0} {1}
do_test capi3c-6.3 {
  sqlite3_finalize $STMT
} {SQLITE_OK}
if {[clang_sanitize_address]==0} {
  do_test capi3c-6.4 {
    db cache flush
      sqlite3_close $DB
  } {SQLITE_OK}
  do_test capi3c-6.99-misuse {
    db close
  } {}
} else {
  db close
}

# This procedure sets the value of the file-format in file 'test.db'
# to $newval. Also, the schema cookie is incremented.
# 
proc set_file_format {newval} {
  hexio_write test.db 44 [hexio_render_int32 $newval]
  set schemacookie [hexio_get_int [hexio_read test.db 40 4]]
Changes to test/e_fkey.test.
2942
2943
2944
2945
2946
2947
2948






2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980

2981
2982
2983
2984
2985
2986
2987
  execsql COMMIT
  catchsql "
    UPDATE t0 SET a = 'yyy';
    SELECT NOT (a='yyy') FROM t$limit;
  "
}







do_test e_fkey-63.1.1 {
  test_on_delete_recursion $SQLITE_MAX_TRIGGER_DEPTH
} {0 0}
do_test e_fkey-63.1.2 {
  test_on_delete_recursion [expr $SQLITE_MAX_TRIGGER_DEPTH+1]
} {1 {too many levels of trigger recursion}}
do_test e_fkey-63.1.3 {
  sqlite3_limit db SQLITE_LIMIT_TRIGGER_DEPTH 5
  test_on_delete_recursion 5
} {0 0}
do_test e_fkey-63.1.4 {
  test_on_delete_recursion 6
} {1 {too many levels of trigger recursion}}
do_test e_fkey-63.1.5 {
  sqlite3_limit db SQLITE_LIMIT_TRIGGER_DEPTH 1000000
} {5}
do_test e_fkey-63.2.1 {
  test_on_update_recursion $SQLITE_MAX_TRIGGER_DEPTH
} {0 0}
do_test e_fkey-63.2.2 {
  test_on_update_recursion [expr $SQLITE_MAX_TRIGGER_DEPTH+1]
} {1 {too many levels of trigger recursion}}
do_test e_fkey-63.2.3 {
  sqlite3_limit db SQLITE_LIMIT_TRIGGER_DEPTH 5
  test_on_update_recursion 5
} {0 0}
do_test e_fkey-63.2.4 {
  test_on_update_recursion 6
} {1 {too many levels of trigger recursion}}
do_test e_fkey-63.2.5 {
  sqlite3_limit db SQLITE_LIMIT_TRIGGER_DEPTH 1000000
} {5}


#-------------------------------------------------------------------------
# The setting of the recursive_triggers pragma does not affect foreign
# key actions.
#
# EVIDENCE-OF: R-51769-32730 The PRAGMA recursive_triggers setting does
# not not affect the operation of foreign key actions.







>
>
>
>
>
>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
>







2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
  execsql COMMIT
  catchsql "
    UPDATE t0 SET a = 'yyy';
    SELECT NOT (a='yyy') FROM t$limit;
  "
}

# If the current build was created using clang with the -fsanitize=address
# switch, then the library uses considerably more stack space than usual.
# So much more, that some of the following tests cause stack overflows
# if they are run under this configuration.
#
if {[clang_sanitize_address]==0} {
  do_test e_fkey-63.1.1 {
    test_on_delete_recursion $SQLITE_MAX_TRIGGER_DEPTH
  } {0 0}
  do_test e_fkey-63.1.2 {
    test_on_delete_recursion [expr $SQLITE_MAX_TRIGGER_DEPTH+1]
  } {1 {too many levels of trigger recursion}}
  do_test e_fkey-63.1.3 {
    sqlite3_limit db SQLITE_LIMIT_TRIGGER_DEPTH 5
      test_on_delete_recursion 5
  } {0 0}
  do_test e_fkey-63.1.4 {
    test_on_delete_recursion 6
  } {1 {too many levels of trigger recursion}}
  do_test e_fkey-63.1.5 {
    sqlite3_limit db SQLITE_LIMIT_TRIGGER_DEPTH 1000000
  } {5}
  do_test e_fkey-63.2.1 {
    test_on_update_recursion $SQLITE_MAX_TRIGGER_DEPTH
  } {0 0}
  do_test e_fkey-63.2.2 {
    test_on_update_recursion [expr $SQLITE_MAX_TRIGGER_DEPTH+1]
  } {1 {too many levels of trigger recursion}}
  do_test e_fkey-63.2.3 {
    sqlite3_limit db SQLITE_LIMIT_TRIGGER_DEPTH 5
      test_on_update_recursion 5
  } {0 0}
  do_test e_fkey-63.2.4 {
    test_on_update_recursion 6
  } {1 {too many levels of trigger recursion}}
  do_test e_fkey-63.2.5 {
    sqlite3_limit db SQLITE_LIMIT_TRIGGER_DEPTH 1000000
  } {5}
}

#-------------------------------------------------------------------------
# The setting of the recursive_triggers pragma does not affect foreign
# key actions.
#
# EVIDENCE-OF: R-51769-32730 The PRAGMA recursive_triggers setting does
# not not affect the operation of foreign key actions.
Changes to test/misc7.test.
11
12
13
14
15
16
17

18
19
20

21
22
23
24
25
26
27
# This file implements regression tests for SQLite library.
#
# $Id: misc7.test,v 1.29 2009/07/16 18:21:18 drh Exp $

set testdir [file dirname $argv0]
source $testdir/tester.tcl


do_test misc7-1-misuse {
  c_misuse_test
} {}


do_test misc7-2 {
  c_realloc_test
} {}

do_test misc7-3 {
  c_collation_test







>
|
|
|
>







11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# This file implements regression tests for SQLite library.
#
# $Id: misc7.test,v 1.29 2009/07/16 18:21:18 drh Exp $

set testdir [file dirname $argv0]
source $testdir/tester.tcl

if {[clang_sanitize_address]==0} {
  do_test misc7-1-misuse {
    c_misuse_test
  } {}
}

do_test misc7-2 {
  c_realloc_test
} {}

do_test misc7-3 {
  c_collation_test
Changes to test/misuse.test.
167
168
169
170
171
172
173


174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205

206
207
  set v [catch {
    db eval {SELECT * FROM t1} {} {
      set r [sqlite3_close $::DB]
    }
  } msg]
  lappend v $msg $r
} {0 {} SQLITE_BUSY}


do_test misuse-4.4 {
  # Flush the TCL statement cache here, otherwise the sqlite3_close() will
  # fail because there are still un-finalized() VDBEs.
  db cache flush
  sqlite3_close $::DB
  catchsql2 {SELECT * FROM t1}
} {1 {library routine called out of sequence}}
do_test misuse-4.5 {
  catchsql {
    SELECT * FROM t1
  }
} {1 {library routine called out of sequence}}

# Attempt to use a database after it has been closed.
#
do_test misuse-5.1 {
  db close
  sqlite3 db test2.db; set ::DB [sqlite3_connection_pointer db]
  execsql {
    SELECT * FROM t1
  }
} {1 2}
do_test misuse-5.2 {
  catchsql2 {SELECT * FROM t1}
} {0 {a b 1 2}}
do_test misuse-5.3 {
  db close
  set r [catch {
    sqlite3_prepare $::DB {SELECT * FROM t1} -1 TAIL
  } msg]
  lappend r $msg
} {1 {(21) library routine called out of sequence}}


finish_test







>
>
|


|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
>


167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
  set v [catch {
    db eval {SELECT * FROM t1} {} {
      set r [sqlite3_close $::DB]
    }
  } msg]
  lappend v $msg $r
} {0 {} SQLITE_BUSY}

if {[clang_sanitize_address]==0} {
  do_test misuse-4.4 {
  # Flush the TCL statement cache here, otherwise the sqlite3_close() will
  # fail because there are still un-finalized() VDBEs.
    db cache flush
      sqlite3_close $::DB
      catchsql2 {SELECT * FROM t1}
  } {1 {library routine called out of sequence}}
  do_test misuse-4.5 {
    catchsql {
      SELECT * FROM t1
    }
  } {1 {library routine called out of sequence}}

  # Attempt to use a database after it has been closed.
  #
  do_test misuse-5.1 {
    db close
      sqlite3 db test2.db; set ::DB [sqlite3_connection_pointer db]
      execsql {
        SELECT * FROM t1
      }
  } {1 2}
  do_test misuse-5.2 {
    catchsql2 {SELECT * FROM t1}
  } {0 {a b 1 2}}
  do_test misuse-5.3 {
    db close
      set r [catch {
        sqlite3_prepare $::DB {SELECT * FROM t1} -1 TAIL
      } msg]
    lappend r $msg
  } {1 {(21) library routine called out of sequence}}
}

finish_test
Changes to test/select7.test.
134
135
136
137
138
139
140

141
142
143
144
145
146
147
148
149
150
151
152
153
154
155

156
157
158
159
160
161
162
  } [list 1 \
     {only a single result allowed for a SELECT that is part of an expression}]
}

# Verify that an error occurs if you have too many terms on a
# compound select statement.
#

ifcapable compound {
  if {$SQLITE_MAX_COMPOUND_SELECT>0} {
    set sql {SELECT 0}
    set result 0
    for {set i 1} {$i<$SQLITE_MAX_COMPOUND_SELECT} {incr i} {
      append sql " UNION ALL SELECT $i"
      lappend result $i
    }
    do_test select7-6.1 {
      catchsql $sql
    } [list 0 $result]
    append sql { UNION ALL SELECT 99999999}
    do_test select7-6.2 {
      catchsql $sql
    } {1 {too many terms in compound SELECT}}

  }
}

# This block of tests verifies that bug aa92c76cd4 is fixed.
#
do_test select7-7.1 {
  execsql {







>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
>







134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
  } [list 1 \
     {only a single result allowed for a SELECT that is part of an expression}]
}

# Verify that an error occurs if you have too many terms on a
# compound select statement.
#
if {[clang_sanitize_address]==0} {
  ifcapable compound {
    if {$SQLITE_MAX_COMPOUND_SELECT>0} {
      set sql {SELECT 0}
      set result 0
        for {set i 1} {$i<$SQLITE_MAX_COMPOUND_SELECT} {incr i} {
          append sql " UNION ALL SELECT $i"
            lappend result $i
        }
      do_test select7-6.1 {
        catchsql $sql
      } [list 0 $result]
      append sql { UNION ALL SELECT 99999999}
      do_test select7-6.2 {
        catchsql $sql
      } {1 {too many terms in compound SELECT}}
    }
  }
}

# This block of tests verifies that bug aa92c76cd4 is fixed.
#
do_test select7-7.1 {
  execsql {