summaryrefslogtreecommitdiff
path: root/mysql-test/t/alter_table.test
diff options
context:
space:
mode:
authorGeorgi Kodinov <joro@sun.com>2009-12-18 14:00:30 +0200
committerGeorgi Kodinov <joro@sun.com>2009-12-18 14:00:30 +0200
commita21a0b47ca46212a528c4402e4b473fe51437422 (patch)
tree20e23e95bf1da48ebff84955fc69594f16a4132a /mysql-test/t/alter_table.test
parent172acc598007f250c10c629ace64ff23ed665740 (diff)
downloadmariadb-git-a21a0b47ca46212a528c4402e4b473fe51437422.tar.gz
Bug #31145: ALTER TABLE DROP COLUMN, ADD COLUMN crashes (linux) or
freezes (win) the server The check for equality was assuming the field object is always created. If it's not it was de-referencing a NULL pointer. Fixed to use the data in the create object instead.
Diffstat (limited to 'mysql-test/t/alter_table.test')
-rw-r--r--mysql-test/t/alter_table.test12
1 files changed, 12 insertions, 0 deletions
diff --git a/mysql-test/t/alter_table.test b/mysql-test/t/alter_table.test
index 5534aa0a234..4989a6c380c 100644
--- a/mysql-test/t/alter_table.test
+++ b/mysql-test/t/alter_table.test
@@ -1061,4 +1061,16 @@ ALTER TABLE t1 CHANGE COLUMN f1 f1_no_real_change TIMESTAMP NULL DEFAULT NULL;
--disable_info
DROP TABLE t1;
+
+--echo #
+--echo # Bug #31145: ALTER TABLE DROP COLUMN, ADD COLUMN crashes (linux)
+--echo # or freezes (win) the server
+--echo #
+
+CREATE TABLE t1 (a TEXT, id INT, b INT);
+ALTER TABLE t1 DROP COLUMN a, ADD COLUMN c TEXT FIRST;
+
+DROP TABLE t1;
+
+
--echo End of 5.1 tests