Skip to content

Commit 76fe3ef

Browse files
author
Alexander Nozdrin
committed
WL#7159: Move time zone tables and help tables from MyISAM to transactional
storage. Pushed on behalf of Dmitry Shulga. The following system tables are migrated to InnoDB by this patch: - help_category - help_keyword - help_relation - help_topic - time_zone - time_zone_leap_second - time_zone_name - time_zone_transition, - time_zone_transition_type Attachable transaction provided by previously pushed WLs (7828 and 8003) is started to be used by this patch.
1 parent 317548d commit 76fe3ef

20 files changed

+613
-120
lines changed

mysql-test/r/alter_table.result

+5-5
Original file line numberDiff line numberDiff line change
@@ -1937,7 +1937,7 @@ DROP TABLE tm1;
19371937
# Bug#11815557 60269: MYSQL SHOULD REJECT ATTEMPTS TO CREATE SYSTEM
19381938
# TABLES IN INCORRECT ENGINE
19391939
#
1940-
# Note: This test assumes that only MyISAM supports system tables.
1940+
# Note: This test assumes that only MyISAM and InnoDB supports system tables.
19411941
# If other engines are made to support system tables,
19421942
# then this test needs to be updated
19431943
#
@@ -1962,8 +1962,8 @@ ALTER TABLE columns_priv ENGINE=csv;
19621962
ERROR HY000: Storage engine 'CSV' does not support system tables. [mysql.columns_priv]
19631963
ALTER TABLE time_zone ENGINE=merge;
19641964
ERROR HY000: Storage engine 'MRG_MYISAM' does not support system tables. [mysql.time_zone]
1965-
ALTER TABLE help_topic ENGINE=innodb;
1966-
ERROR HY000: Storage engine 'InnoDB' does not support system tables. [mysql.help_topic]
1965+
ALTER TABLE help_topic ENGINE=merge;
1966+
ERROR HY000: Storage engine 'MRG_MYISAM' does not support system tables. [mysql.help_topic]
19671967
CREATE TABLE db (dummy int) ENGINE=innodb;
19681968
ERROR HY000: Storage engine 'InnoDB' does not support system tables. [mysql.db]
19691969
CREATE TABLE user (dummy int) ENGINE=memory;
@@ -1984,8 +1984,8 @@ CREATE TABLE columns_priv (dummy int) ENGINE=csv;
19841984
ERROR HY000: Storage engine 'CSV' does not support system tables. [mysql.columns_priv]
19851985
CREATE TABLE time_zone (dummy int) ENGINE=merge;
19861986
ERROR HY000: Storage engine 'MRG_MYISAM' does not support system tables. [mysql.time_zone]
1987-
CREATE TABLE help_topic (dummy int) ENGINE=innodb;
1988-
ERROR HY000: Storage engine 'InnoDB' does not support system tables. [mysql.help_topic]
1987+
CREATE TABLE help_topic (dummy int) ENGINE=merge;
1988+
ERROR HY000: Storage engine 'MRG_MYISAM' does not support system tables. [mysql.help_topic]
19891989
use test;
19901990
# End of Bug#11815557
19911991
#

mysql-test/r/mysql_tzinfo_to_sql.result

+4-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ CREATE TABLE time_zone_name as SELECT * FROM mysql.time_zone_name WHERE 1 = 0;
77
CREATE TABLE time_zone_transition as SELECT * FROM mysql.time_zone_transition WHERE 1 = 0;
88
CREATE TABLE time_zone_transition_type as SELECT * FROM mysql.time_zone_transition_type WHERE 1 = 0;
99
# Load zone table for Japanese zones. Pass file as argument.
10+
START TRANSACTION;
1011
INSERT INTO time_zone (Use_leap_seconds) VALUES ('N');
1112
SET @time_zone_id= LAST_INSERT_ID();
1213
INSERT INTO time_zone_name (Name, Time_zone_id) VALUES ('test_japan', @time_zone_id);
@@ -26,6 +27,7 @@ INSERT INTO time_zone_transition_type (Time_zone_id, Transition_type_id, Offset,
2627
,(@time_zone_id, 1, 36000, 1, 'JDT')
2728
,(@time_zone_id, 2, 32400, 0, 'JST')
2829
;
30+
COMMIT;
2931
SELECT * FROM time_zone;
3032
Time_zone_id Use_leap_seconds
3133
0 N
@@ -52,7 +54,8 @@ Time_zone_id Transition_type_id Offset Is_DST Abbreviation
5254
0 2 32400 0 JST
5355
# Load zone table with --leap option((mysql_tzinfo_to_sql --leap <zonepath>/UTC))
5456
TRUNCATE TABLE time_zone_leap_second;
55-
ALTER TABLE time_zone_leap_second ORDER BY Transition_time;
57+
START TRANSACTION;
58+
COMMIT;
5659
SELECT * FROM time_zone;
5760
Time_zone_id Use_leap_seconds
5861
0 N

mysql-test/r/mysqlcheck.result

+54-18
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,18 @@ note : The storage engine for the table doesn't support optimize
4545
mysql.gtid_executed
4646
note : Table does not support optimize, doing recreate + analyze instead
4747
status : OK
48-
mysql.help_category OK
49-
mysql.help_keyword OK
50-
mysql.help_relation OK
51-
mysql.help_topic OK
48+
mysql.help_category
49+
note : Table does not support optimize, doing recreate + analyze instead
50+
status : OK
51+
mysql.help_keyword
52+
note : Table does not support optimize, doing recreate + analyze instead
53+
status : OK
54+
mysql.help_relation
55+
note : Table does not support optimize, doing recreate + analyze instead
56+
status : OK
57+
mysql.help_topic
58+
note : Table does not support optimize, doing recreate + analyze instead
59+
status : OK
5260
mysql.innodb_index_stats
5361
note : Table does not support optimize, doing recreate + analyze instead
5462
status : OK
@@ -73,11 +81,21 @@ status : OK
7381
mysql.slow_log
7482
note : The storage engine for the table doesn't support optimize
7583
mysql.tables_priv OK
76-
mysql.time_zone OK
77-
mysql.time_zone_leap_second OK
78-
mysql.time_zone_name OK
79-
mysql.time_zone_transition OK
80-
mysql.time_zone_transition_type OK
84+
mysql.time_zone
85+
note : Table does not support optimize, doing recreate + analyze instead
86+
status : OK
87+
mysql.time_zone_leap_second
88+
note : Table does not support optimize, doing recreate + analyze instead
89+
status : OK
90+
mysql.time_zone_name
91+
note : Table does not support optimize, doing recreate + analyze instead
92+
status : OK
93+
mysql.time_zone_transition
94+
note : Table does not support optimize, doing recreate + analyze instead
95+
status : OK
96+
mysql.time_zone_transition_type
97+
note : Table does not support optimize, doing recreate + analyze instead
98+
status : OK
8199
mysql.user OK
82100
mysql.columns_priv OK
83101
mysql.db OK
@@ -119,10 +137,18 @@ note : The storage engine for the table doesn't support optimize
119137
mysql.gtid_executed
120138
note : Table does not support optimize, doing recreate + analyze instead
121139
status : OK
122-
mysql.help_category Table is already up to date
123-
mysql.help_keyword Table is already up to date
124-
mysql.help_relation Table is already up to date
125-
mysql.help_topic Table is already up to date
140+
mysql.help_category
141+
note : Table does not support optimize, doing recreate + analyze instead
142+
status : OK
143+
mysql.help_keyword
144+
note : Table does not support optimize, doing recreate + analyze instead
145+
status : OK
146+
mysql.help_relation
147+
note : Table does not support optimize, doing recreate + analyze instead
148+
status : OK
149+
mysql.help_topic
150+
note : Table does not support optimize, doing recreate + analyze instead
151+
status : OK
126152
mysql.innodb_index_stats
127153
note : Table does not support optimize, doing recreate + analyze instead
128154
status : OK
@@ -147,11 +173,21 @@ status : OK
147173
mysql.slow_log
148174
note : The storage engine for the table doesn't support optimize
149175
mysql.tables_priv Table is already up to date
150-
mysql.time_zone Table is already up to date
151-
mysql.time_zone_leap_second Table is already up to date
152-
mysql.time_zone_name Table is already up to date
153-
mysql.time_zone_transition Table is already up to date
154-
mysql.time_zone_transition_type Table is already up to date
176+
mysql.time_zone
177+
note : Table does not support optimize, doing recreate + analyze instead
178+
status : OK
179+
mysql.time_zone_leap_second
180+
note : Table does not support optimize, doing recreate + analyze instead
181+
status : OK
182+
mysql.time_zone_name
183+
note : Table does not support optimize, doing recreate + analyze instead
184+
status : OK
185+
mysql.time_zone_transition
186+
note : Table does not support optimize, doing recreate + analyze instead
187+
status : OK
188+
mysql.time_zone_transition_type
189+
note : Table does not support optimize, doing recreate + analyze instead
190+
status : OK
155191
mysql.user Table is already up to date
156192
create table t1 (a int) engine=myisam;
157193
create view v1 as select * from t1;

mysql-test/suite/funcs_1/r/is_tables_mysql.result

+9-9
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ TABLE_NAME help_category
156156
TABLE_TYPE BASE TABLE
157157
ENGINE TMP_TABLE_ENGINE
158158
VERSION 10
159-
ROW_FORMAT Dynamic
159+
ROW_FORMAT Compact
160160
TABLE_ROWS #TBLR#
161161
AVG_ROW_LENGTH #ARL#
162162
DATA_LENGTH #DL#
@@ -179,7 +179,7 @@ TABLE_NAME help_keyword
179179
TABLE_TYPE BASE TABLE
180180
ENGINE TMP_TABLE_ENGINE
181181
VERSION 10
182-
ROW_FORMAT Fixed
182+
ROW_FORMAT Compact
183183
TABLE_ROWS #TBLR#
184184
AVG_ROW_LENGTH #ARL#
185185
DATA_LENGTH #DL#
@@ -202,7 +202,7 @@ TABLE_NAME help_relation
202202
TABLE_TYPE BASE TABLE
203203
ENGINE TMP_TABLE_ENGINE
204204
VERSION 10
205-
ROW_FORMAT Fixed
205+
ROW_FORMAT Compact
206206
TABLE_ROWS #TBLR#
207207
AVG_ROW_LENGTH #ARL#
208208
DATA_LENGTH #DL#
@@ -225,7 +225,7 @@ TABLE_NAME help_topic
225225
TABLE_TYPE BASE TABLE
226226
ENGINE TMP_TABLE_ENGINE
227227
VERSION 10
228-
ROW_FORMAT Dynamic
228+
ROW_FORMAT Compact
229229
TABLE_ROWS #TBLR#
230230
AVG_ROW_LENGTH #ARL#
231231
DATA_LENGTH #DL#
@@ -547,7 +547,7 @@ TABLE_NAME time_zone
547547
TABLE_TYPE BASE TABLE
548548
ENGINE TMP_TABLE_ENGINE
549549
VERSION 10
550-
ROW_FORMAT Fixed
550+
ROW_FORMAT Compact
551551
TABLE_ROWS #TBLR#
552552
AVG_ROW_LENGTH #ARL#
553553
DATA_LENGTH #DL#
@@ -570,7 +570,7 @@ TABLE_NAME time_zone_leap_second
570570
TABLE_TYPE BASE TABLE
571571
ENGINE TMP_TABLE_ENGINE
572572
VERSION 10
573-
ROW_FORMAT Fixed
573+
ROW_FORMAT Compact
574574
TABLE_ROWS #TBLR#
575575
AVG_ROW_LENGTH #ARL#
576576
DATA_LENGTH #DL#
@@ -593,7 +593,7 @@ TABLE_NAME time_zone_name
593593
TABLE_TYPE BASE TABLE
594594
ENGINE TMP_TABLE_ENGINE
595595
VERSION 10
596-
ROW_FORMAT Fixed
596+
ROW_FORMAT Compact
597597
TABLE_ROWS #TBLR#
598598
AVG_ROW_LENGTH #ARL#
599599
DATA_LENGTH #DL#
@@ -616,7 +616,7 @@ TABLE_NAME time_zone_transition
616616
TABLE_TYPE BASE TABLE
617617
ENGINE TMP_TABLE_ENGINE
618618
VERSION 10
619-
ROW_FORMAT Fixed
619+
ROW_FORMAT Compact
620620
TABLE_ROWS #TBLR#
621621
AVG_ROW_LENGTH #ARL#
622622
DATA_LENGTH #DL#
@@ -639,7 +639,7 @@ TABLE_NAME time_zone_transition_type
639639
TABLE_TYPE BASE TABLE
640640
ENGINE TMP_TABLE_ENGINE
641641
VERSION 10
642-
ROW_FORMAT Fixed
642+
ROW_FORMAT Compact
643643
TABLE_ROWS #TBLR#
644644
AVG_ROW_LENGTH #ARL#
645645
DATA_LENGTH #DL#

mysql-test/suite/funcs_1/r/is_tables_mysql_embedded.result

+18-18
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ TABLE_NAME help_category
156156
TABLE_TYPE BASE TABLE
157157
ENGINE TMP_TABLE_ENGINE
158158
VERSION 10
159-
ROW_FORMAT Dynamic
159+
ROW_FORMAT Compact
160160
TABLE_ROWS #TBLR#
161161
AVG_ROW_LENGTH #ARL#
162162
DATA_LENGTH #DL#
@@ -179,7 +179,7 @@ TABLE_NAME help_keyword
179179
TABLE_TYPE BASE TABLE
180180
ENGINE TMP_TABLE_ENGINE
181181
VERSION 10
182-
ROW_FORMAT Fixed
182+
ROW_FORMAT Compact
183183
TABLE_ROWS #TBLR#
184184
AVG_ROW_LENGTH #ARL#
185185
DATA_LENGTH #DL#
@@ -202,7 +202,7 @@ TABLE_NAME help_relation
202202
TABLE_TYPE BASE TABLE
203203
ENGINE TMP_TABLE_ENGINE
204204
VERSION 10
205-
ROW_FORMAT Fixed
205+
ROW_FORMAT Compact
206206
TABLE_ROWS #TBLR#
207207
AVG_ROW_LENGTH #ARL#
208208
DATA_LENGTH #DL#
@@ -225,7 +225,7 @@ TABLE_NAME help_topic
225225
TABLE_TYPE BASE TABLE
226226
ENGINE TMP_TABLE_ENGINE
227227
VERSION 10
228-
ROW_FORMAT Dynamic
228+
ROW_FORMAT Compact
229229
TABLE_ROWS #TBLR#
230230
AVG_ROW_LENGTH #ARL#
231231
DATA_LENGTH #DL#
@@ -547,7 +547,7 @@ TABLE_NAME time_zone
547547
TABLE_TYPE BASE TABLE
548548
ENGINE TMP_TABLE_ENGINE
549549
VERSION 10
550-
ROW_FORMAT Fixed
550+
ROW_FORMAT Compact
551551
TABLE_ROWS #TBLR#
552552
AVG_ROW_LENGTH #ARL#
553553
DATA_LENGTH #DL#
@@ -570,7 +570,7 @@ TABLE_NAME time_zone_leap_second
570570
TABLE_TYPE BASE TABLE
571571
ENGINE TMP_TABLE_ENGINE
572572
VERSION 10
573-
ROW_FORMAT Fixed
573+
ROW_FORMAT Compact
574574
TABLE_ROWS #TBLR#
575575
AVG_ROW_LENGTH #ARL#
576576
DATA_LENGTH #DL#
@@ -593,7 +593,7 @@ TABLE_NAME time_zone_name
593593
TABLE_TYPE BASE TABLE
594594
ENGINE TMP_TABLE_ENGINE
595595
VERSION 10
596-
ROW_FORMAT Fixed
596+
ROW_FORMAT Compact
597597
TABLE_ROWS #TBLR#
598598
AVG_ROW_LENGTH #ARL#
599599
DATA_LENGTH #DL#
@@ -616,7 +616,7 @@ TABLE_NAME time_zone_transition
616616
TABLE_TYPE BASE TABLE
617617
ENGINE TMP_TABLE_ENGINE
618618
VERSION 10
619-
ROW_FORMAT Fixed
619+
ROW_FORMAT Compact
620620
TABLE_ROWS #TBLR#
621621
AVG_ROW_LENGTH #ARL#
622622
DATA_LENGTH #DL#
@@ -639,7 +639,7 @@ TABLE_NAME time_zone_transition_type
639639
TABLE_TYPE BASE TABLE
640640
ENGINE TMP_TABLE_ENGINE
641641
VERSION 10
642-
ROW_FORMAT Fixed
642+
ROW_FORMAT Compact
643643
TABLE_ROWS #TBLR#
644644
AVG_ROW_LENGTH #ARL#
645645
DATA_LENGTH #DL#
@@ -839,7 +839,7 @@ TABLE_NAME help_category
839839
TABLE_TYPE BASE TABLE
840840
ENGINE TMP_TABLE_ENGINE
841841
VERSION 10
842-
ROW_FORMAT Dynamic
842+
ROW_FORMAT Compact
843843
TABLE_ROWS #TBLR#
844844
AVG_ROW_LENGTH #ARL#
845845
DATA_LENGTH #DL#
@@ -862,7 +862,7 @@ TABLE_NAME help_keyword
862862
TABLE_TYPE BASE TABLE
863863
ENGINE TMP_TABLE_ENGINE
864864
VERSION 10
865-
ROW_FORMAT Fixed
865+
ROW_FORMAT Compact
866866
TABLE_ROWS #TBLR#
867867
AVG_ROW_LENGTH #ARL#
868868
DATA_LENGTH #DL#
@@ -885,7 +885,7 @@ TABLE_NAME help_relation
885885
TABLE_TYPE BASE TABLE
886886
ENGINE TMP_TABLE_ENGINE
887887
VERSION 10
888-
ROW_FORMAT Fixed
888+
ROW_FORMAT Compact
889889
TABLE_ROWS #TBLR#
890890
AVG_ROW_LENGTH #ARL#
891891
DATA_LENGTH #DL#
@@ -908,7 +908,7 @@ TABLE_NAME help_topic
908908
TABLE_TYPE BASE TABLE
909909
ENGINE TMP_TABLE_ENGINE
910910
VERSION 10
911-
ROW_FORMAT Dynamic
911+
ROW_FORMAT Compact
912912
TABLE_ROWS #TBLR#
913913
AVG_ROW_LENGTH #ARL#
914914
DATA_LENGTH #DL#
@@ -1230,7 +1230,7 @@ TABLE_NAME time_zone
12301230
TABLE_TYPE BASE TABLE
12311231
ENGINE TMP_TABLE_ENGINE
12321232
VERSION 10
1233-
ROW_FORMAT Fixed
1233+
ROW_FORMAT Compact
12341234
TABLE_ROWS #TBLR#
12351235
AVG_ROW_LENGTH #ARL#
12361236
DATA_LENGTH #DL#
@@ -1253,7 +1253,7 @@ TABLE_NAME time_zone_leap_second
12531253
TABLE_TYPE BASE TABLE
12541254
ENGINE TMP_TABLE_ENGINE
12551255
VERSION 10
1256-
ROW_FORMAT Fixed
1256+
ROW_FORMAT Compact
12571257
TABLE_ROWS #TBLR#
12581258
AVG_ROW_LENGTH #ARL#
12591259
DATA_LENGTH #DL#
@@ -1276,7 +1276,7 @@ TABLE_NAME time_zone_name
12761276
TABLE_TYPE BASE TABLE
12771277
ENGINE TMP_TABLE_ENGINE
12781278
VERSION 10
1279-
ROW_FORMAT Fixed
1279+
ROW_FORMAT Compact
12801280
TABLE_ROWS #TBLR#
12811281
AVG_ROW_LENGTH #ARL#
12821282
DATA_LENGTH #DL#
@@ -1299,7 +1299,7 @@ TABLE_NAME time_zone_transition
12991299
TABLE_TYPE BASE TABLE
13001300
ENGINE TMP_TABLE_ENGINE
13011301
VERSION 10
1302-
ROW_FORMAT Fixed
1302+
ROW_FORMAT Compact
13031303
TABLE_ROWS #TBLR#
13041304
AVG_ROW_LENGTH #ARL#
13051305
DATA_LENGTH #DL#
@@ -1322,7 +1322,7 @@ TABLE_NAME time_zone_transition_type
13221322
TABLE_TYPE BASE TABLE
13231323
ENGINE TMP_TABLE_ENGINE
13241324
VERSION 10
1325-
ROW_FORMAT Fixed
1325+
ROW_FORMAT Compact
13261326
TABLE_ROWS #TBLR#
13271327
AVG_ROW_LENGTH #ARL#
13281328
DATA_LENGTH #DL#

0 commit comments

Comments
 (0)