| 1 |
# |
| 2 |
# CHECK TABLE statements |
| 3 |
# |
| 4 |
# Note: the output is likely to be different for the engine under test, |
| 5 |
# in which case rdiff will be needed. Or, the output might say that |
| 6 |
# the storage engine does not support CHECK. |
| 7 |
# |
| 8 |
|
| 9 |
--disable_warnings |
| 10 |
DROP TABLE IF EXISTS t1,t2; |
| 11 |
--enable_warnings |
| 12 |
|
| 13 |
--let $create_definition = a $int_col, b $char_col |
| 14 |
--source create_table.inc |
| 15 |
INSERT INTO t1 (a,b) VALUES (1,'a'),(2,'b'); |
| 16 |
|
| 17 |
--let $table_name = t2 |
| 18 |
--let $create_definition = a $int_col, b $char_col |
| 19 |
--source create_table.inc |
| 20 |
|
| 21 |
CHECK TABLE t1; |
| 22 |
INSERT INTO t1 (a,b) VALUES (3,'c'); |
| 23 |
INSERT INTO t2 (a,b) VALUES (4,'d'); |
| 24 |
CHECK TABLE t1, t2 FOR UPGRADE; |
| 25 |
INSERT INTO t2 (a,b) VALUES (5,'e'); |
| 26 |
CHECK TABLE t2 QUICK; |
| 27 |
INSERT INTO t1 (a,b) VALUES (6,'f'); |
| 28 |
CHECK TABLE t1 FAST; |
| 29 |
INSERT INTO t1 (a,b) VALUES (7,'g'); |
| 30 |
INSERT INTO t2 (a,b) VALUES (8,'h'); |
| 31 |
CHECK TABLE t2, t1 MEDIUM; |
| 32 |
INSERT INTO t1 (a,b) VALUES (9,'i'); |
| 33 |
INSERT INTO t2 (a,b) VALUES (10,'j'); |
| 34 |
CHECK TABLE t1, t2 EXTENDED; |
| 35 |
INSERT INTO t1 (a,b) VALUES (11,'k'); |
| 36 |
CHECK TABLE t1 CHANGED; |
| 37 |
|
| 38 |
DROP TABLE t1, t2; |
| 39 |
|
| 40 |
--let $continue = 1 |
| 41 |
--source have_default_index.inc |
| 42 |
if ($have_default_index) |
| 43 |
{ |
| 44 |
--let $create_definition = a $int_indexed_col, $default_index(a) |
| 45 |
--source create_table.inc |
| 46 |
INSERT INTO t1 (a) VALUES (1),(2),(5); |
| 47 |
CHECK TABLE t1; |
| 48 |
INSERT INTO t1 (a) VALUES (6),(8),(12); |
| 49 |
CHECK TABLE t1 FOR UPGRADE; |
| 50 |
INSERT INTO t1 (a) VALUES (13),(15),(16); |
| 51 |
CHECK TABLE t1 QUICK; |
| 52 |
INSERT INTO t1 (a) VALUES (17),(120),(132); |
| 53 |
CHECK TABLE t1 FAST; |
| 54 |
INSERT INTO t1 (a) VALUES (801),(900),(7714); |
| 55 |
CHECK TABLE t1 MEDIUM; |
| 56 |
INSERT INTO t1 (a) VALUES (8760),(10023),(12000); |
| 57 |
CHECK TABLE t1 EXTENDED; |
| 58 |
INSERT INTO t1 (a) VALUES (13345),(24456),(78302),(143028); |
| 59 |
CHECK TABLE t1 CHANGED; |
| 60 |
DROP TABLE t1; |
| 61 |
} |
| 62 |
|