103 lines
4.6 KiB
Plaintext
103 lines
4.6 KiB
Plaintext
#
|
|
# This file contains bootstrap test cases that
|
|
# need to be run with a debug build. See also the
|
|
# test file 'dd_bootstrap.test' for test cases
|
|
# that can be run with a non-debug server build.
|
|
#
|
|
# Preparation: Shut server down.
|
|
#
|
|
# 1. Try restart after setting an invalid version.
|
|
# ------------------------------------------------
|
|
# 1.1 Create bootstrap file.
|
|
# 1.2 First start the server with --initialize, and update the version.
|
|
# 1.3 Restart the server against DDIR - should fail.
|
|
# 1.4 Look for error.
|
|
# Data Dictionary initialization error found 1 times.
|
|
# 1.5 Delete bootstrap file and datadir.
|
|
#
|
|
# 2. Try restart after dropping the properties table.
|
|
# ---------------------------------------------------
|
|
# 2.1 Create bootstrap file.
|
|
# 2.2 First start the server with --initialize, and drop the properties table. Should fail.
|
|
# 2.3 Look for error.
|
|
# Data Dictionary initialization error found 1 times.
|
|
# 2.4 Delete bootstrap file and datadir.
|
|
#
|
|
# 3. Try restart after dropping the tables table.
|
|
# -----------------------------------------------
|
|
# 3.1 Create bootstrap file.
|
|
# 3.2 First start the server with --initialize, and drop the tables table: Should fail.
|
|
# 3.3 Look for error.
|
|
# Data Dictionary initialization error found 1 times.
|
|
# 3.4 Delete bootstrap file and datadir.
|
|
#
|
|
# 4. Try restart after altering the schemata table.
|
|
# -------------------------------------------------
|
|
# 4.1 Create bootstrap file.
|
|
# 4.2 First start the server with --initialize, and alter the schemata table.
|
|
# 4.3 Restart the server against DDIR.
|
|
# 4.4 Connect as root.
|
|
# 4.5 Verify that the modified table is present.
|
|
SET SESSION debug= '+d,skip_dd_table_access_check';
|
|
SELECT t.comment FROM mysql.tables AS t, mysql.schemata AS s WHERE
|
|
t.name = 'schemata' AND
|
|
t.schema_id = s.id AND
|
|
s.name = 'mysql';
|
|
comment
|
|
Altered table
|
|
SET SESSION debug= '-d,skip_dd_table_access_check';
|
|
# 4.6 Shut server down.
|
|
# 4.7 Close the test connection.
|
|
# 4.8 Delete bootstrap file and datadir.
|
|
#
|
|
# 5. Try to access a DD table in an init-file during --initialize.
|
|
# ----------------------------------------------------------------
|
|
# 5.1 Create bootstrap file.
|
|
# 5.2 First start the server with --initialize, and submit the init file.
|
|
# 5.3 Look for error.
|
|
# Data Dictionary table access error found 1 times.
|
|
# 5.4 Delete bootstrap file and datadir.
|
|
#
|
|
# 6. Try to access a DD table in an init-file during plain restart.
|
|
# -----------------------------------------------------------------
|
|
# 6.1 Create bootstrap file.
|
|
# 6.2 First start the server with --initialize.
|
|
# 6.3 Restart the server against DDIR with an init-file.
|
|
# 6.4 An init file error does not make the server exit, so we need to stop the server.
|
|
# 6.5 Look for error.
|
|
# Data Dictionary initialization error found 1 times.
|
|
# 6.6 Delete bootstrap file and datadir.
|
|
#
|
|
# 7. Try initialize and start with --require-primary-key
|
|
#
|
|
# Bug#17468242/Wl#11807: Provide an option to prevent creation of tables
|
|
# without a unique/pk
|
|
#
|
|
# Check that this option can be set on command line without compromising
|
|
# bootstrap
|
|
# ------------------------------------------------------
|
|
# 7.1 Create bootstrap file.
|
|
# 7.2 First start the server with --initialize
|
|
# 7.3 Restart the server against DDIR.
|
|
# 7.4 Connect as root.
|
|
CREATE TABLE t1(i INT);
|
|
ERROR HY000: Unable to create or change a table without a primary key, when the system variable 'sql_require_primary_key' is set. Add a primary key to the table or unset this variable to avoid this message. Note that tables without a primary key can cause performance problems in row-based replication, so please consult your DBA before changing this setting.
|
|
# 7.5 Shut server down.
|
|
# 7.6 Close the test connection.
|
|
# 7.7 Delete bootstrap file, log file and datadir.
|
|
# ------------------------------------------------------
|
|
# Check that this option can be set on command line without
|
|
# compromising restart against the normal datadir, without
|
|
# initialize
|
|
# ------------------------------------------------------
|
|
# 8.1 Restart the server without initialize against the normal datadir
|
|
# 8.2 Connect as root.
|
|
# Verify that the system variable is in effect
|
|
CREATE TABLE t1(i INT);
|
|
ERROR HY000: Unable to create or change a table without a primary key, when the system variable 'sql_require_primary_key' is set. Add a primary key to the table or unset this variable to avoid this message. Note that tables without a primary key can cause performance problems in row-based replication, so please consult your DBA before changing this setting.
|
|
# 8.3 Shut server down.
|
|
# 8.4 Close the test connection.
|
|
# 8.5 Delete log file.
|
|
#
|
|
# Cleanup: Restarting the server against default datadir.
|