e_delete.test 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474
  1. # 2010 September 21
  2. #
  3. # The author disclaims copyright to this source code. In place of
  4. # a legal notice, here is a blessing:
  5. #
  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.
  9. #
  10. #***********************************************************************
  11. #
  12. # This file implements tests to verify that the "testable statements" in
  13. # the lang_delete.html document are correct.
  14. #
  15. set testdir [file dirname $argv0]
  16. source $testdir/tester.tcl
  17. ifcapable !compound {
  18. finish_test
  19. return
  20. }
  21. proc do_delete_tests {args} {
  22. uplevel do_select_tests $args
  23. }
  24. do_execsql_test e_delete-0.0 {
  25. CREATE TABLE t1(a, b);
  26. CREATE INDEX i1 ON t1(a);
  27. } {}
  28. # -- syntax diagram delete-stmt
  29. # -- syntax diagram qualified-table-name
  30. #
  31. do_delete_tests e_delete-0.1 {
  32. 1 "DELETE FROM t1" {}
  33. 2 "DELETE FROM t1 INDEXED BY i1" {}
  34. 3 "DELETE FROM t1 NOT INDEXED" {}
  35. 4 "DELETE FROM main.t1" {}
  36. 5 "DELETE FROM main.t1 INDEXED BY i1" {}
  37. 6 "DELETE FROM main.t1 NOT INDEXED" {}
  38. 7 "DELETE FROM t1 WHERE a>2" {}
  39. 8 "DELETE FROM t1 INDEXED BY i1 WHERE a>2" {}
  40. 9 "DELETE FROM t1 NOT INDEXED WHERE a>2" {}
  41. 10 "DELETE FROM main.t1 WHERE a>2" {}
  42. 11 "DELETE FROM main.t1 INDEXED BY i1 WHERE a>2" {}
  43. 12 "DELETE FROM main.t1 NOT INDEXED WHERE a>2" {}
  44. }
  45. # EVIDENCE-OF: R-20205-17349 If the WHERE clause is not present, all
  46. # records in the table are deleted.
  47. #
  48. drop_all_tables
  49. do_test e_delete-1.0 {
  50. db transaction {
  51. foreach t {t1 t2 t3 t4 t5 t6} {
  52. execsql [string map [list %T% $t] {
  53. CREATE TABLE %T%(x, y);
  54. INSERT INTO %T% VALUES(1, 'one');
  55. INSERT INTO %T% VALUES(2, 'two');
  56. INSERT INTO %T% VALUES(3, 'three');
  57. INSERT INTO %T% VALUES(4, 'four');
  58. INSERT INTO %T% VALUES(5, 'five');
  59. }]
  60. }
  61. }
  62. } {}
  63. do_delete_tests e_delete-1.1 {
  64. 1 "DELETE FROM t1 ; SELECT * FROM t1" {}
  65. 2 "DELETE FROM main.t2 ; SELECT * FROM t2" {}
  66. }
  67. # EVIDENCE-OF: R-30203-16177 If a WHERE clause is supplied, then only
  68. # those rows for which the result of evaluating the WHERE clause as a
  69. # boolean expression is true are deleted.
  70. #
  71. do_delete_tests e_delete-1.2 {
  72. 1 "DELETE FROM t3 WHERE 1 ; SELECT x FROM t3" {}
  73. 2 "DELETE FROM main.t4 WHERE 0 ; SELECT x FROM t4" {1 2 3 4 5}
  74. 3 "DELETE FROM t4 WHERE 0.0 ; SELECT x FROM t4" {1 2 3 4 5}
  75. 4 "DELETE FROM t4 WHERE NULL ; SELECT x FROM t4" {1 2 3 4 5}
  76. 5 "DELETE FROM t4 WHERE y!='two'; SELECT x FROM t4" {2}
  77. 6 "DELETE FROM t4 WHERE y='two' ; SELECT x FROM t4" {}
  78. 7 "DELETE FROM t5 WHERE x=(SELECT max(x) FROM t5);SELECT x FROM t5" {1 2 3 4}
  79. 8 "DELETE FROM t5 WHERE (SELECT max(x) FROM t4) ;SELECT x FROM t5" {1 2 3 4}
  80. 9 "DELETE FROM t5 WHERE (SELECT max(x) FROM t6) ;SELECT x FROM t5" {}
  81. 10 "DELETE FROM t6 WHERE y>'seven' ; SELECT y FROM t6" {one four five}
  82. }
  83. #-------------------------------------------------------------------------
  84. # Tests for restrictions on DELETE statements that appear within trigger
  85. # programs.
  86. #
  87. forcedelete test.db2
  88. forcedelete test.db3
  89. do_execsql_test e_delete-2.0 {
  90. ATTACH 'test.db2' AS aux;
  91. ATTACH 'test.db3' AS aux2;
  92. CREATE TABLE temp.t7(a, b); INSERT INTO temp.t7 VALUES(1, 2);
  93. CREATE TABLE main.t7(a, b); INSERT INTO main.t7 VALUES(3, 4);
  94. CREATE TABLE aux.t7(a, b); INSERT INTO aux.t7 VALUES(5, 6);
  95. CREATE TABLE aux2.t7(a, b); INSERT INTO aux2.t7 VALUES(7, 8);
  96. CREATE TABLE main.t8(a, b); INSERT INTO main.t8 VALUES(1, 2);
  97. CREATE TABLE aux.t8(a, b); INSERT INTO aux.t8 VALUES(3, 4);
  98. CREATE TABLE aux2.t8(a, b); INSERT INTO aux2.t8 VALUES(5, 6);
  99. CREATE TABLE aux.t9(a, b); INSERT INTO aux.t9 VALUES(1, 2);
  100. CREATE TABLE aux2.t9(a, b); INSERT INTO aux2.t9 VALUES(3, 4);
  101. CREATE TABLE aux2.t10(a, b); INSERT INTO aux2.t10 VALUES(1, 2);
  102. } {}
  103. # EVIDENCE-OF: R-09681-58560 The table-name specified as part of a
  104. # DELETE statement within a trigger body must be unqualified.
  105. #
  106. # EVIDENCE-OF: R-36771-43788 In other words, the database-name. prefix
  107. # on the table name is not allowed within triggers.
  108. #
  109. do_delete_tests e_delete-2.1 -error {
  110. qualified table names are not allowed on INSERT, UPDATE, and DELETE statements within triggers
  111. } {
  112. 1 {
  113. CREATE TRIGGER tr1 AFTER INSERT ON t1 BEGIN
  114. DELETE FROM main.t2;
  115. END;
  116. } {}
  117. 2 {
  118. CREATE TRIGGER tr1 BEFORE UPDATE ON t2 BEGIN
  119. DELETE FROM temp.t7 WHERE a=new.a;
  120. END;
  121. } {}
  122. 3 {
  123. CREATE TRIGGER tr1 AFTER UPDATE ON t8 BEGIN
  124. DELETE FROM aux2.t8 WHERE b!=a;
  125. END;
  126. } {}
  127. }
  128. # EVIDENCE-OF: R-28818-63526 If the table to which the trigger is
  129. # attached is not in the temp database, then DELETE statements within
  130. # the trigger body must operate on tables within the same database as
  131. # it.
  132. #
  133. # This is tested in two parts. First, check that if a table of the
  134. # specified name does not exist, an error is raised. Secondly, test
  135. # that if tables with the specified name exist in multiple databases,
  136. # the local database table is used.
  137. #
  138. do_delete_tests e_delete-2.2.1 -error { no such table: %s } {
  139. 1 {
  140. CREATE TRIGGER main.tr1 AFTER INSERT ON main.t7 BEGIN
  141. DELETE FROM t9;
  142. END;
  143. INSERT INTO main.t7 VALUES(1, 2);
  144. } {main.t9}
  145. 2 {
  146. CREATE TRIGGER aux.tr2 BEFORE UPDATE ON t9 BEGIN
  147. DELETE FROM t10;
  148. END;
  149. UPDATE t9 SET a=1;
  150. } {aux.t10}
  151. }
  152. do_execsql_test e_delete-2.2.X {
  153. DROP TRIGGER main.tr1;
  154. DROP TRIGGER aux.tr2;
  155. } {}
  156. do_delete_tests e_delete-2.2.2 {
  157. 1 {
  158. CREATE TRIGGER aux.tr1 AFTER INSERT ON t8 BEGIN
  159. DELETE FROM t9;
  160. END;
  161. INSERT INTO aux.t8 VALUES(1, 2);
  162. SELECT count(*) FROM aux.t9
  163. UNION ALL
  164. SELECT count(*) FROM aux2.t9;
  165. } {0 1}
  166. 2 {
  167. CREATE TRIGGER main.tr1 AFTER INSERT ON t8 BEGIN
  168. DELETE FROM t7;
  169. END;
  170. INSERT INTO main.t8 VALUES(1, 2);
  171. SELECT count(*) FROM temp.t7
  172. UNION ALL
  173. SELECT count(*) FROM main.t7
  174. UNION ALL
  175. SELECT count(*) FROM aux.t7
  176. UNION ALL
  177. SELECT count(*) FROM aux2.t7;
  178. } {1 0 1 1}
  179. }
  180. # EVIDENCE-OF: R-31567-38587 If the table to which the trigger is
  181. # attached is in the TEMP database, then the unqualified name of the
  182. # table being deleted is resolved in the same way as it is for a
  183. # top-level statement (by searching first the TEMP database, then the
  184. # main database, then any other databases in the order they were
  185. # attached).
  186. #
  187. do_execsql_test e_delete-2.3.0 {
  188. DROP TRIGGER aux.tr1;
  189. DROP TRIGGER main.tr1;
  190. DELETE FROM main.t8 WHERE oid>1;
  191. DELETE FROM aux.t8 WHERE oid>1;
  192. INSERT INTO aux.t9 VALUES(1, 2);
  193. INSERT INTO main.t7 VALUES(3, 4);
  194. } {}
  195. do_execsql_test e_delete-2.3.1 {
  196. SELECT count(*) FROM temp.t7 UNION ALL SELECT count(*) FROM main.t7 UNION ALL
  197. SELECT count(*) FROM aux.t7 UNION ALL SELECT count(*) FROM aux2.t7;
  198. SELECT count(*) FROM main.t8 UNION ALL SELECT count(*) FROM aux.t8
  199. UNION ALL SELECT count(*) FROM aux2.t8;
  200. SELECT count(*) FROM aux.t9 UNION ALL SELECT count(*) FROM aux2.t9;
  201. SELECT count(*) FROM aux2.t10;
  202. } {1 1 1 1 1 1 1 1 1 1}
  203. do_execsql_test e_delete-2.3.2 {
  204. CREATE TRIGGER temp.tr1 AFTER INSERT ON t7 BEGIN
  205. DELETE FROM t7;
  206. DELETE FROM t8;
  207. DELETE FROM t9;
  208. DELETE FROM t10;
  209. END;
  210. INSERT INTO temp.t7 VALUES('hello', 'world');
  211. } {}
  212. do_execsql_test e_delete-2.3.3 {
  213. SELECT count(*) FROM temp.t7 UNION ALL SELECT count(*) FROM main.t7 UNION ALL
  214. SELECT count(*) FROM aux.t7 UNION ALL SELECT count(*) FROM aux2.t7;
  215. SELECT count(*) FROM main.t8 UNION ALL SELECT count(*) FROM aux.t8
  216. UNION ALL SELECT count(*) FROM aux2.t8;
  217. SELECT count(*) FROM aux.t9 UNION ALL SELECT count(*) FROM aux2.t9;
  218. SELECT count(*) FROM aux2.t10;
  219. } {0 1 1 1 0 1 1 0 1 0}
  220. # EVIDENCE-OF: R-28691-49464 The INDEXED BY and NOT INDEXED clauses are
  221. # not allowed on DELETE statements within triggers.
  222. #
  223. do_execsql_test e_delete-2.4.0 {
  224. CREATE INDEX i8 ON t8(a, b);
  225. } {}
  226. do_delete_tests e_delete-2.4 -error {
  227. the %s %s clause is not allowed on UPDATE or DELETE statements within triggers
  228. } {
  229. 1 {
  230. CREATE TRIGGER tr3 AFTER INSERT ON t8 BEGIN
  231. DELETE FROM t8 INDEXED BY i8 WHERE a=5;
  232. END;
  233. } {INDEXED BY}
  234. 2 {
  235. CREATE TRIGGER tr3 AFTER INSERT ON t8 BEGIN
  236. DELETE FROM t8 NOT INDEXED WHERE a=5;
  237. END;
  238. } {NOT INDEXED}
  239. }
  240. ifcapable update_delete_limit {
  241. # EVIDENCE-OF: R-64942-06615 The LIMIT and ORDER BY clauses (described
  242. # below) are unsupported for DELETE statements within triggers.
  243. #
  244. do_delete_tests e_delete-2.5 -error { near "%s": syntax error } {
  245. 1 {
  246. CREATE TRIGGER tr3 AFTER INSERT ON t8 BEGIN
  247. DELETE FROM t8 LIMIT 10;
  248. END;
  249. } {LIMIT}
  250. 2 {
  251. CREATE TRIGGER tr3 AFTER INSERT ON t8 BEGIN
  252. DELETE FROM t8 ORDER BY a LIMIT 5;
  253. END;
  254. } {ORDER}
  255. }
  256. # EVIDENCE-OF: R-40026-10531 If SQLite is compiled with the
  257. # SQLITE_ENABLE_UPDATE_DELETE_LIMIT compile-time option, then the syntax
  258. # of the DELETE statement is extended by the addition of optional ORDER
  259. # BY and LIMIT clauses:
  260. #
  261. # -- syntax diagram delete-stmt-limited
  262. #
  263. do_delete_tests e_delete-3.1 {
  264. 1 "DELETE FROM t1 LIMIT 5" {}
  265. 2 "DELETE FROM t1 LIMIT 5-1 OFFSET 2+2" {}
  266. 3 "DELETE FROM t1 LIMIT 2+2, 16/4" {}
  267. 4 "DELETE FROM t1 ORDER BY x LIMIT 5" {}
  268. 5 "DELETE FROM t1 ORDER BY x LIMIT 5-1 OFFSET 2+2" {}
  269. 6 "DELETE FROM t1 ORDER BY x LIMIT 2+2, 16/4" {}
  270. 7 "DELETE FROM t1 WHERE x>2 LIMIT 5" {}
  271. 8 "DELETE FROM t1 WHERE x>2 LIMIT 5-1 OFFSET 2+2" {}
  272. 9 "DELETE FROM t1 WHERE x>2 LIMIT 2+2, 16/4" {}
  273. 10 "DELETE FROM t1 WHERE x>2 ORDER BY x LIMIT 5" {}
  274. 11 "DELETE FROM t1 WHERE x>2 ORDER BY x LIMIT 5-1 OFFSET 2+2" {}
  275. 12 "DELETE FROM t1 WHERE x>2 ORDER BY x LIMIT 2+2, 16/4" {}
  276. }
  277. drop_all_tables
  278. proc rebuild_t1 {} {
  279. catchsql { DROP TABLE t1 }
  280. execsql {
  281. CREATE TABLE t1(a, b);
  282. INSERT INTO t1 VALUES(1, 'one');
  283. INSERT INTO t1 VALUES(2, 'two');
  284. INSERT INTO t1 VALUES(3, 'three');
  285. INSERT INTO t1 VALUES(4, 'four');
  286. INSERT INTO t1 VALUES(5, 'five');
  287. }
  288. }
  289. # EVIDENCE-OF: R-44062-08550 If a DELETE statement has a LIMIT clause,
  290. # the maximum number of rows that will be deleted is found by evaluating
  291. # the accompanying expression and casting it to an integer value.
  292. #
  293. rebuild_t1
  294. do_delete_tests e_delete-3.2 -repair rebuild_t1 -query {
  295. SELECT a FROM t1
  296. } {
  297. 1 "DELETE FROM t1 LIMIT 3" {4 5}
  298. 2 "DELETE FROM t1 LIMIT 1+1" {3 4 5}
  299. 3 "DELETE FROM t1 LIMIT '4'" {5}
  300. 4 "DELETE FROM t1 LIMIT '1.0'" {2 3 4 5}
  301. }
  302. # EVIDENCE-OF: R-02661-56399 If the result of the evaluating the LIMIT
  303. # clause cannot be losslessly converted to an integer value, it is an
  304. # error.
  305. #
  306. do_delete_tests e_delete-3.3 -error { datatype mismatch } {
  307. 1 "DELETE FROM t1 LIMIT 'abc'" {}
  308. 2 "DELETE FROM t1 LIMIT NULL" {}
  309. 3 "DELETE FROM t1 LIMIT X'ABCD'" {}
  310. 4 "DELETE FROM t1 LIMIT 1.2" {}
  311. }
  312. # EVIDENCE-OF: R-00598-03741 A negative LIMIT value is interpreted as
  313. # "no limit".
  314. #
  315. do_delete_tests e_delete-3.4 -repair rebuild_t1 -query {
  316. SELECT a FROM t1
  317. } {
  318. 1 "DELETE FROM t1 LIMIT -1" {}
  319. 2 "DELETE FROM t1 LIMIT 2-4" {}
  320. 3 "DELETE FROM t1 LIMIT -4.0" {}
  321. 4 "DELETE FROM t1 LIMIT 5*-1" {}
  322. }
  323. # EVIDENCE-OF: R-26377-49195 If the DELETE statement also has an OFFSET
  324. # clause, then it is similarly evaluated and cast to an integer value.
  325. # Again, it is an error if the value cannot be losslessly converted to
  326. # an integer.
  327. #
  328. do_delete_tests e_delete-3.5 -error { datatype mismatch } {
  329. 1 "DELETE FROM t1 LIMIT 1 OFFSET 'abc'" {}
  330. 2 "DELETE FROM t1 LIMIT 1 OFFSET NULL" {}
  331. 3 "DELETE FROM t1 LIMIT 1 OFFSET X'ABCD'" {}
  332. 4 "DELETE FROM t1 LIMIT 1 OFFSET 1.2" {}
  333. 5 "DELETE FROM t1 LIMIT 'abc', 1" {}
  334. 6 "DELETE FROM t1 LIMIT NULL, 1" {}
  335. 7 "DELETE FROM t1 LIMIT X'ABCD', 1" {}
  336. 8 "DELETE FROM t1 LIMIT 1.2, 1" {}
  337. }
  338. # EVIDENCE-OF: R-64004-53814 If there is no OFFSET clause, or the
  339. # calculated integer value is negative, the effective OFFSET value is
  340. # zero.
  341. #
  342. do_delete_tests e_delete-3.6 -repair rebuild_t1 -query {
  343. SELECT a FROM t1
  344. } {
  345. 1a "DELETE FROM t1 LIMIT 3 OFFSET 0" {4 5}
  346. 1b "DELETE FROM t1 LIMIT 3" {4 5}
  347. 1c "DELETE FROM t1 LIMIT 3 OFFSET -1" {4 5}
  348. 2a "DELETE FROM t1 LIMIT 1+1 OFFSET 0" {3 4 5}
  349. 2b "DELETE FROM t1 LIMIT 1+1" {3 4 5}
  350. 2c "DELETE FROM t1 LIMIT 1+1 OFFSET 2-5" {3 4 5}
  351. 3a "DELETE FROM t1 LIMIT '4' OFFSET 0" {5}
  352. 3b "DELETE FROM t1 LIMIT '4'" {5}
  353. 3c "DELETE FROM t1 LIMIT '4' OFFSET -1.0" {5}
  354. 4a "DELETE FROM t1 LIMIT '1.0' OFFSET 0" {2 3 4 5}
  355. 4b "DELETE FROM t1 LIMIT '1.0'" {2 3 4 5}
  356. 4c "DELETE FROM t1 LIMIT '1.0' OFFSET -11" {2 3 4 5}
  357. }
  358. # EVIDENCE-OF: R-48141-52334 If the DELETE statement has an ORDER BY
  359. # clause, then all rows that would be deleted in the absence of the
  360. # LIMIT clause are sorted according to the ORDER BY. The first M rows,
  361. # where M is the value found by evaluating the OFFSET clause expression,
  362. # are skipped, and the following N, where N is the value of the LIMIT
  363. # expression, are deleted.
  364. #
  365. do_delete_tests e_delete-3.7 -repair rebuild_t1 -query {
  366. SELECT a FROM t1
  367. } {
  368. 1 "DELETE FROM t1 ORDER BY b LIMIT 2" {1 2 3}
  369. 2 "DELETE FROM t1 ORDER BY length(b), a LIMIT 3" {3 5}
  370. 3 "DELETE FROM t1 ORDER BY a DESC LIMIT 1 OFFSET 0" {1 2 3 4}
  371. 4 "DELETE FROM t1 ORDER BY a DESC LIMIT 1 OFFSET 1" {1 2 3 5}
  372. 5 "DELETE FROM t1 ORDER BY a DESC LIMIT 1 OFFSET 2" {1 2 4 5}
  373. }
  374. # EVIDENCE-OF: R-64535-08414 If there are less than N rows remaining
  375. # after taking the OFFSET clause into account, or if the LIMIT clause
  376. # evaluated to a negative value, then all remaining rows are deleted.
  377. #
  378. do_delete_tests e_delete-3.8 -repair rebuild_t1 -query {
  379. SELECT a FROM t1
  380. } {
  381. 1 "DELETE FROM t1 ORDER BY a ASC LIMIT 10" {}
  382. 2 "DELETE FROM t1 ORDER BY a ASC LIMIT -1" {}
  383. 3 "DELETE FROM t1 ORDER BY a ASC LIMIT 4 OFFSET 2" {1 2}
  384. }
  385. # EVIDENCE-OF: R-37284-06965 If the DELETE statement has no ORDER BY
  386. # clause, then all rows that would be deleted in the absence of the
  387. # LIMIT clause are assembled in an arbitrary order before applying the
  388. # LIMIT and OFFSET clauses to determine the subset that are actually
  389. # deleted.
  390. #
  391. # In practice, the "arbitrary order" is rowid order.
  392. #
  393. do_delete_tests e_delete-3.9 -repair rebuild_t1 -query {
  394. SELECT a FROM t1
  395. } {
  396. 1 "DELETE FROM t1 LIMIT 2" {3 4 5}
  397. 2 "DELETE FROM t1 LIMIT 3" {4 5}
  398. 3 "DELETE FROM t1 LIMIT 1 OFFSET 0" {2 3 4 5}
  399. 4 "DELETE FROM t1 LIMIT 1 OFFSET 1" {1 3 4 5}
  400. 5 "DELETE FROM t1 LIMIT 1 OFFSET 2" {1 2 4 5}
  401. }
  402. # EVIDENCE-OF: R-07548-13422 The ORDER BY clause on a DELETE statement
  403. # is used only to determine which rows fall within the LIMIT. The order
  404. # in which rows are deleted is arbitrary and is not influenced by the
  405. # ORDER BY clause.
  406. #
  407. # In practice, rows are always deleted in rowid order.
  408. #
  409. do_delete_tests e_delete-3.10 -repair {
  410. rebuild_t1
  411. catchsql { DROP TABLE t1log }
  412. execsql {
  413. CREATE TABLE t1log(x);
  414. CREATE TRIGGER tr1 AFTER DELETE ON t1 BEGIN
  415. INSERT INTO t1log VALUES(old.a);
  416. END;
  417. }
  418. } -query {
  419. SELECT x FROM t1log
  420. } {
  421. 1 "DELETE FROM t1 ORDER BY a DESC LIMIT 2" {4 5}
  422. 2 "DELETE FROM t1 ORDER BY a DESC LIMIT -1" {1 2 3 4 5}
  423. 3 "DELETE FROM t1 ORDER BY a ASC LIMIT 2" {1 2}
  424. 4 "DELETE FROM t1 ORDER BY a ASC LIMIT -1" {1 2 3 4 5}
  425. }
  426. }
  427. finish_test