1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198
|
-- source include/mysql_upgrade_preparation.inc
-- source include/have_innodb.inc
call mtr.add_suppression("Table rebuild required");
let $MYSQLD_DATADIR= `select @@datadir`;
--echo #
--echo # Upgrade from Maria-5.3.13:
--echo # Checking utf8_croatian_ci in a VARCHAR column
--echo #
--echo # Copying maria050313_utf8_croatian_ci.* to MYSQLD_DATADIR
--copy_file std_data/ctype_upgrade/maria050313_utf8_croatian_ci.frm $MYSQLD_DATADIR/test/maria050313_utf8_croatian_ci.frm
--copy_file std_data/ctype_upgrade/maria050313_utf8_croatian_ci.MYD $MYSQLD_DATADIR/test/maria050313_utf8_croatian_ci.MYD
--copy_file std_data/ctype_upgrade/maria050313_utf8_croatian_ci.MYI $MYSQLD_DATADIR/test/maria050313_utf8_croatian_ci.MYI
# Following test should show that table is corrupted
CHECK TABLE maria050313_utf8_croatian_ci FOR UPGRADE;
--error ER_TABLE_NEEDS_REBUILD
SHOW CREATE TABLE maria050313_utf8_croatian_ci;
# Check that REPAIR fixes the table
REPAIR TABLE maria050313_utf8_croatian_ci;
CHECK TABLE maria050313_utf8_croatian_ci FOR UPGRADE;
SHOW CREATE TABLE maria050313_utf8_croatian_ci;
SELECT count(*) FROM maria050313_utf8_croatian_ci;
DROP TABLE maria050313_utf8_croatian_ci;
--echo # Copying maria050313_utf8_croatian_ci.* to MYSQLD_DATADIR
--copy_file std_data/ctype_upgrade/maria050313_utf8_croatian_ci.frm $MYSQLD_DATADIR/test/maria050313_utf8_croatian_ci.frm
--copy_file std_data/ctype_upgrade/maria050313_utf8_croatian_ci.MYD $MYSQLD_DATADIR/test/maria050313_utf8_croatian_ci.MYD
--copy_file std_data/ctype_upgrade/maria050313_utf8_croatian_ci.MYI $MYSQLD_DATADIR/test/maria050313_utf8_croatian_ci.MYI
ALTER TABLE maria050313_utf8_croatian_ci FORCE;
SHOW CREATE TABLE maria050313_utf8_croatian_ci;
SELECT GROUP_CONCAT(a ORDER BY BINARY a) FROM maria050313_utf8_croatian_ci GROUP BY a;
DROP TABLE maria050313_utf8_croatian_ci;
--echo #
--echo # Upgrade from Maria-5.3.13:
--echo # Checking ucs2_croatian_ci in the table default collation
--echo #
--echo # Copying maria050313_ucs2_croatian_ci.* to MYSQLD_DATADIR
--copy_file std_data/ctype_upgrade/maria050313_ucs2_croatian_ci_def.frm $MYSQLD_DATADIR/test/maria050313_ucs2_croatian_ci_def.frm
--copy_file std_data/ctype_upgrade/maria050313_ucs2_croatian_ci_def.MYD $MYSQLD_DATADIR/test/maria050313_ucs2_croatian_ci_def.MYD
--copy_file std_data/ctype_upgrade/maria050313_ucs2_croatian_ci_def.MYI $MYSQLD_DATADIR/test/maria050313_ucs2_croatian_ci_def.MYI
CHECK TABLE maria050313_ucs2_croatian_ci_def FOR UPGRADE;
--error ER_TABLE_NEEDS_REBUILD
SELECT count(*) FROM maria050313_ucs2_croatian_ci_def;
REPAIR TABLE maria050313_ucs2_croatian_ci_def;
SHOW CREATE TABLE maria050313_ucs2_croatian_ci_def;
DROP TABLE maria050313_ucs2_croatian_ci_def;
--echo # Copying maria050313_ucs2_croatian_ci.* to MYSQLD_DATADIR
--copy_file std_data/ctype_upgrade/maria050313_ucs2_croatian_ci_def.frm $MYSQLD_DATADIR/test/maria050313_ucs2_croatian_ci_def.frm
--copy_file std_data/ctype_upgrade/maria050313_ucs2_croatian_ci_def.MYD $MYSQLD_DATADIR/test/maria050313_ucs2_croatian_ci_def.MYD
--copy_file std_data/ctype_upgrade/maria050313_ucs2_croatian_ci_def.MYI $MYSQLD_DATADIR/test/maria050313_ucs2_croatian_ci_def.MYI
CHECK TABLE maria050313_ucs2_croatian_ci_def;
REPAIR TABLE maria050313_ucs2_croatian_ci_def;
CHECK TABLE maria050313_ucs2_croatian_ci_def;
SHOW CREATE TABLE maria050313_ucs2_croatian_ci_def;
SELECT * FROM maria050313_ucs2_croatian_ci_def ORDER BY a;
DROP TABLE maria050313_ucs2_croatian_ci_def;
--echo #
--echo # Upgrade from Maria-5.5.33
--echo # Checking utf8_croatian_ci, utf8mb4_croatian_ci, ucs2_croatian_ci,
--echo # utf16_croatian_ci, utf32_croatian_ci
--echo #
--echo # Copying maria050533_xxx_croatian_ci.* to MYSQLD_DATADIR
--copy_file std_data/ctype_upgrade/maria050533_xxx_croatian_ci.frm $MYSQLD_DATADIR/test/maria050533_xxx_croatian_ci.frm
--copy_file std_data/ctype_upgrade/maria050533_xxx_croatian_ci.MYD $MYSQLD_DATADIR/test/maria050533_xxx_croatian_ci.MYD
--copy_file std_data/ctype_upgrade/maria050533_xxx_croatian_ci.MYI $MYSQLD_DATADIR/test/maria050533_xxx_croatian_ci.MYI
CHECK TABLE maria050533_xxx_croatian_ci FOR UPGRADE;
REPAIR TABLE maria050533_xxx_croatian_ci;
SHOW CREATE TABLE maria050533_xxx_croatian_ci;
SELECT count(*) FROM maria050533_xxx_croatian_ci;
DROP TABLE maria050533_xxx_croatian_ci;
--echo # Copying maria050533_xxx_croatian_ci.* to MYSQLD_DATADIR
--copy_file std_data/ctype_upgrade/maria050533_xxx_croatian_ci.frm $MYSQLD_DATADIR/test/maria050533_xxx_croatian_ci.frm
--copy_file std_data/ctype_upgrade/maria050533_xxx_croatian_ci.MYD $MYSQLD_DATADIR/test/maria050533_xxx_croatian_ci.MYD
--copy_file std_data/ctype_upgrade/maria050533_xxx_croatian_ci.MYI $MYSQLD_DATADIR/test/maria050533_xxx_croatian_ci.MYI
ALTER TABLE maria050533_xxx_croatian_ci FORCE;
SHOW CREATE TABLE maria050533_xxx_croatian_ci;
SELECT GROUP_CONCAT(a ORDER BY BINARY a) FROM maria050533_xxx_croatian_ci GROUP BY a;
SELECT GROUP_CONCAT(b ORDER BY BINARY b) FROM maria050533_xxx_croatian_ci GROUP BY b;
SELECT GROUP_CONCAT(c ORDER BY BINARY c) FROM maria050533_xxx_croatian_ci GROUP BY c;
SELECT GROUP_CONCAT(d ORDER BY BINARY d) FROM maria050533_xxx_croatian_ci GROUP BY d;
SELECT GROUP_CONCAT(e ORDER BY BINARY e) FROM maria050533_xxx_croatian_ci GROUP BY e;
DROP TABLE maria050533_xxx_croatian_ci;
--echo #
--echo # Upgrade from Maria-10.0.4
--echo # Checking utf8_croatian_ci, utf8mb4_croatian_ci, ucs2_croatian_ci,
--echo # utf16_croatian_ci, utf32_croatian_ci
--echo #
--echo # Copying maria100004_xxx_croatian_ci.* to MYSQLD_DATADIR
--copy_file std_data/ctype_upgrade/maria100004_xxx_croatian_ci.frm $MYSQLD_DATADIR/test/maria100004_xxx_croatian_ci.frm
--copy_file std_data/ctype_upgrade/maria100004_xxx_croatian_ci.MYD $MYSQLD_DATADIR/test/maria100004_xxx_croatian_ci.MYD
--copy_file std_data/ctype_upgrade/maria100004_xxx_croatian_ci.MYI $MYSQLD_DATADIR/test/maria100004_xxx_croatian_ci.MYI
CHECK TABLE maria100004_xxx_croatian_ci FOR UPGRADE;
--error ER_TABLE_NEEDS_REBUILD
SELECT count(*) FROM maria100004_xxx_croatian_ci;
REPAIR TABLE maria100004_xxx_croatian_ci;
SHOW CREATE TABLE maria100004_xxx_croatian_ci;
DROP TABLE maria100004_xxx_croatian_ci;
--echo # Copying maria100004_xxx_croatian_ci.* to MYSQLD_DATADIR
--copy_file std_data/ctype_upgrade/maria100004_xxx_croatian_ci.frm $MYSQLD_DATADIR/test/maria100004_xxx_croatian_ci.frm
--copy_file std_data/ctype_upgrade/maria100004_xxx_croatian_ci.MYD $MYSQLD_DATADIR/test/maria100004_xxx_croatian_ci.MYD
--copy_file std_data/ctype_upgrade/maria100004_xxx_croatian_ci.MYI $MYSQLD_DATADIR/test/maria100004_xxx_croatian_ci.MYI
ALTER TABLE maria100004_xxx_croatian_ci FORCE;
SHOW CREATE TABLE maria100004_xxx_croatian_ci;
SELECT GROUP_CONCAT(a ORDER BY BINARY a) FROM maria100004_xxx_croatian_ci GROUP BY a;
SELECT GROUP_CONCAT(b ORDER BY BINARY b) FROM maria100004_xxx_croatian_ci GROUP BY b;
SELECT GROUP_CONCAT(c ORDER BY BINARY c) FROM maria100004_xxx_croatian_ci GROUP BY c;
SELECT GROUP_CONCAT(d ORDER BY BINARY d) FROM maria100004_xxx_croatian_ci GROUP BY d;
SELECT GROUP_CONCAT(e ORDER BY BINARY e) FROM maria100004_xxx_croatian_ci GROUP BY e;
DROP TABLE maria100004_xxx_croatian_ci;
--echo #
--echo # Upgrade from MySQL-5.6.14
--echo # Checking utf8_croatian_ci, utf8mb4_croatian_ci, ucs2_croatian_ci,
--echo # utf16_croatian_ci, utf32_croatian_ci
--echo #
--echo # Copying mysql050614_xxx_croatian_ci.* to MYSQLD_DATADIR
--copy_file std_data/ctype_upgrade/mysql050614_xxx_croatian_ci.frm $MYSQLD_DATADIR/test/mysql050614_xxx_croatian_ci.frm
--copy_file std_data/ctype_upgrade/mysql050614_xxx_croatian_ci.MYD $MYSQLD_DATADIR/test/mysql050614_xxx_croatian_ci.MYD
--copy_file std_data/ctype_upgrade/mysql050614_xxx_croatian_ci.MYI $MYSQLD_DATADIR/test/mysql050614_xxx_croatian_ci.MYI
CHECK TABLE mysql050614_xxx_croatian_ci FOR UPGRADE;
SHOW CREATE TABLE mysql050614_xxx_croatian_ci;
SELECT GROUP_CONCAT(a ORDER BY BINARY a) FROM mysql050614_xxx_croatian_ci GROUP BY a;
SELECT GROUP_CONCAT(b ORDER BY BINARY b) FROM mysql050614_xxx_croatian_ci GROUP BY b;
SELECT GROUP_CONCAT(c ORDER BY BINARY c) FROM mysql050614_xxx_croatian_ci GROUP BY c;
SELECT GROUP_CONCAT(d ORDER BY BINARY d) FROM mysql050614_xxx_croatian_ci GROUP BY d;
SELECT GROUP_CONCAT(e ORDER BY BINARY e) FROM mysql050614_xxx_croatian_ci GROUP BY e;
DROP TABLE mysql050614_xxx_croatian_ci;
--echo #
--echo # Checking mysql_upgrade
--echo #
--copy_file std_data/ctype_upgrade/maria050313_utf8_croatian_ci.frm $MYSQLD_DATADIR/test/maria050313_utf8_croatian_ci.frm
--copy_file std_data/ctype_upgrade/maria050313_utf8_croatian_ci.MYD $MYSQLD_DATADIR/test/maria050313_utf8_croatian_ci.MYD
--copy_file std_data/ctype_upgrade/maria050313_utf8_croatian_ci.MYI $MYSQLD_DATADIR/test/maria050313_utf8_croatian_ci.MYI
--copy_file std_data/ctype_upgrade/maria050313_ucs2_croatian_ci_def.frm $MYSQLD_DATADIR/test/maria050313_ucs2_croatian_ci_def.frm
--copy_file std_data/ctype_upgrade/maria050313_ucs2_croatian_ci_def.MYD $MYSQLD_DATADIR/test/maria050313_ucs2_croatian_ci_def.MYD
--copy_file std_data/ctype_upgrade/maria050313_ucs2_croatian_ci_def.MYI $MYSQLD_DATADIR/test/maria050313_ucs2_croatian_ci_def.MYI
--copy_file std_data/ctype_upgrade/maria050533_xxx_croatian_ci.frm $MYSQLD_DATADIR/test/maria050533_xxx_croatian_ci.frm
--copy_file std_data/ctype_upgrade/maria050533_xxx_croatian_ci.MYD $MYSQLD_DATADIR/test/maria050533_xxx_croatian_ci.MYD
--copy_file std_data/ctype_upgrade/maria050533_xxx_croatian_ci.MYI $MYSQLD_DATADIR/test/maria050533_xxx_croatian_ci.MYI
--copy_file std_data/ctype_upgrade/maria100004_xxx_croatian_ci.frm $MYSQLD_DATADIR/test/maria100004_xxx_croatian_ci.frm
--copy_file std_data/ctype_upgrade/maria100004_xxx_croatian_ci.MYD $MYSQLD_DATADIR/test/maria100004_xxx_croatian_ci.MYD
--copy_file std_data/ctype_upgrade/maria100004_xxx_croatian_ci.MYI $MYSQLD_DATADIR/test/maria100004_xxx_croatian_ci.MYI
--copy_file std_data/ctype_upgrade/mysql050614_xxx_croatian_ci.frm $MYSQLD_DATADIR/test/mysql050614_xxx_croatian_ci.frm
--copy_file std_data/ctype_upgrade/mysql050614_xxx_croatian_ci.MYD $MYSQLD_DATADIR/test/mysql050614_xxx_croatian_ci.MYD
--copy_file std_data/ctype_upgrade/mysql050614_xxx_croatian_ci.MYI $MYSQLD_DATADIR/test/mysql050614_xxx_croatian_ci.MYI
--echo # Running mysql_upgrade
--exec $MYSQL_UPGRADE 2>&1
--echo # Running mysql_upgrade for the second time
--echo # This should report OK for all tables
--exec $MYSQL_UPGRADE --force 2>&1
SHOW CREATE TABLE maria050313_ucs2_croatian_ci_def;
SELECT * FROM maria050313_ucs2_croatian_ci_def ORDER BY a;
SHOW CREATE TABLE maria050313_utf8_croatian_ci;
SELECT GROUP_CONCAT(a ORDER BY BINARY a) FROM maria050313_utf8_croatian_ci GROUP BY a;
SHOW CREATE TABLE maria050533_xxx_croatian_ci;
SELECT GROUP_CONCAT(a ORDER BY BINARY a) FROM maria050533_xxx_croatian_ci GROUP BY a;
SHOW CREATE TABLE maria100004_xxx_croatian_ci;
SELECT GROUP_CONCAT(a ORDER BY BINARY a) FROM maria100004_xxx_croatian_ci GROUP BY a;
SHOW CREATE TABLE mysql050614_xxx_croatian_ci;
SELECT GROUP_CONCAT(a ORDER BY BINARY a) FROM mysql050614_xxx_croatian_ci GROUP BY a;
DROP TABLE maria050313_ucs2_croatian_ci_def;
DROP TABLE maria050313_utf8_croatian_ci;
DROP TABLE maria050533_xxx_croatian_ci;
DROP TABLE maria100004_xxx_croatian_ci;
DROP TABLE mysql050614_xxx_croatian_ci;
|