From f6eb9bc78483ea646d75f89b599051fb015f6e47 Mon Sep 17 00:00:00 2001
From: osku <Unknown>
Date: Mon, 12 Dec 2005 12:42:41 +0000
Subject: [PATCH] Port r95 and r96 from branches/5.0 to trunk:

Add tests for >1K keys on 32-bit platforms.

Clean up innodb_gis.test.
---
 mysql-test/innodb.result   | 13 +++++++++++++
 mysql-test/innodb.test     | 19 +++++++++++++++++++
 mysql-test/innodb_gis.test |  3 +--
 3 files changed, 33 insertions(+), 2 deletions(-)

diff --git a/mysql-test/innodb.result b/mysql-test/innodb.result
index 363bd5672b4..39098f1bab9 100644
--- a/mysql-test/innodb.result
+++ b/mysql-test/innodb.result
@@ -2862,3 +2862,16 @@ truncate t4;
 truncate t1;
 truncate t3;
 drop table t4,t3,t2,t1;
+create table t1 (a varchar(255) character set utf8,
+b varchar(255) character set utf8,
+c varchar(255) character set utf8,
+d varchar(255) character set utf8,
+key (a,b,c,d)) engine=innodb;
+drop table t1;
+create table t1 (a varchar(255) character set utf8,
+b varchar(255) character set utf8,
+c varchar(255) character set utf8,
+d varchar(255) character set utf8,
+e varchar(255) character set utf8,
+key (a,b,c,d,e)) engine=innodb;
+ERROR 42000: Specified key was too long; max key length is 3072 bytes
diff --git a/mysql-test/innodb.test b/mysql-test/innodb.test
index 9755d15fadc..f642ca29a35 100644
--- a/mysql-test/innodb.test
+++ b/mysql-test/innodb.test
@@ -1849,3 +1849,22 @@ truncate t1;
 truncate t3;
 
 drop table t4,t3,t2,t1;
+
+
+#
+# Test that we can create a large (>1K) key
+#
+create table t1 (a varchar(255) character set utf8,
+                 b varchar(255) character set utf8,
+                 c varchar(255) character set utf8,
+                 d varchar(255) character set utf8,
+                 key (a,b,c,d)) engine=innodb;
+drop table t1;
+--error ER_TOO_LONG_KEY
+create table t1 (a varchar(255) character set utf8,
+                 b varchar(255) character set utf8,
+                 c varchar(255) character set utf8,
+                 d varchar(255) character set utf8,
+                 e varchar(255) character set utf8,
+                 key (a,b,c,d,e)) engine=innodb;
+
diff --git a/mysql-test/innodb_gis.test b/mysql-test/innodb_gis.test
index c79e0278d16..142b526af92 100644
--- a/mysql-test/innodb_gis.test
+++ b/mysql-test/innodb_gis.test
@@ -1,4 +1,3 @@
-source include/have_geometry.inc;
--- source include/have_innodb.inc
+--source include/have_innodb.inc
 SET storage_engine=innodb;
 --source include/gis_generic.inc
-- 
2.30.9