List:Commits« Previous MessageNext Message »
From:Horst.Hunger Date:April 13 2010 10:33am
Subject:bzr commit into mysql-6.0-codebase branch (horst.hunger:3254)
View as plain text  
#At file:///home/horst/bzr/mysql-6.0-serverqa/ based on revid:horst.hunger@stripped

 3254 Horst.Hunger	2010-04-13
      test of db state in 6.0 serverqa to see the behaviour in pb.

    added:
      mysql-test/include/compare_db_state.inc
      mysql-test/include/compare_ini_fin_state.inc
      mysql-test/include/create_initial_state.inc
      mysql-test/r/db-state-based.result
      mysql-test/std_data/i_s-db-state-based-a.refres
      mysql-test/std_data/i_s-db-state-based-a2.refres
      mysql-test/std_data/i_s-db-state-based-c-t.refres
      mysql-test/std_data/i_s-db-state-based-fin.refres
      mysql-test/std_data/i_s-db-state-based-i.refres
      mysql-test/std_data/i_s-db-state-based-s.refres
      mysql-test/std_data/test-db-state-based-a.refres
      mysql-test/std_data/test-db-state-based-a2.refres
      mysql-test/std_data/test-db-state-based-c-t.refres
      mysql-test/std_data/test-db-state-based-i.refres
      mysql-test/std_data/test-db-state-based-s.refres
      mysql-test/t/db-state-based.test
=== added file 'mysql-test/include/compare_db_state.inc'
--- a/mysql-test/include/compare_db_state.inc	1970-01-01 00:00:00 +0000
+++ b/mysql-test/include/compare_db_state.inc	2010-04-13 10:33:23 +0000
@@ -0,0 +1,13 @@
+# Dump of the I_S state after the SQL statment.
+--exec $MYSQL_DUMP --skip-lock-tables --xml information_schema > $MYSQLTEST_VARDIR/i_s.act
+--exec diff -I "field name=\"ID\"" -I VARIABLE_VALUE -I TIME -I time $MYSQLTEST_VARDIR/i_s.pre $MYSQLTEST_VARDIR/i_s.act > $MYSQLTEST_VARDIR/i_s.diff || true
+# Pass if no difference, fail otherwise, as difference will put into the .reject file.
+--exec diff -I TIME -I time $MYSQLTEST_VARDIR/i_s.diff std_data/i_s-$DUMP_REF.refres || true
+# Dump of test state after the SQL statement.
+--exec $MYSQL_DUMP --xml test > $MYSQLTEST_VARDIR/test.act
+--exec diff $MYSQLTEST_VARDIR/test.pre $MYSQLTEST_VARDIR/test.act > $MYSQLTEST_VARDIR/test.diff || true
+# Pass if no difference, fail otherwise, as difference will put into the .reject file.
+--exec diff -I TIME -I time $MYSQLTEST_VARDIR/test.diff std_data/test-$DUMP_REF.refres || true
+--move_file $MYSQLTEST_VARDIR/test.act $MYSQLTEST_VARDIR/test.pre
+--move_file $MYSQLTEST_VARDIR/i_s.act $MYSQLTEST_VARDIR/i_s.pre
+

=== added file 'mysql-test/include/compare_ini_fin_state.inc'
--- a/mysql-test/include/compare_ini_fin_state.inc	1970-01-01 00:00:00 +0000
+++ b/mysql-test/include/compare_ini_fin_state.inc	2010-04-13 10:33:23 +0000
@@ -0,0 +1,10 @@
+#Dump of the I_S state after the DROP TABLE, which should be identical to the initial state.
+--exec $MYSQL_DUMP --skip-lock-tables --xml information_schema > $MYSQLTEST_VARDIR/i_s.fin
+--exec diff -I "field name=\"ID\"" -I VARIABLE_VALUE -I TIME -I time $MYSQLTEST_VARDIR/i_s.ini $MYSQLTEST_VARDIR/i_s.fin > $MYSQLTEST_VARDIR/i_s.diff || true
+--exec diff -I TIME -I time $MYSQLTEST_VARDIR/i_s.diff std_data/i_s-$DUMP_REF-fin.refres || true
+# Dump of test state after DROP. then compared to the initial state of test.
+--exec $MYSQL_DUMP --xml test > $MYSQLTEST_VARDIR/test.fin
+--exec diff $MYSQLTEST_VARDIR/test.ini $MYSQLTEST_VARDIR/test.fin > $MYSQLTEST_VARDIR/test.diff || true
+--exec diff -I TIME -I time $MYSQLTEST_VARDIR/test.diff std_data/test-$DUMP_REF-fin.refres || true
+
+

=== added file 'mysql-test/include/create_initial_state.inc'
--- a/mysql-test/include/create_initial_state.inc	1970-01-01 00:00:00 +0000
+++ b/mysql-test/include/create_initial_state.inc	2010-04-13 10:33:23 +0000
@@ -0,0 +1,7 @@
+# Dump of the initial state of the information_schema.
+--exec $MYSQL_DUMP --skip-lock-tables --xml information_schema > $MYSQLTEST_VARDIR/i_s.ini;
+# Dump of the initial state of test.
+--exec $MYSQL_DUMP --xml test > $MYSQLTEST_VARDIR/test.ini;
+--copy_file $MYSQLTEST_VARDIR/i_s.ini $MYSQLTEST_VARDIR/i_s.pre 
+--copy_file $MYSQLTEST_VARDIR/test.ini $MYSQLTEST_VARDIR/test.pre 
+

=== added file 'mysql-test/r/db-state-based.result'
--- a/mysql-test/r/db-state-based.result	1970-01-01 00:00:00 +0000
+++ b/mysql-test/r/db-state-based.result	2010-04-13 10:33:23 +0000
@@ -0,0 +1,11 @@
+USE test;
+DROP TABLE IF EXISTS t1;
+CREATE TABLE t1 (c1 char(10));
+ALTER TABLE t1 RENAME TO t2;
+ALTER TABLE t2 ADD c2 int AFTER c1;
+INSERT INTO t2 VALUES ('aaaaaaaaaa',1),('bbbbbbbbb',2);
+SELECT * FROM t2;
+c1	c2
+aaaaaaaaaa	1
+bbbbbbbbb	2
+DROP TABLE t2;

=== added file 'mysql-test/std_data/i_s-db-state-based-a.refres'
--- a/mysql-test/std_data/i_s-db-state-based-a.refres	1970-01-01 00:00:00 +0000
+++ b/mysql-test/std_data/i_s-db-state-based-a.refres	2010-04-13 10:33:23 +0000
@@ -0,0 +1,12 @@
+18084c18084
+< 		<field name="TABLE_NAME">t1</field>
+---
+> 		<field name="TABLE_NAME">t2</field>
+23204c23204
+< 		<field name="TABLE_NAME">t1</field>
+---
+> 		<field name="TABLE_NAME">t2</field>
+28858c28858
+< 		<field name="TABLE_NAME">t1</field>
+---
+> 		<field name="TABLE_NAME">t2</field>

=== added file 'mysql-test/std_data/i_s-db-state-based-a2.refres'
--- a/mysql-test/std_data/i_s-db-state-based-a2.refres	1970-01-01 00:00:00 +0000
+++ b/mysql-test/std_data/i_s-db-state-based-a2.refres	2010-04-13 10:33:23 +0000
@@ -0,0 +1,32 @@
+18103a18104,18126
+> 	<row>
+> 		<field name="TABLE_CATALOG">def</field>
+> 		<field name="TABLE_SCHEMA">test</field>
+> 		<field name="TABLE_NAME">t2</field>
+> 		<field name="COLUMN_NAME">c2</field>
+> 		<field name="ORDINAL_POSITION">2</field>
+> 		<field name="COLUMN_DEFAULT" xsi:nil="true" />
+> 		<field name="IS_NULLABLE">YES</field>
+> 		<field name="DATA_TYPE">int</field>
+> 		<field name="CHARACTER_MAXIMUM_LENGTH" xsi:nil="true" />
+> 		<field name="CHARACTER_OCTET_LENGTH" xsi:nil="true" />
+> 		<field name="NUMERIC_PRECISION">10</field>
+> 		<field name="NUMERIC_SCALE">0</field>
+> 		<field name="CHARACTER_SET_NAME" xsi:nil="true" />
+> 		<field name="COLLATION_NAME" xsi:nil="true" />
+> 		<field name="COLUMN_TYPE">int(11)</field>
+> 		<field name="COLUMN_KEY"></field>
+> 		<field name="EXTRA"></field>
+> 		<field name="PRIVILEGES">select,insert,update,references</field>
+> 		<field name="COLUMN_COMMENT"></field>
+> 		<field name="STORAGE">Default</field>
+> 		<field name="FORMAT">Default</field>
+> 	</row>
+23217c23240
+< 		<field name="MAX_DATA_LENGTH">3096224743817215</field>
+---
+> 		<field name="MAX_DATA_LENGTH">4222124650659839</field>
+28866c28889
+< 		<field name="MAX_DATA_LENGTH">3096224743817215</field>
+---
+> 		<field name="MAX_DATA_LENGTH">4222124650659839</field>

=== added file 'mysql-test/std_data/i_s-db-state-based-c-t.refres'
--- a/mysql-test/std_data/i_s-db-state-based-c-t.refres	1970-01-01 00:00:00 +0000
+++ b/mysql-test/std_data/i_s-db-state-based-c-t.refres	2010-04-13 10:33:23 +0000
@@ -0,0 +1,77 @@
+18080a18081,18103
+> 	<row>
+> 		<field name="TABLE_CATALOG">def</field>
+> 		<field name="TABLE_SCHEMA">test</field>
+> 		<field name="TABLE_NAME">t1</field>
+> 		<field name="COLUMN_NAME">c1</field>
+> 		<field name="ORDINAL_POSITION">1</field>
+> 		<field name="COLUMN_DEFAULT" xsi:nil="true" />
+> 		<field name="IS_NULLABLE">YES</field>
+> 		<field name="DATA_TYPE">char</field>
+> 		<field name="CHARACTER_MAXIMUM_LENGTH">10</field>
+> 		<field name="CHARACTER_OCTET_LENGTH">10</field>
+> 		<field name="NUMERIC_PRECISION" xsi:nil="true" />
+> 		<field name="NUMERIC_SCALE" xsi:nil="true" />
+> 		<field name="CHARACTER_SET_NAME">latin1</field>
+> 		<field name="COLLATION_NAME">latin1_swedish_ci</field>
+> 		<field name="COLUMN_TYPE">char(10)</field>
+> 		<field name="COLUMN_KEY"></field>
+> 		<field name="EXTRA"></field>
+> 		<field name="PRIVILEGES">select,insert,update,references</field>
+> 		<field name="COLUMN_COMMENT"></field>
+> 		<field name="STORAGE">Default</field>
+> 		<field name="FORMAT">Default</field>
+> 	</row>
+23177a23201,23227
+> 	<row>
+> 		<field name="TABLE_CATALOG">def</field>
+> 		<field name="TABLE_SCHEMA">test</field>
+> 		<field name="TABLE_NAME">t1</field>
+> 		<field name="PARTITION_NAME" xsi:nil="true" />
+> 		<field name="SUBPARTITION_NAME" xsi:nil="true" />
+> 		<field name="PARTITION_ORDINAL_POSITION" xsi:nil="true" />
+> 		<field name="SUBPARTITION_ORDINAL_POSITION" xsi:nil="true" />
+> 		<field name="PARTITION_METHOD" xsi:nil="true" />
+> 		<field name="SUBPARTITION_METHOD" xsi:nil="true" />
+> 		<field name="PARTITION_EXPRESSION" xsi:nil="true" />
+> 		<field name="SUBPARTITION_EXPRESSION" xsi:nil="true" />
+> 		<field name="PARTITION_DESCRIPTION" xsi:nil="true" />
+> 		<field name="TABLE_ROWS">0</field>
+> 		<field name="AVG_ROW_LENGTH">0</field>
+> 		<field name="DATA_LENGTH">0</field>
+> 		<field name="MAX_DATA_LENGTH">3096224743817215</field>
+> 		<field name="INDEX_LENGTH">1024</field>
+> 		<field name="DATA_FREE">0</field>
+> 		<field name="CREATE_TIME">2010-04-13 10:28:08</field>
+> 		<field name="UPDATE_TIME">2010-04-13 10:28:08</field>
+> 		<field name="CHECK_TIME" xsi:nil="true" />
+> 		<field name="CHECKSUM" xsi:nil="true" />
+> 		<field name="PARTITION_COMMENT"></field>
+> 		<field name="NODEGROUP"></field>
+> 		<field name="TABLESPACE_NAME" xsi:nil="true" />
+> 	</row>
+28804a28855,28878
+> 	<row>
+> 		<field name="TABLE_CATALOG">def</field>
+> 		<field name="TABLE_SCHEMA">test</field>
+> 		<field name="TABLE_NAME">t1</field>
+> 		<field name="TABLE_TYPE">BASE TABLE</field>
+> 		<field name="ENGINE">MyISAM</field>
+> 		<field name="VERSION">10</field>
+> 		<field name="ROW_FORMAT">Fixed</field>
+> 		<field name="TABLE_ROWS">0</field>
+> 		<field name="AVG_ROW_LENGTH">0</field>
+> 		<field name="DATA_LENGTH">0</field>
+> 		<field name="MAX_DATA_LENGTH">3096224743817215</field>
+> 		<field name="INDEX_LENGTH">1024</field>
+> 		<field name="DATA_FREE">0</field>
+> 		<field name="AUTO_INCREMENT" xsi:nil="true" />
+> 		<field name="CREATE_TIME">2010-04-13 10:28:08</field>
+> 		<field name="UPDATE_TIME">2010-04-13 10:28:08</field>
+> 		<field name="CHECK_TIME" xsi:nil="true" />
+> 		<field name="TABLE_COLLATION">latin1_swedish_ci</field>
+> 		<field name="CHECKSUM" xsi:nil="true" />
+> 		<field name="CREATE_OPTIONS"></field>
+> 		<field name="TABLE_COMMENT"></field>
+> 		<field name="TABLESPACE_NAME" xsi:nil="true" />
+> 	</row>

=== added file 'mysql-test/std_data/i_s-db-state-based-fin.refres'

=== added file 'mysql-test/std_data/i_s-db-state-based-i.refres'
--- a/mysql-test/std_data/i_s-db-state-based-i.refres	1970-01-01 00:00:00 +0000
+++ b/mysql-test/std_data/i_s-db-state-based-i.refres	2010-04-13 10:33:23 +0000
@@ -0,0 +1,16 @@
+23237,23239c23237,23239
+< 		<field name="TABLE_ROWS">0</field>
+< 		<field name="AVG_ROW_LENGTH">0</field>
+< 		<field name="DATA_LENGTH">0</field>
+---
+> 		<field name="TABLE_ROWS">2</field>
+> 		<field name="AVG_ROW_LENGTH">15</field>
+> 		<field name="DATA_LENGTH">30</field>
+28886,28888c28886,28888
+< 		<field name="TABLE_ROWS">0</field>
+< 		<field name="AVG_ROW_LENGTH">0</field>
+< 		<field name="DATA_LENGTH">0</field>
+---
+> 		<field name="TABLE_ROWS">2</field>
+> 		<field name="AVG_ROW_LENGTH">15</field>
+> 		<field name="DATA_LENGTH">30</field>

=== added file 'mysql-test/std_data/i_s-db-state-based-s.refres'

=== added file 'mysql-test/std_data/test-db-state-based-a.refres'
--- a/mysql-test/std_data/test-db-state-based-a.refres	1970-01-01 00:00:00 +0000
+++ b/mysql-test/std_data/test-db-state-based-a.refres	2010-04-13 10:33:23 +0000
@@ -0,0 +1,12 @@
+4c4
+< 	<table_structure name="t1">
+---
+> 	<table_structure name="t2">
+6c6
+< 		<options Name="t1" Engine="MyISAM" Version="10" Row_format="Fixed" Rows="0" Avg_row_length="0" Data_length="0" Max_data_length="3096224743817215" Index_length="1024" Data_free="0" Create_time="2010-04-09 16:17:58" Update_time="2010-04-09 16:17:58" Collation="latin1_swedish_ci" Create_options="" Comment="" />
+---
+> 		<options Name="t2" Engine="MyISAM" Version="10" Row_format="Fixed" Rows="0" Avg_row_length="0" Data_length="0" Max_data_length="3096224743817215" Index_length="1024" Data_free="0" Create_time="2010-04-09 16:17:58" Update_time="2010-04-09 16:17:58" Collation="latin1_swedish_ci" Create_options="" Comment="" />
+8c8
+< 	<table_data name="t1">
+---
+> 	<table_data name="t2">

=== added file 'mysql-test/std_data/test-db-state-based-a2.refres'
--- a/mysql-test/std_data/test-db-state-based-a2.refres	1970-01-01 00:00:00 +0000
+++ b/mysql-test/std_data/test-db-state-based-a2.refres	2010-04-13 10:33:23 +0000
@@ -0,0 +1,5 @@
+6c6,7
+< 		<options Name="t2" Engine="MyISAM" Version="10" Row_format="Fixed" Rows="0" Avg_row_length="0" Data_length="0" Max_data_length="3096224743817215" Index_length="1024" Data_free="0" Create_time="2010-04-09 16:17:58" Update_time="2010-04-09 16:17:58" Collation="latin1_swedish_ci" Create_options="" Comment="" />
+---
+> 		<field Field="c2" Type="int(11)" Null="YES" Key="" Extra="" />
+> 		<options Name="t2" Engine="MyISAM" Version="10" Row_format="Fixed" Rows="0" Avg_row_length="0" Data_length="0" Max_data_length="4222124650659839" Index_length="1024" Data_free="0" Create_time="2010-04-09 16:17:59" Update_time="2010-04-09 16:17:59" Collation="latin1_swedish_ci" Create_options="" Comment="" />

=== added file 'mysql-test/std_data/test-db-state-based-c-t.refres'
--- a/mysql-test/std_data/test-db-state-based-c-t.refres	1970-01-01 00:00:00 +0000
+++ b/mysql-test/std_data/test-db-state-based-c-t.refres	2010-04-13 10:33:23 +0000
@@ -0,0 +1,7 @@
+3a4,9
+> 	<table_structure name="t1">
+> 		<field Field="c1" Type="char(10)" Null="YES" Key="" Extra="" />
+> 		<options Name="t1" Engine="MyISAM" Version="10" Row_format="Fixed" Rows="0" Avg_row_length="0" Data_length="0" Max_data_length="3096224743817215" Index_length="1024" Data_free="0" Create_time="2010-04-09 16:17:58" Update_time="2010-04-09 16:17:58" Collation="latin1_swedish_ci" Create_options="" Comment="" />
+> 	</table_structure>
+> 	<table_data name="t1">
+> 	</table_data>

=== added file 'mysql-test/std_data/test-db-state-based-i.refres'
--- a/mysql-test/std_data/test-db-state-based-i.refres	1970-01-01 00:00:00 +0000
+++ b/mysql-test/std_data/test-db-state-based-i.refres	2010-04-13 10:33:23 +0000
@@ -0,0 +1,13 @@
+7c7
+< 		<options Name="t2" Engine="MyISAM" Version="10" Row_format="Fixed" Rows="0" Avg_row_length="0" Data_length="0" Max_data_length="4222124650659839" Index_length="1024" Data_free="0" Create_time="2010-04-09 16:17:59" Update_time="2010-04-09 16:17:59" Collation="latin1_swedish_ci" Create_options="" Comment="" />
+---
+> 		<options Name="t2" Engine="MyISAM" Version="10" Row_format="Fixed" Rows="2" Avg_row_length="15" Data_length="30" Max_data_length="4222124650659839" Index_length="1024" Data_free="0" Create_time="2010-04-09 16:17:59" Update_time="2010-04-09 16:17:59" Collation="latin1_swedish_ci" Create_options="" Comment="" />
+9a10,17
+> 	<row>
+> 		<field name="c1">aaaaaaaaaa</field>
+> 		<field name="c2">1</field>
+> 	</row>
+> 	<row>
+> 		<field name="c1">bbbbbbbbb</field>
+> 		<field name="c2">2</field>
+> 	</row>

=== added file 'mysql-test/std_data/test-db-state-based-s.refres'

=== added file 'mysql-test/t/db-state-based.test'
--- a/mysql-test/t/db-state-based.test	1970-01-01 00:00:00 +0000
+++ b/mysql-test/t/db-state-based.test	2010-04-13 10:33:23 +0000
@@ -0,0 +1,33 @@
+--source include/not_windows.inc
+--source include/not_embedded.inc
+
+--source include/create_initial_state.inc
+
+USE test;
+--disable_warnings
+DROP TABLE IF EXISTS t1;
+--enable_warnings
+CREATE TABLE t1 (c1 char(10));
+let $DUMP_REF= db-state-based-c-t;
+--source include/compare_db_state.inc
+
+ALTER TABLE t1 RENAME TO t2;
+let $DUMP_REF= db-state-based-a;
+--source include/compare_db_state.inc
+
+ALTER TABLE t2 ADD c2 int AFTER c1;
+let $DUMP_REF= db-state-based-a2;
+--source include/compare_db_state.inc
+
+INSERT INTO t2 VALUES ('aaaaaaaaaa',1),('bbbbbbbbb',2);
+let $DUMP_REF= db-state-based-i;
+--source include/compare_db_state.inc
+
+SELECT * FROM t2;
+let $DUMP_REF= db-state-based-s;
+--source include/compare_db_state.inc
+
+DROP TABLE t2;
+let $DUMP_REF= db-state-based-fin;
+--source include/compare_ini_fin_state.inc
+


Attachment: [text/bzr-bundle] bzr/horst.hunger@sun.com-20100413103323-9fg8lr65p3sz77uv.bundle
Thread
bzr commit into mysql-6.0-codebase branch (horst.hunger:3254) Horst.Hunger13 Apr