| 1 |
# |
| 2 |
# Standard options in CREATE and ALTER TABLE |
| 3 |
# |
| 4 |
# Note: the test does not check whether the options |
| 5 |
# have any real effect on the table, only |
| 6 |
# that they are accepted |
| 7 |
# |
| 8 |
|
| 9 |
--source have_engine.inc |
| 10 |
|
| 11 |
--disable_warnings |
| 12 |
DROP TABLE IF EXISTS t1; |
| 13 |
--enable_warnings |
| 14 |
|
| 15 |
# Create table with standard options |
| 16 |
|
| 17 |
let $table_options = |
| 18 |
DEFAULT CHARACTER SET = utf8 |
| 19 |
COLLATE = utf8_general_ci |
| 20 |
COMMENT = 'standard table options' |
| 21 |
; |
| 22 |
--source create_table.inc |
| 23 |
--source mask_engine.inc |
| 24 |
SHOW CREATE TABLE t1; |
| 25 |
|
| 26 |
|
| 27 |
# Alter comment |
| 28 |
|
| 29 |
--let $alter_definition = COMMENT = 'table altered' |
| 30 |
--source alter_table.inc |
| 31 |
if ($mysql_errname) |
| 32 |
{ |
| 33 |
--let $my_last_stmt = $alter_statement |
| 34 |
--let $functionality = ALTER TABLE |
| 35 |
--source unexpected_result.inc |
| 36 |
} |
| 37 |
--source mask_engine.inc |
| 38 |
SHOW CREATE TABLE t1; |
| 39 |
|
| 40 |
# Alter ENGINE value |
| 41 |
|
| 42 |
--let $alter_definition = ENGINE=MEMORY |
| 43 |
--source alter_table.inc |
| 44 |
SHOW CREATE TABLE t1; |
| 45 |
--let $alter_definition = ENGINE=$storage_engine |
| 46 |
--source alter_table.inc |
| 47 |
--source mask_engine.inc |
| 48 |
SHOW CREATE TABLE t1; |
| 49 |
|
| 50 |
# Alter character set and collation |
| 51 |
|
| 52 |
--let $alter_definition = CHARACTER SET = latin1 COLLATE = latin1_swedish_ci |
| 53 |
--source alter_table.inc |
| 54 |
--source mask_engine.inc |
| 55 |
SHOW CREATE TABLE t1; |
| 56 |
|
| 57 |
DROP TABLE t1; |
| 58 |
|
| 59 |
--source cleanup_engine.inc |
| 60 |
|