summaryrefslogtreecommitdiff
path: root/mysql-test/t/key.test
diff options
context:
space:
mode:
authorjimw@mysql.com <>2005-06-02 10:00:36 -0700
committerjimw@mysql.com <>2005-06-02 10:00:36 -0700
commitd147e69bb756202d05243ccec48c220f896237af (patch)
tree8309f556a20c1a66cc32a1665fcfeae4683f0a01 /mysql-test/t/key.test
parentef9ef1f9581d2831ff3e962572f275b3d29b2261 (diff)
downloadmariadb-git-d147e69bb756202d05243ccec48c220f896237af.tar.gz
Additional tweak to fix for bug #10543, to prevent a change in
behavior when extending fields that were fully part of a multi-part key.
Diffstat (limited to 'mysql-test/t/key.test')
-rw-r--r--mysql-test/t/key.test13
1 files changed, 13 insertions, 0 deletions
diff --git a/mysql-test/t/key.test b/mysql-test/t/key.test
index af3509c8454..9db1523be51 100644
--- a/mysql-test/t/key.test
+++ b/mysql-test/t/key.test
@@ -324,3 +324,16 @@ alter table t1 add key (c1,c2,c1);
--error 1060
alter table t1 add key (c1,c1,c2);
drop table t1;
+
+#
+# If we use a partial field for a key that is actually the length of the
+# field, and we extend the field, we end up with a key that includes the
+# whole new length of the field.
+#
+create table t1 (a varchar(10), b varchar(10), key(a(10),b(10)));
+show create table t1;
+alter table t1 modify b varchar(20);
+show create table t1;
+alter table t1 modify a varchar(20);
+show create table t1;
+drop table t1;