| 1 |
# |
| 2 |
# ANALYZE 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 ANALYZE. |
| 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 |
--let $create_definition = a $int_col, b $char_col |
| 17 |
--let $table_name = t2 |
| 18 |
--source create_table.inc |
| 19 |
|
| 20 |
INSERT INTO t1 (a,b) VALUES (3,'c'); |
| 21 |
ANALYZE TABLE t1; |
| 22 |
INSERT INTO t2 (a,b) VALUES (4,'d'); |
| 23 |
ANALYZE NO_WRITE_TO_BINLOG TABLE t2; |
| 24 |
INSERT INTO t1 (a,b) VALUES (5,'e'); |
| 25 |
INSERT INTO t2 (a,b) VALUES (6,'f'); |
| 26 |
ANALYZE LOCAL TABLE t1, t2; |
| 27 |
|
| 28 |
DROP TABLE t1, t2; |
| 29 |
|
| 30 |
--let $continue = 1 |
| 31 |
--source have_default_index.inc |
| 32 |
|
| 33 |
if ($have_default_index) |
| 34 |
{ |
| 35 |
--let $create_definition = a $int_indexed_col, $default_index(a) |
| 36 |
--source create_table.inc |
| 37 |
INSERT INTO t1 (a) VALUES (1),(2),(4),(7); |
| 38 |
ANALYZE TABLE t1; |
| 39 |
INSERT INTO t1 (a) VALUES (8),(10),(11),(12); |
| 40 |
ANALYZE TABLE t1; |
| 41 |
DROP TABLE t1; |
| 42 |
} |
| 43 |
|