1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +03:00

MDEV-19524 Server crashes in Bitmap<64u>::is_clear_all / Field_longstr::csinfo_change_allows_instant_alter

compare_keys_but_name(): reorder checks to ensure that
new_field->field != NULL inside Field::is_equal()
This commit is contained in:
Eugene Kosov
2019-05-20 18:50:12 +03:00
committed by Alexander Barkov
parent dafe41edea
commit fae1319450
3 changed files with 29 additions and 11 deletions

View File

@@ -1820,3 +1820,10 @@ HEX(a)
61
62
DROP TABLE t1;
#
# MDEV-19524 Server crashes in Bitmap<64u>::is_clear_all / Field_longstr::csinfo_change_allows_instant_alter
#
CREATE TABLE t1 (a VARCHAR(1), UNIQUE(a)) ENGINE=InnoDB;
ALTER TABLE t1 MODIFY a INT, ADD b INT, ADD UNIQUE (b), ALGORITHM=INSTANT;
ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
DROP TABLE t1;

View File

@@ -1,5 +1,4 @@
--source include/innodb_row_format.inc
#--source include/innodb_page_size.inc
--let $row_format= `SELECT @@GLOBAL.innodb_default_row_format`
set names utf8;
@@ -593,3 +592,15 @@ ALTER TABLE t1 ALGORITHM=INSTANT, MODIFY a VARCHAR(10) CHARACTER SET latin1 COLL
ALTER IGNORE TABLE t1 MODIFY a VARCHAR(10) CHARACTER SET latin1 COLLATE latin1_general_ci;
SELECT HEX(a) FROM t1;
DROP TABLE t1;
--echo #
--echo # MDEV-19524 Server crashes in Bitmap<64u>::is_clear_all / Field_longstr::csinfo_change_allows_instant_alter
--echo #
CREATE TABLE t1 (a VARCHAR(1), UNIQUE(a)) ENGINE=InnoDB;
--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
ALTER TABLE t1 MODIFY a INT, ADD b INT, ADD UNIQUE (b), ALGORITHM=INSTANT;
DROP TABLE t1;