From 0036ab8c9737ac3c75d191b313b6487ac2f80f66 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 18 Jul 2006 09:33:40 -0400 Subject: [PATCH] BUG#20340: NODEGROUP in information_schema.partitions integer => error in error log when "default is put into it NODEGROUP string to cater for "default" in it mysql-test/r/ndb_partition_key.result: New test case mysql-test/t/ndb_partition_key.test: New test case sql/sql_show.cc: NODEGROUP string to cater for "default" in it --- mysql-test/r/ndb_partition_key.result | 8 +++++++- mysql-test/t/ndb_partition_key.test | 5 ++++- sql/sql_show.cc | 2 +- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/mysql-test/r/ndb_partition_key.result b/mysql-test/r/ndb_partition_key.result index fd793c4c2c7..e478c23ec00 100644 --- a/mysql-test/r/ndb_partition_key.result +++ b/mysql-test/r/ndb_partition_key.result @@ -194,6 +194,12 @@ c2 TEXT NOT NULL, c3 INT NOT NULL, PRIMARY KEY(c1,c3)) ENGINE=NDB -PARTITION BY KEY(c3); +PARTITION BY KEY(c3) +(PARTITION p0 NODEGROUP 0, PARTITION p1 NODEGROUP 0); ALTER TABLE t1 ADD COLUMN c4 INT AFTER c1; +SELECT NODEGROUP,PARTITION_NAME FROM information_schema.partitions WHERE +table_name = "t1"; +NODEGROUP PARTITION_NAME +0 p0 +0 p1 DROP TABLE t1; diff --git a/mysql-test/t/ndb_partition_key.test b/mysql-test/t/ndb_partition_key.test index fb0581eb6f6..d8c1b61b94f 100644 --- a/mysql-test/t/ndb_partition_key.test +++ b/mysql-test/t/ndb_partition_key.test @@ -192,7 +192,10 @@ CREATE TABLE t1 ( c3 INT NOT NULL, PRIMARY KEY(c1,c3)) ENGINE=NDB - PARTITION BY KEY(c3); + PARTITION BY KEY(c3) + (PARTITION p0 NODEGROUP 0, PARTITION p1 NODEGROUP 0); ALTER TABLE t1 ADD COLUMN c4 INT AFTER c1; +SELECT NODEGROUP,PARTITION_NAME FROM information_schema.partitions WHERE +table_name = "t1"; DROP TABLE t1; diff --git a/sql/sql_show.cc b/sql/sql_show.cc index fa95e5e15bf..1a7547a5348 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -5482,7 +5482,7 @@ ST_FIELD_INFO partitions_fields_info[]= {"CHECK_TIME", 0, MYSQL_TYPE_TIMESTAMP, 0, 1, 0}, {"CHECKSUM", 21 , MYSQL_TYPE_LONG, 0, 1, 0}, {"PARTITION_COMMENT", 80, MYSQL_TYPE_STRING, 0, 0, 0}, - {"NODEGROUP", 21 , MYSQL_TYPE_LONG, 0, 0, 0}, + {"NODEGROUP", 12 , MYSQL_TYPE_STRING, 0, 0, 0}, {"TABLESPACE_NAME", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, {0, 0, MYSQL_TYPE_STRING, 0, 0, 0} };