List:Commits« Previous MessageNext Message »
From:Jonathan Miller Date:August 7 2007 5:37pm
Subject:bk commit into 5.1 tree (jmiller:1.2605)
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of ndbdev. When ndbdev does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet@stripped, 2007-08-07 19:37:07+02:00, jmiller@stripped +2 -0
  ndb_alter_table_online.result, ndb_alter_table_online.test:
    Updated mysql-test cases for ndb add column online

  mysql-test/r/ndb_alter_table_online.result@stripped, 2007-08-07 19:36:54+02:00, jmiller@stripped +330 -7
    Updated mysql-test cases for ndb add column online

  mysql-test/t/ndb_alter_table_online.test@stripped, 2007-08-07 19:29:32+02:00, jmiller@stripped +337 -6
    Updated mysql-test cases for ndb add column online

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	jmiller
# Host:	ndb08.mysql.com
# Root:	/data1/mysql-5.1-telco-6.2

--- 1.3/mysql-test/r/ndb_alter_table_online.result	2007-08-07 19:37:19 +02:00
+++ 1.4/mysql-test/r/ndb_alter_table_online.result	2007-08-07 19:37:19 +02:00
@@ -19,14 +19,337 @@
 1	a	NULL
 2	a	1
 DROP TABLE t1;
-CREATE TABLE t1 (a INT UNSIGNED KEY, b INT COLUMN_FORMAT DYNAMIC) ENGINE NDB;
-INSERT INTO t1 values (1,1);
+*******************************
+* Alter Table online add column
+*******************************
+* Add column c as nullable INT
+*******************************
+CREATE TABLE t1 (a INT UNSIGNED  AUTO_INCREMENT KEY, b INT DEFAULT 2 COLUMN_FORMAT DYNAMIC) ENGINE NDB;
 ALTER TABLE t1 ADD c INT;
 Warnings:
 Warning	1466	Converted FIXED field to DYNAMIC to enable on-line ADD COLUMN
-INSERT INTO t1 values (2,1,1);
-SELECT * FROM t1 ORDER BY a;
-a	b	c
-1	1	NULL
-2	1	1
+-- t1 --
+Version: 16777219
+Fragment type: 5
+K Value: 6
+Min load factor: 78
+Max load factor: 80
+Temporary table: no
+Number of attributes: 3
+Number of primary keys: 1
+Length of frm data: 264
+Row Checksum: 1
+Row GCI: 1
+SingleUserMode: 0
+ForceVarPart: 1
+TableStatus: Retrieved
+-- Attributes -- 
+a Unsigned PRIMARY KEY DISTRIBUTION KEY AT=FIXED ST=MEMORY AUTO_INCR
+b Int NULL AT=FIXED ST=MEMORY DYNAMIC
+c Int NULL AT=FIXED ST=MEMORY DYNAMIC
+
+-- Indexes -- 
+PRIMARY KEY(a) - UniqueHashIndex
+PRIMARY(a) - OrderedIndex
+
+
+NDBT_ProgramExit: 0 - OK
+
+SELECT COUNT(*) FROM t1 WHERE c IS NULL;
+COUNT(*)
+5
+CREATE TABLE t2 (a INT UNSIGNED  AUTO_INCREMENT KEY, b INT DEFAULT 2 COLUMN_FORMAT DYNAMIC) ENGINE NDB;
+*******************************
+* Add column c as nullable FLOAT
+*******************************
+CREATE TABLE t3 (a INT UNSIGNED  AUTO_INCREMENT KEY, b INT DEFAULT 2 COLUMN_FORMAT DYNAMIC) ENGINE NDB;
+ALTER TABLE t3 ADD c FLOAT;
+Warnings:
+Warning	1466	Converted FIXED field to DYNAMIC to enable on-line ADD COLUMN
+-- t3 --
+Version: 16777217
+Fragment type: 5
+K Value: 6
+Min load factor: 78
+Max load factor: 80
+Temporary table: no
+Number of attributes: 3
+Number of primary keys: 1
+Length of frm data: 271
+Row Checksum: 1
+Row GCI: 1
+SingleUserMode: 0
+ForceVarPart: 1
+TableStatus: Retrieved
+-- Attributes -- 
+a Unsigned PRIMARY KEY DISTRIBUTION KEY AT=FIXED ST=MEMORY AUTO_INCR
+b Int NULL AT=FIXED ST=MEMORY DYNAMIC
+c Float NULL AT=FIXED ST=MEMORY DYNAMIC
+
+-- Indexes -- 
+PRIMARY KEY(a) - UniqueHashIndex
+PRIMARY(a) - OrderedIndex
+
+
+NDBT_ProgramExit: 0 - OK
+
+SELECT COUNT(*) FROM t3 WHERE c IS NULL;
+COUNT(*)
+5
+*******************************
+* Add column c as nullable DOUBLE
+*******************************
+CREATE TABLE t4 (a INT UNSIGNED  AUTO_INCREMENT KEY, b INT DEFAULT 2 COLUMN_FORMAT DYNAMIC) ENGINE NDB;
+ALTER TABLE t4 ADD c DOUBLE UNSIGNED;
+Warnings:
+Warning	1466	Converted FIXED field to DYNAMIC to enable on-line ADD COLUMN
+-- t4 --
+Version: 16777217
+Fragment type: 5
+K Value: 6
+Min load factor: 78
+Max load factor: 80
+Temporary table: no
+Number of attributes: 3
+Number of primary keys: 1
+Length of frm data: 273
+Row Checksum: 1
+Row GCI: 1
+SingleUserMode: 0
+ForceVarPart: 1
+TableStatus: Retrieved
+-- Attributes -- 
+a Unsigned PRIMARY KEY DISTRIBUTION KEY AT=FIXED ST=MEMORY AUTO_INCR
+b Int NULL AT=FIXED ST=MEMORY DYNAMIC
+c Double NULL AT=FIXED ST=MEMORY DYNAMIC
+
+-- Indexes -- 
+PRIMARY KEY(a) - UniqueHashIndex
+PRIMARY(a) - OrderedIndex
+
+
+NDBT_ProgramExit: 0 - OK
+
+SELECT COUNT(*) FROM t4 WHERE c IS NULL;
+COUNT(*)
+5
+*******************************
+* Add column c as nullable DECIMAL
+*******************************
+CREATE TABLE t5 (a INT UNSIGNED  AUTO_INCREMENT KEY, b INT DEFAULT 2 COLUMN_FORMAT DYNAMIC) ENGINE NDB;
+ALTER TABLE t5 ADD c DECIMAL(5,2);
+Warnings:
+Warning	1466	Converted FIXED field to DYNAMIC to enable on-line ADD COLUMN
+-- t5 --
+Version: 16777217
+Fragment type: 5
+K Value: 6
+Min load factor: 78
+Max load factor: 80
+Temporary table: no
+Number of attributes: 3
+Number of primary keys: 1
+Length of frm data: 275
+Row Checksum: 1
+Row GCI: 1
+SingleUserMode: 0
+ForceVarPart: 1
+TableStatus: Retrieved
+-- Attributes -- 
+a Unsigned PRIMARY KEY DISTRIBUTION KEY AT=FIXED ST=MEMORY AUTO_INCR
+b Int NULL AT=FIXED ST=MEMORY DYNAMIC
+c Decimal(5,2) NULL AT=FIXED ST=MEMORY DYNAMIC
+
+-- Indexes -- 
+PRIMARY KEY(a) - UniqueHashIndex
+PRIMARY(a) - OrderedIndex
+
+
+NDBT_ProgramExit: 0 - OK
+
+SELECT COUNT(*) FROM t5 WHERE c IS NULL;
+COUNT(*)
+5
+*******************************
+* Add column c as nullable DATETIME
+*******************************
+CREATE TABLE t6 (a INT UNSIGNED  AUTO_INCREMENT KEY, b INT DEFAULT 2 COLUMN_FORMAT DYNAMIC) ENGINE NDB;
+ALTER TABLE t6 ADD c DATETIME;
+Warnings:
+Warning	1466	Converted FIXED field to DYNAMIC to enable on-line ADD COLUMN
+-- t6 --
+Version: 16777217
+Fragment type: 5
+K Value: 6
+Min load factor: 78
+Max load factor: 80
+Temporary table: no
+Number of attributes: 3
+Number of primary keys: 1
+Length of frm data: 270
+Row Checksum: 1
+Row GCI: 1
+SingleUserMode: 0
+ForceVarPart: 1
+TableStatus: Retrieved
+-- Attributes -- 
+a Unsigned PRIMARY KEY DISTRIBUTION KEY AT=FIXED ST=MEMORY AUTO_INCR
+b Int NULL AT=FIXED ST=MEMORY DYNAMIC
+c Datetime NULL AT=FIXED ST=MEMORY DYNAMIC
+
+-- Indexes -- 
+PRIMARY KEY(a) - UniqueHashIndex
+PRIMARY(a) - OrderedIndex
+
+
+NDBT_ProgramExit: 0 - OK
+
+SELECT COUNT(*) FROM t6 WHERE c IS NULL;
+COUNT(*)
+5
+*******************************
+* Add column c as nullable BINARY
+*******************************
+CREATE TABLE t7 (a INT UNSIGNED  AUTO_INCREMENT KEY, b INT DEFAULT 2 COLUMN_FORMAT DYNAMIC) ENGINE NDB;
+ALTER TABLE t7 ADD c BINARY(4);
+Warnings:
+Warning	1466	Converted FIXED field to DYNAMIC to enable on-line ADD COLUMN
+-- t7 --
+Version: 16777217
+Fragment type: 5
+K Value: 6
+Min load factor: 78
+Max load factor: 80
+Temporary table: no
+Number of attributes: 3
+Number of primary keys: 1
+Length of frm data: 268
+Row Checksum: 1
+Row GCI: 1
+SingleUserMode: 0
+ForceVarPart: 1
+TableStatus: Retrieved
+-- Attributes -- 
+a Unsigned PRIMARY KEY DISTRIBUTION KEY AT=FIXED ST=MEMORY AUTO_INCR
+b Int NULL AT=FIXED ST=MEMORY DYNAMIC
+c Binary(4) NULL AT=FIXED ST=MEMORY DYNAMIC
+
+-- Indexes -- 
+PRIMARY KEY(a) - UniqueHashIndex
+PRIMARY(a) - OrderedIndex
+
+
+NDBT_ProgramExit: 0 - OK
+
+SELECT COUNT(*) FROM t7 WHERE c IS NULL;
+COUNT(*)
+5
+*********************************
+* Backup and restore tables w/ new column
+*********************************
+CREATE TEMPORARY TABLE IF NOT EXISTS test.backup_info (id INT, backup_id INT) ENGINE = HEAP;
+DELETE FROM test.backup_info;
+LOAD DATA INFILE '../tmp.dat' INTO TABLE test.backup_info FIELDS TERMINATED BY ',';
+SELECT @the_backup_id:=backup_id FROM test.backup_info;
+@the_backup_id:=backup_id
+<the_backup_id>
+DROP TABLE test.backup_info;
+DROP TABLE t1, t2, t3, t4, t5, t6, t7;
+ForceVarPart: 1
+ForceVarPart: 1
+ForceVarPart: 1
+ForceVarPart: 1
+DROP TABLE t1, t2, t3, t4, t5, t6, t7;
+*********************************
+* Disk Data error testing
+*********************************
+set storage_engine=ndb;
+CREATE LOGFILE GROUP lg1
+ADD UNDOFILE 'undofile.dat'
+INITIAL_SIZE 16M
+UNDO_BUFFER_SIZE = 1M;
+CREATE TABLESPACE ts1
+ADD DATAFILE 'datafile.dat'
+USE LOGFILE GROUP lg1
+INITIAL_SIZE 12M
+ENGINE NDB;
+CREATE TABLE t1
+(pk1 INT NOT NULL PRIMARY KEY, b INT COLUMN_FORMAT DYNAMIC)
+TABLESPACE ts1 STORAGE DISK
+ENGINE=NDB;
+Warnings:
+Warning	1466	DYNAMIC column b with STORAGE DISK is not supported, column will become FIXED
+ALTER TABLE t1 CHANGE b b_1 INT COLUMN_FORMAT DYNAMIC;
+Warnings:
+Warning	1466	DYNAMIC column b_1 with STORAGE DISK is not supported, column will become FIXED
+DROP TABLE t1;
+ALTER TABLESPACE ts1
+DROP DATAFILE 'datafile.dat'
+ENGINE = NDB;
+DROP TABLESPACE ts1
+ENGINE = NDB;
+DROP LOGFILE GROUP lg1
+ENGINE =NDB;
+********************
+* ROW_FORMAT testing
+********************
+CREATE TABLE t1
+(pk1 INT NOT NULL PRIMARY KEY, b INT COLUMN_FORMAT DYNAMIC)ROW_FORMAT=FIXED
+ENGINE=NDB;
+-- t1 --
+Version: 6
+Fragment type: 5
+K Value: 6
+Min load factor: 78
+Max load factor: 80
+Temporary table: no
+Number of attributes: 2
+Number of primary keys: 1
+Length of frm data: 256
+Row Checksum: 1
+Row GCI: 1
+SingleUserMode: 0
+ForceVarPart: 0
+TableStatus: Retrieved
+-- Attributes -- 
+pk1 Int PRIMARY KEY DISTRIBUTION KEY AT=FIXED ST=MEMORY
+b Int NULL AT=FIXED ST=MEMORY DYNAMIC
+
+-- Indexes -- 
+PRIMARY KEY(pk1) - UniqueHashIndex
+PRIMARY(pk1) - OrderedIndex
+
+
+NDBT_ProgramExit: 0 - OK
+
+DROP TABLE t1;
+CREATE TABLE t1
+(pk1 INT NOT NULL COLUMN_FORMAT FIXED PRIMARY KEY, 
+b INT COLUMN_FORMAT FIXED)ROW_FORMAT=DYNAMIC ENGINE=NDB;
+-- t1 --
+Version: 7
+Fragment type: 5
+K Value: 6
+Min load factor: 78
+Max load factor: 80
+Temporary table: no
+Number of attributes: 2
+Number of primary keys: 1
+Length of frm data: 256
+Row Checksum: 1
+Row GCI: 1
+SingleUserMode: 0
+ForceVarPart: 1
+TableStatus: Retrieved
+-- Attributes -- 
+pk1 Int PRIMARY KEY DISTRIBUTION KEY AT=FIXED ST=MEMORY
+b Int NULL AT=FIXED ST=MEMORY
+
+-- Indexes -- 
+PRIMARY KEY(pk1) - UniqueHashIndex
+PRIMARY(pk1) - OrderedIndex
+
+
+NDBT_ProgramExit: 0 - OK
+
 DROP TABLE t1;

--- 1.1/mysql-test/t/ndb_alter_table_online.test	2007-08-07 19:37:19 +02:00
+++ 1.2/mysql-test/t/ndb_alter_table_online.test	2007-08-07 19:37:19 +02:00
@@ -1,12 +1,24 @@
+#############################################################
+# Author: Martin
+# Date: 2007-07
+# Purpose: basic online alter test
+##############################################################
+# Change Author: Jonathan
+# Date 2006-08-28
+# Purpose: Add more testing for online alter
+##############################################################
+
 -- source include/have_multi_ndb.inc
 -- source include/not_embedded.inc
 
 --disable_warnings
 DROP TABLE IF EXISTS t1;
 --enable_warnings
-#
+
+######################################
 # basic online alter test
-#
+######################################
+
 CREATE TABLE t1 (a INT UNSIGNED KEY, b INT UNSIGNED) ENGINE NDB;
 INSERT INTO t1 values (1,1);
 ALTER TABLE t1 ADD c CHAR(19);
@@ -21,9 +33,328 @@
 SELECT * FROM t1 ORDER BY a;
 DROP TABLE t1;
 
-CREATE TABLE t1 (a INT UNSIGNED KEY, b INT COLUMN_FORMAT DYNAMIC) ENGINE NDB;
-INSERT INTO t1 values (1,1);
+######################################
+# Alter dynmaic table, add int column
+######################################
+# Purpose: To ensure different data
+# type work correctly when added online
+#######################################
+
+--echo *******************************
+--echo * Alter Table online add column
+--echo *******************************
+--echo * Add column c as nullable INT
+--echo *******************************
+
+CREATE TABLE t1 (a INT UNSIGNED  AUTO_INCREMENT KEY, b INT DEFAULT 2 COLUMN_FORMAT DYNAMIC) ENGINE NDB;
+
+let $v=5;
+disable_query_log;
+while ($v)
+{
+  INSERT INTO t1 VALUES(NULL, DEFAULT); 
+  dec $v;
+}
+enable_query_log;
+
 ALTER TABLE t1 ADD c INT;
-INSERT INTO t1 values (2,1,1);
-SELECT * FROM t1 ORDER BY a;
+
+--exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t1
+
+let $v=5;
+disable_query_log;
+while ($v)
+{
+  INSERT INTO t1 VALUES(NULL, DEFAULT, 2147483647); 
+  dec $v;
+}
+enable_query_log;
+
+SELECT COUNT(*) FROM t1 WHERE c IS NULL;
+
+######################################
+# Alter dynmaic table, add TEXT column
+######################################
+# Bug:30205
+######################################
+#--echo *******************************
+#--echo * Add column c as nullable TEXT
+#--echo *******************************
+CREATE TABLE t2 (a INT UNSIGNED  AUTO_INCREMENT KEY, b INT DEFAULT 2 COLUMN_FORMAT DYNAMIC) ENGINE NDB;
+#let $v=5;
+#disable_query_log;
+#while ($v)
+#{
+#  INSERT INTO t2 VALUES(NULL, DEFAULT); 
+#  dec $v;
+#}
+#enable_query_log;
+#ALTER TABLE t2 ADD c TEXT;
+#let $v=5;
+#disable_query_log;
+#while ($v)
+#{
+#  INSERT INTO t2 VALUES(NULL, DEFAULT, "Test"); 
+#  dec $v;
+#}
+#enable_query_log;
+#SELECT COUNT(*) FROM t2 WHERE c IS NULL;
+
+######################################
+# Alter dynmaic table, add FLOAT column
+######################################
+
+--echo *******************************
+--echo * Add column c as nullable FLOAT
+--echo *******************************
+
+CREATE TABLE t3 (a INT UNSIGNED  AUTO_INCREMENT KEY, b INT DEFAULT 2 COLUMN_FORMAT DYNAMIC) ENGINE NDB;
+
+let $v=5;
+disable_query_log;
+while ($v)
+{
+  INSERT INTO t3 VALUES(NULL, DEFAULT); 
+  dec $v;
+}
+enable_query_log;
+
+ALTER TABLE t3 ADD c FLOAT;
+
+--exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t3
+
+let $v=5;
+disable_query_log;
+while ($v)
+{
+  INSERT INTO t3 VALUES(NULL, DEFAULT, -3.402823466E+38); 
+  dec $v;
+}
+enable_query_log;
+
+SELECT COUNT(*) FROM t3 WHERE c IS NULL;
+
+######################################
+# Alter dynmaic table, add DOUBLE column
+######################################
+
+--echo *******************************
+--echo * Add column c as nullable DOUBLE
+--echo *******************************
+
+CREATE TABLE t4 (a INT UNSIGNED  AUTO_INCREMENT KEY, b INT DEFAULT 2 COLUMN_FORMAT DYNAMIC) ENGINE NDB;
+
+let $v=5;
+disable_query_log;
+while ($v)
+{
+  INSERT INTO t4 VALUES(NULL, DEFAULT); 
+  dec $v;
+}
+enable_query_log;
+
+ALTER TABLE t4 ADD c DOUBLE UNSIGNED;
+
+--exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t4
+
+let $v=5;
+disable_query_log;
+while ($v)
+{
+  INSERT INTO t4 VALUES(NULL, DEFAULT, 1.7976931348623157E+308); 
+  dec $v;
+}
+enable_query_log;
+
+SELECT COUNT(*) FROM t4 WHERE c IS NULL;
+
+######################################
+# Alter dynmaic table, add DECIMAL column
+######################################
+
+--echo *******************************
+--echo * Add column c as nullable DECIMAL
+--echo *******************************
+
+CREATE TABLE t5 (a INT UNSIGNED  AUTO_INCREMENT KEY, b INT DEFAULT 2 COLUMN_FORMAT DYNAMIC) ENGINE NDB;
+
+let $v=5;
+disable_query_log;
+while ($v)
+{
+  INSERT INTO t5 VALUES(NULL, DEFAULT); 
+  dec $v;
+}
+enable_query_log;
+
+ALTER TABLE t5 ADD c DECIMAL(5,2);
+
+--exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t5
+
+let $v=5;
+disable_query_log;
+while ($v)
+{
+  INSERT INTO t5 VALUES(NULL, DEFAULT, 345.21); 
+  dec $v;
+}
+enable_query_log;
+
+SELECT COUNT(*) FROM t5 WHERE c IS NULL;
+
+######################################
+# Alter dynmaic table, add DATETIME column
+######################################
+
+--echo *******************************
+--echo * Add column c as nullable DATETIME
+--echo *******************************
+
+CREATE TABLE t6 (a INT UNSIGNED  AUTO_INCREMENT KEY, b INT DEFAULT 2 COLUMN_FORMAT DYNAMIC) ENGINE NDB;
+
+let $v=5;
+disable_query_log;
+while ($v)
+{
+  INSERT INTO t6 VALUES(NULL, DEFAULT); 
+  dec $v;
+}
+enable_query_log;
+
+ALTER TABLE t6 ADD c DATETIME;
+
+--exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t6
+
+let $v=5;
+disable_query_log;
+while ($v)
+{
+  INSERT INTO t6 VALUES(NULL, DEFAULT, '1000-01-01 00:00:00'); 
+  dec $v;
+}
+enable_query_log;
+
+SELECT COUNT(*) FROM t6 WHERE c IS NULL;
+
+######################################
+# Alter dynmaic table, add BINARY column
+######################################
+
+--echo *******************************
+--echo * Add column c as nullable BINARY
+--echo *******************************
+
+CREATE TABLE t7 (a INT UNSIGNED  AUTO_INCREMENT KEY, b INT DEFAULT 2 COLUMN_FORMAT DYNAMIC) ENGINE NDB;
+
+let $v=5;
+disable_query_log;
+while ($v)
+{
+  INSERT INTO t7 VALUES(NULL, DEFAULT); 
+  dec $v;
+}
+enable_query_log;
+
+ALTER TABLE t7 ADD c BINARY(4);
+
+--exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t7
+
+let $v=5;
+disable_query_log;
+while ($v)
+{
+  INSERT INTO t7 VALUES(NULL, DEFAULT, '0101'); 
+  dec $v;
+}
+enable_query_log;
+
+SELECT COUNT(*) FROM t7 WHERE c IS NULL;
+
+##############################
+# Backup and restore section #
+##############################
+--echo *********************************
+--echo * Backup and restore tables w/ new column
+--echo *********************************
+
+--source include/ndb_backup.inc
+
+DROP TABLE t1, t2, t3, t4, t5, t6, t7;
+
+--exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -b $the_backup_id -n 1 -m -r --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT
+--exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -b $the_backup_id -n 2 -r --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT
+
+--exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t1 | grep ForceVarPart
+--exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t3 | grep ForceVarPart
+--exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t4 | grep ForceVarPart
+--exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t6 | grep ForceVarPart
+
+DROP TABLE t1, t2, t3, t4, t5, t6, t7;
+
+###################################
+# Disk Data Error testing section #
+###################################
+--echo *********************************
+--echo * Disk Data error testing
+--echo *********************************
+
+set storage_engine=ndb;
+
+CREATE LOGFILE GROUP lg1
+ADD UNDOFILE 'undofile.dat'
+INITIAL_SIZE 16M
+UNDO_BUFFER_SIZE = 1M;
+
+CREATE TABLESPACE ts1
+ADD DATAFILE 'datafile.dat'
+USE LOGFILE GROUP lg1
+INITIAL_SIZE 12M
+ENGINE NDB;
+
+CREATE TABLE t1
+(pk1 INT NOT NULL PRIMARY KEY, b INT COLUMN_FORMAT DYNAMIC)
+TABLESPACE ts1 STORAGE DISK
+ENGINE=NDB;
+
+ALTER TABLE t1 CHANGE b b_1 INT COLUMN_FORMAT DYNAMIC;
+
+DROP TABLE t1;
+
+ALTER TABLESPACE ts1
+DROP DATAFILE 'datafile.dat'
+ENGINE = NDB;
+
+DROP TABLESPACE ts1
+ENGINE = NDB;
+
+DROP LOGFILE GROUP lg1
+ENGINE =NDB; 
+
+##############################
+# ROW_FORMAT testing section #
+##############################
+--echo ********************
+--echo * ROW_FORMAT testing
+--echo ********************
+
+# Bug:30276, should issue a warning 
+
+CREATE TABLE t1
+(pk1 INT NOT NULL PRIMARY KEY, b INT COLUMN_FORMAT DYNAMIC)ROW_FORMAT=FIXED
+ENGINE=NDB;
+
+--exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t1
+
+DROP TABLE t1;
+
+
+CREATE TABLE t1
+(pk1 INT NOT NULL COLUMN_FORMAT FIXED PRIMARY KEY, 
+b INT COLUMN_FORMAT FIXED)ROW_FORMAT=DYNAMIC ENGINE=NDB;
+
+--exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t1
+
 DROP TABLE t1;
+
+# End of 5.1 Test Case
+
Thread
bk commit into 5.1 tree (jmiller:1.2605)Jonathan Miller7 Aug