From cdd6bc9bfeb1a82e7c7cfd8880f8e014ca5d9ff8 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 13 May 2005 23:08:29 +0300 Subject: Fixed wrong buffer usage for auto-increment key with blob part that caused CHECK TABLE to report that the table was wrong. (Bug #10045) myisam/mi_key.c: Fixed wrong buffer usage for auto-increment key with blob part that caused CHECK TABLE to report that the table was wrong. (Bug #10045) mysql-test/r/auto_increment.result: New test case mysql-test/t/auto_increment.test: New test case --- mysql-test/r/auto_increment.result | 14 ++++++++++++++ mysql-test/t/auto_increment.test | 12 ++++++++++++ 2 files changed, 26 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/r/auto_increment.result b/mysql-test/r/auto_increment.result index 2d6b058d9c5..9345c029127 100644 --- a/mysql-test/r/auto_increment.result +++ b/mysql-test/r/auto_increment.result @@ -131,3 +131,17 @@ a 1 2 drop table t1; +CREATE TABLE t1 ( a INT AUTO_INCREMENT, b BLOB, PRIMARY KEY (a,b(10))); +INSERT INTO t1 (b) VALUES ('aaaa'); +CHECK TABLE t1; +Table Op Msg_type Msg_text +test.t1 check status OK +INSERT INTO t1 (b) VALUES (''); +CHECK TABLE t1; +Table Op Msg_type Msg_text +test.t1 check status OK +INSERT INTO t1 (b) VALUES ('bbbb'); +CHECK TABLE t1; +Table Op Msg_type Msg_text +test.t1 check status OK +DROP TABLE IF EXISTS t1; diff --git a/mysql-test/t/auto_increment.test b/mysql-test/t/auto_increment.test index c26983b5eec..e699415a838 100644 --- a/mysql-test/t/auto_increment.test +++ b/mysql-test/t/auto_increment.test @@ -89,3 +89,15 @@ select last_insert_id(); insert into t1 values (NULL); select * from t1; drop table t1; + +# +# BUG #10045: Problem with composite AUTO_INCREMENT + BLOB key + +CREATE TABLE t1 ( a INT AUTO_INCREMENT, b BLOB, PRIMARY KEY (a,b(10))); +INSERT INTO t1 (b) VALUES ('aaaa'); +CHECK TABLE t1; +INSERT INTO t1 (b) VALUES (''); +CHECK TABLE t1; +INSERT INTO t1 (b) VALUES ('bbbb'); +CHECK TABLE t1; +DROP TABLE IF EXISTS t1; -- cgit v1.2.1