List:Commits« Previous MessageNext Message »
From:Jonathan Miller Date:August 3 2007 8:15pm
Subject:bk commit into 5.1 tree (jmiller:1.2603)
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-03 22:15:25+02:00, jmiller@stripped +1 -0
  ndb_alter_table_online.test:
    Updated/extended on-line alter test cases

  mysql-test/t/ndb_alter_table_online.test@stripped, 2007-08-03 22:15:02+02:00, jmiller@stripped +190 -6
    Updated/extended on-line alter test cases

# 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.1/mysql-test/t/ndb_alter_table_online.test	2007-08-03 22:15:37 +02:00
+++ 1.2/mysql-test/t/ndb_alter_table_online.test	2007-08-03 22:15:37 +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,181 @@
 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 TABLE t1 ADD c INT;
-INSERT INTO t1 values (2,1,1);
+######################################
+# Alter dynmaic table, add int column
+######################################
+
+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 DEFAULT 2147483647;
+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, DEFAULT); 
+  dec $v;
+}
+enable_query_log;
+SELECT * FROM t1 ORDER BY a;
+DROP TABLE t1;
+
+######################################
+# Alter dynmaic table, add TEXT column
+######################################
+
+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 TEXT;
+let $v=5;
+disable_query_log;
+while ($v)
+{
+  INSERT INTO t1 VALUES(NULL, DEFAULT, "Test"); 
+  dec $v;
+}
+enable_query_log;
+SELECT * FROM t1 ORDER BY a;
+DROP TABLE t1;
+
+######################################
+# Alter dynmaic table, add FLOAT column
+######################################
+
+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 FLOAT DEFAULT -3.402823466E+38;
+let $v=5;
+disable_query_log;
+while ($v)
+{
+  INSERT INTO t1 VALUES(NULL, DEFAULT, DEFAULT); 
+  dec $v;
+}
+enable_query_log;
+SELECT * FROM t1 ORDER BY a;
+DROP TABLE t1;
+
+######################################
+# Alter dynmaic table, add DOUBLE column
+######################################
+
+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 DOUBLE UNSIGNED DEFAULT 1.7976931348623157E+308;
+let $v=5;
+disable_query_log;
+while ($v)
+{
+  INSERT INTO t1 VALUES(NULL, DEFAULT, DEFAULT); 
+  dec $v;
+}
+enable_query_log;
+SELECT * FROM t1 ORDER BY a;
+DROP TABLE t1;
+
+######################################
+# Alter dynmaic table, add DECIMAL column
+######################################
+
+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 DECIMAL(5,2) DEFAULT 345.21;
+let $v=5;
+disable_query_log;
+while ($v)
+{
+  INSERT INTO t1 VALUES(NULL, DEFAULT, DEFAULT); 
+  dec $v;
+}
+enable_query_log;
+SELECT * FROM t1 ORDER BY a;
+DROP TABLE t1;
+
+######################################
+# Alter dynmaic table, add DATETIME column
+######################################
+
+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 DATETIME DEFAULT '1000-01-01 00:00:00';
+let $v=5;
+disable_query_log;
+while ($v)
+{
+  INSERT INTO t1 VALUES(NULL, DEFAULT, DEFAULT); 
+  dec $v;
+}
+enable_query_log;
+SELECT * FROM t1 ORDER BY a;
+DROP TABLE t1;
+
+######################################
+# Alter dynmaic table, add BINARY column
+######################################
+
+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 BINARY(4) DEFAULT '0101';
+let $v=5;
+disable_query_log;
+while ($v)
+{
+  INSERT INTO t1 VALUES(NULL, DEFAULT, DEFAULT); 
+  dec $v;
+}
+enable_query_log;
 SELECT * FROM t1 ORDER BY a;
 DROP TABLE t1;
+
+# End of 5.1 Test Case
+
Thread
bk commit into 5.1 tree (jmiller:1.2603)Jonathan Miller3 Aug