From 61578756c215247580be96bbd1f930d69ad639e8 Mon Sep 17 00:00:00 2001 From: Michael Widenius Date: Mon, 13 Jun 2011 14:07:44 +0300 Subject: [PATCH 1/2] Added test case to show that we get a warning from CHECK TABLE if we force auto_increment value to 0 --- mysql-test/suite/maria/r/maria.result | 11 +++++++++++ mysql-test/suite/maria/t/maria.test | 10 ++++++++++ 2 files changed, 21 insertions(+) diff --git a/mysql-test/suite/maria/r/maria.result b/mysql-test/suite/maria/r/maria.result index e0f1175d845..077aaf074c5 100644 --- a/mysql-test/suite/maria/r/maria.result +++ b/mysql-test/suite/maria/r/maria.result @@ -22,6 +22,17 @@ CHECK TABLE t1; Table Op Msg_type Msg_text test.t1 check status OK drop table t1; +create table t1 (a int primary key auto_increment) engine=aria; +insert into t1 values (1); +update t1 set a=0 where a=1; +check table t1; +Table Op Msg_type Msg_text +test.t1 check warning Found row where the auto_increment column has the value 0 +test.t1 check status OK +select * from t1; +a +0 +drop table t1; create table t1 (a tinyint not null auto_increment, b blob not null, primary key (a)); check table t1; Table Op Msg_type Msg_text diff --git a/mysql-test/suite/maria/t/maria.test b/mysql-test/suite/maria/t/maria.test index e23821b8be9..40738525372 100644 --- a/mysql-test/suite/maria/t/maria.test +++ b/mysql-test/suite/maria/t/maria.test @@ -41,6 +41,16 @@ INSERT INTO t1 VALUES ('WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW CHECK TABLE t1; drop table t1; +# +# Test auto_increment warning +# +create table t1 (a int primary key auto_increment) engine=aria; +insert into t1 values (1); +update t1 set a=0 where a=1; +check table t1; +select * from t1; +drop table t1; + # # Test problem with rows that are 65517-65520 bytes long # From 6b2438c017c23fa4bd92b17ec07bbeb8011862b9 Mon Sep 17 00:00:00 2001 From: Michael Widenius Date: Mon, 27 Jun 2011 12:45:03 +0300 Subject: [PATCH 2/2] Added reading of client-server my.cnf tag --- sql/mysqld.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 7db2eda0277..bdd74930076 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -3265,6 +3265,7 @@ const char *load_default_groups[]= { #endif "mysqld", "server", MYSQL_BASE_VERSION, "mariadb", MARIADB_BASE_VERSION, +"client-server", 0, 0}; #if defined(__WIN__) && !defined(EMBEDDED_LIBRARY)