mirror of
https://github.com/MariaDB/server.git
synced 2026-05-06 15:15:34 +02:00
Bug#33873: Fast ALTER TABLE doesn't work with multibyte character sets
The problem was that when comparing tables for a possible
fast alter table, the comparison was being performed using
the parsed information and not the final definition.
The solution is to use the possible final table layout to
compare if a fast alter is possible or not.
mysql-test/include/mix1.inc:
Disable test case for Bug 21704 as it hasn't been fixed.
mysql-test/r/alter_table.result:
Add test case result for Bug#33873
mysql-test/r/innodb_mysql.result:
Update test case result
mysql-test/t/alter_table.test:
Add test case for Bug#33873
sql/sql_table.cc:
Use updated (final) information to compare fields.
This commit is contained in:
parent
fab820e660
commit
5d237db6f6
5 changed files with 152 additions and 80 deletions
|
|
@ -1428,29 +1428,31 @@ DROP TABLE t1;
|
|||
# Bug#21704: Renaming column does not update FK definition.
|
||||
#
|
||||
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS t1;
|
||||
DROP TABLE IF EXISTS t2;
|
||||
--enable_warnings
|
||||
|
||||
CREATE TABLE t1(id INT PRIMARY KEY)
|
||||
ENGINE=innodb;
|
||||
|
||||
CREATE TABLE t2(
|
||||
t1_id INT PRIMARY KEY,
|
||||
CONSTRAINT fk1 FOREIGN KEY (t1_id) REFERENCES t1(id))
|
||||
ENGINE=innodb;
|
||||
|
||||
--echo
|
||||
|
||||
--disable_result_log
|
||||
--error ER_ERROR_ON_RENAME
|
||||
ALTER TABLE t1 CHANGE id id2 INT;
|
||||
--enable_result_log
|
||||
|
||||
--echo
|
||||
|
||||
DROP TABLE t2;
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# --disable_warnings
|
||||
# DROP TABLE IF EXISTS t1;
|
||||
# DROP TABLE IF EXISTS t2;
|
||||
# --enable_warnings
|
||||
#
|
||||
# CREATE TABLE t1(id INT PRIMARY KEY)
|
||||
# ENGINE=innodb;
|
||||
#
|
||||
# CREATE TABLE t2(
|
||||
# t1_id INT PRIMARY KEY,
|
||||
# CONSTRAINT fk1 FOREIGN KEY (t1_id) REFERENCES t1(id))
|
||||
# ENGINE=innodb;
|
||||
#
|
||||
# --echo
|
||||
#
|
||||
# --disable_result_log
|
||||
# --error ER_ERROR_ON_RENAME
|
||||
# ALTER TABLE t1 CHANGE id id2 INT;
|
||||
# --enable_result_log
|
||||
#
|
||||
# --echo
|
||||
#
|
||||
# DROP TABLE t2;
|
||||
# DROP TABLE t1;
|
||||
#
|
||||
|
||||
--echo End of 5.1 tests
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue