|
| 1 | + |
| 2 | +# Dump system table information for the newly initialized data directory |
| 3 | +# Adding debug point 'skip_dd_table_access_check' to @@GLOBAL.debug |
| 4 | + |
| 5 | +# Dump all tables in newly initialized mysql schema |
| 6 | +include/write_result_to_file.inc [connection=default statement=SELECT t.* FROM mysql.tables t JOIN mysql.schemata s JOIN mysql.tablespaces ts WHERE t.schema_id = s.id AND t.tablespace_id = ts.id AND s.name = "mysql" AND ts.name = "mysql" ORDER BY t.name] |
| 7 | +include/filter_file.inc |
| 8 | + |
| 9 | +# Dump all columns in newly initialized mysql schema |
| 10 | +include/write_result_to_file.inc [connection=default statement=SELECT t.name, c.* FROM mysql.columns c JOIN mysql.tables t JOIN mysql.schemata s JOIN mysql.tablespaces ts WHERE c.table_id = t.id AND t.schema_id = s.id AND t.tablespace_id = ts.id AND s.name = "mysql" AND ts.name = "mysql" AND t.name != "ndb_binlog_index" ORDER BY t.name, c.name] |
| 11 | +include/filter_file.inc |
| 12 | +# Removing debug point 'skip_dd_table_access_check' from @@GLOBAL.debug |
| 13 | + |
| 14 | +# Upgrade a data directory from 5.7 |
| 15 | + |
| 16 | +# Copy the 5.7 data zip file to working directory and check it exists. |
| 17 | +# Unzip 5.7 data directory. |
| 18 | +# Set data directory and log file |
| 19 | +# Restart server to trigger upgrade. |
| 20 | +# restart: --datadir=MYSQLD_DATADIR1 --log-error=MYSQLD_LOG |
| 21 | + |
| 22 | +# Dump system table information for the upgraded data directory |
| 23 | +# Adding debug point 'skip_dd_table_access_check' to @@GLOBAL.debug |
| 24 | + |
| 25 | +# Dump all tables in upgraded mysql schema |
| 26 | +include/write_result_to_file.inc [connection=default statement=SELECT t.* FROM mysql.tables t JOIN mysql.schemata s JOIN mysql.tablespaces ts WHERE t.schema_id = s.id AND t.tablespace_id = ts.id AND s.name = "mysql" AND ts.name = "mysql" ORDER BY t.name] |
| 27 | +include/filter_file.inc |
| 28 | + |
| 29 | +# Dump all columns in upgraded mysql schema |
| 30 | +include/write_result_to_file.inc [connection=default statement=SELECT t.name, c.* FROM mysql.columns c JOIN mysql.tables t JOIN mysql.schemata s JOIN mysql.tablespaces ts WHERE c.table_id = t.id AND t.schema_id = s.id AND t.tablespace_id = ts.id AND s.name = "mysql" AND ts.name = "mysql" AND t.name != "ndb_binlog_index" ORDER BY t.name, c.name] |
| 31 | +include/filter_file.inc |
| 32 | +# Removing debug point 'skip_dd_table_access_check' from @@GLOBAL.debug |
| 33 | + |
| 34 | +######################################################################## |
| 35 | +# NOTE: If this test fails, there is a possible inconsistency introduced |
| 36 | +# in the system table/column definition of an upgraded mysql |
| 37 | +# tablespace as compared to that of a newly initialized one. |
| 38 | +# |
| 39 | +# There are 2 possibilities: |
| 40 | +# |
| 41 | +# a) If the failure shows a new inconsistency in the table/column |
| 42 | +# properties, add the appropriate ALTER TABLE statements to |
| 43 | +# scripts/mysql_system_tables_fix.sql |
| 44 | +# to ensure that the metadata of the upgraded table/column is the |
| 45 | +# same as that of the newly created one. |
| 46 | +# |
| 47 | +# b) If the inconsistency is unavoidable, modify the regular expressions |
| 48 | +# above, re-record and update documentation if required. |
| 49 | +# |
| 50 | +######################################################################## |
| 51 | + |
| 52 | +# Compare fresh and upgraded tables |
| 53 | +20c20 |
| 54 | +< # # gtid_executed BASE TABLE InnoDB # Dynamic 255 Visible avg_row_length=0;encrypt_type=N;explicit_tablespace=1;key_block_size=0;keys_disabled=0;pack_record=1;row_type=2;stats_auto_recalc=0;stats_sample_pages=0; # # 1 NULL NULL NULL NULL NULL NULL NULL NULL # # NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL # NULL NULL |
| 55 | +--- |
| 56 | +> # # gtid_executed BASE TABLE InnoDB # Dynamic 255 Visible avg_row_length=0;encrypt_type=N;explicit_tablespace=1;key_block_size=0;keys_disabled=0;pack_record=1;row_type=2;stats_auto_recalc=0;stats_persistent=0;stats_sample_pages=0; # # 1 NULL NULL NULL NULL NULL NULL NULL NULL # # NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL # NULL NULL |
| 57 | + |
| 58 | +# Compare fresh and upgraded columns |
| 59 | + |
| 60 | +# Cleanup. |
1 | 61 | # Copy the 5.7 data zip file to working directory and check it exists.
|
2 | 62 | # Unzip 5.7 data directory.
|
3 | 63 | # Set data directory and log file
|
|
0 commit comments