List:Commits« Previous MessageNext Message »
From:Pekka Nousiainen Date:April 11 2012 8:21am
Subject:bzr push into mysql-trunk-cluster branch (pekka.nousiainen:3469 to 3472)
WL#946
View as plain text  
 3472 Pekka Nousiainen	2012-04-11
      wl#946 x03_fix.diff
      try to fix ndb_select_all test on windows

    modified:
      mysql-test/suite/ndb/r/ndb_wl946_main.result
      mysql-test/suite/ndb/t/ndb_wl946_select_all.inc
 3471 magnus.blaudd@stripped	2012-04-11
      cherrypick fix for ndb_restore_misc not to show all columns from I_S.columns

    modified:
      mysql-test/suite/ndb/r/ndb_restore_misc.result
      mysql-test/suite/ndb/t/ndb_restore_misc.test
 3470 magnus.blaudd@stripped	2012-04-11
      WL#6224 Adapt MySQL Cluster to 5.6
       - The Extra column of EXPLAIN is NULL when empty

    modified:
      mysql-test/suite/ndb/r/ndb_index_stat.result
 3469 Pekka Nousiainen	2012-04-06
      wl#946 a05_sel.diff
      verify ndb_select_all fields unpack and display

    added:
      mysql-test/suite/ndb/t/ndb_wl946_select_all.inc
    modified:
      mysql-test/suite/ndb/r/ndb_wl946_main.result
      mysql-test/suite/ndb/t/ndb_wl946_main.test
=== modified file 'mysql-test/suite/ndb/r/ndb_index_stat.result'
--- a/mysql-test/suite/ndb/r/ndb_index_stat.result	2012-03-05 14:02:05 +0000
+++ b/mysql-test/suite/ndb/r/ndb_index_stat.result	2012-04-11 06:39:30 +0000
@@ -88,15 +88,15 @@ id	select_type	table	type	possible_keys
 # should NOT say: Using index for group-by
 explain select distinct (a1) from t1;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	ALL	NULL	NULL	NULL	NULL	#	
+1	SIMPLE	t1	ALL	NULL	NULL	NULL	NULL	#	NULL
 # must say: Using index for group by
 explain select distinct (b1) from t1;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	index	NULL	b1x	4	NULL	#	
+1	SIMPLE	t1	index	NULL	b1x	4	NULL	#	NULL
 # must say: Using index for group by
 explain select distinct (c1) from t1;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	index	NULL	c1x	4	NULL	#	
+1	SIMPLE	t1	index	NULL	c1x	4	NULL	#	NULL
 drop table t1, t2;
 create table t1 (a int, b int, c varchar(10) not null,
 primary key using hash (a), index(b,c)) engine=ndb;
@@ -535,13 +535,13 @@ Table	Op	Msg_type	Msg_text
 test.t1	analyze	status	OK
 explain SELECT count(*) as Count FROM t1 WHERE I = 5;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	ref	I	I	5	const	256	
+1	SIMPLE	t1	ref	I	I	5	const	256	NULL
 SELECT count(*) as Count FROM t1 WHERE I = 5;
 Count
 256
 explain SELECT count(*) as Count FROM t1 WHERE L = 5;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	ref	L	L	5	const	256	
+1	SIMPLE	t1	ref	L	L	5	const	256	NULL
 SELECT count(*) as Count FROM t1 WHERE L = 5;
 Count
 256

=== modified file 'mysql-test/suite/ndb/r/ndb_restore_misc.result'
--- a/mysql-test/suite/ndb/r/ndb_restore_misc.result	2011-08-17 10:36:01 +0000
+++ b/mysql-test/suite/ndb/r/ndb_restore_misc.result	2012-04-11 07:36:28 +0000
@@ -134,11 +134,12 @@ ForceVarPart: 1
 drop table t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c,t10_c,t11_c;
 ForceVarPart: 0
 ForceVarPart: 1
-select * from information_schema.columns where table_name = "t1_c";
-TABLE_CATALOG	TABLE_SCHEMA	TABLE_NAME	COLUMN_NAME	ORDINAL_POSITION	COLUMN_DEFAULT	IS_NULLABLE	DATA_TYPE	CHARACTER_MAXIMUM_LENGTH	CHARACTER_OCTET_LENGTH	NUMERIC_PRECISION	NUMERIC_SCALE	CHARACTER_SET_NAME	COLLATION_NAME	COLUMN_TYPE	COLUMN_KEY	EXTRA	PRIVILEGES	COLUMN_COMMENT
-def	test	t1_c	capgoaledatta	1	NULL	NO	mediumint	NULL	NULL	7	0	NULL	NULL	mediumint(5) unsigned	PRI	auto_increment	#	
-def	test	t1_c	goaledatta	2		NO	char	2	2	NULL	NULL	latin1	latin1_swedish_ci	char(2)	PRI		#	
-def	test	t1_c	maturegarbagefa	3		NO	varchar	32	32	NULL	NULL	latin1	latin1_swedish_ci	varchar(32)	PRI		#	
+select TABLE_SCHEMA, TABLE_NAME, COLUMN_NAME, ORDINAL_POSITION, DATA_TYPE
+from information_schema.columns where table_name = "t1_c";
+TABLE_SCHEMA	TABLE_NAME	COLUMN_NAME	ORDINAL_POSITION	DATA_TYPE
+test	t1_c	capgoaledatta	1	mediumint
+test	t1_c	goaledatta	2	char
+test	t1_c	maturegarbagefa	3	varchar
 select count(*) from t1;
 count(*)
 5

=== modified file 'mysql-test/suite/ndb/r/ndb_wl946_main.result'
--- a/mysql-test/suite/ndb/r/ndb_wl946_main.result	2012-04-06 07:53:42 +0000
+++ b/mysql-test/suite/ndb/r/ndb_wl946_main.result	2012-04-11 08:20:45 +0000
@@ -71,7 +71,13 @@ select count(*), sum(crc32(concat(a,b,c,
 count(*)	sum(crc32(concat(a,b,c,d,e,f)))
 500	1099869477618
 # verify ndb_select_all
-create temporary table t1tmp (
+create temporary table t1tmp1 (
+x char(255)
+) engine=myisam;
+load data infile 'DUMP_FILE1' into table t1tmp1;
+delete from t1tmp1 where x not regexp '^[0-9]*,';
+select x from t1tmp1 into outfile 'DUMP_FILE2';
+create temporary table t1tmp2 (
 a int primary key,
 b char(40),
 c char(40),
@@ -79,15 +85,16 @@ d char(40),
 e char(40),
 f char(40)
 ) engine=myisam;
-load data infile 'DUMP_FILE' into table t1tmp
+load data infile 'DUMP_FILE2' into table t1tmp2
 fields terminated by ',';
 select count(*), sum(crc32(concat(a,b,c,d,e,unix_timestamp(f)))) from t1;
 count(*)	sum(crc32(concat(a,b,c,d,e,unix_timestamp(f))))
 500	1042802316591
-select count(*), sum(crc32(concat(a,b,c,d,replace(e,'/',' '),f))) from t1tmp;
+select count(*), sum(crc32(concat(a,b,c,d,replace(e,'/',' '),f))) from t1tmp2;
 count(*)	sum(crc32(concat(a,b,c,d,replace(e,'/',' '),f)))
 500	1042802316591
-drop table t1tmp;
+drop table t1tmp1;
+drop table t1tmp2;
 # index queries
 select * from t1 where b = '2011';
 a	b	c	d	e	f
@@ -206,7 +213,13 @@ select count(*), sum(crc32(concat(a,b,c,
 count(*)	sum(crc32(concat(a,b,c,d,e,f)))
 500	1091780159996
 # verify ndb_select_all
-create temporary table t1tmp (
+create temporary table t1tmp1 (
+x char(255)
+) engine=myisam;
+load data infile 'DUMP_FILE1' into table t1tmp1;
+delete from t1tmp1 where x not regexp '^[0-9]*,';
+select x from t1tmp1 into outfile 'DUMP_FILE2';
+create temporary table t1tmp2 (
 a int primary key,
 b char(40),
 c char(40),
@@ -214,15 +227,16 @@ d char(40),
 e char(40),
 f char(40)
 ) engine=myisam;
-load data infile 'DUMP_FILE' into table t1tmp
+load data infile 'DUMP_FILE2' into table t1tmp2
 fields terminated by ',';
 select count(*), sum(crc32(concat(a,b,c,d,e,unix_timestamp(f)))) from t1;
 count(*)	sum(crc32(concat(a,b,c,d,e,unix_timestamp(f))))
 500	1102908582969
-select count(*), sum(crc32(concat(a,b,c,d,replace(e,'/',' '),f))) from t1tmp;
+select count(*), sum(crc32(concat(a,b,c,d,replace(e,'/',' '),f))) from t1tmp2;
 count(*)	sum(crc32(concat(a,b,c,d,replace(e,'/',' '),f)))
 500	1102908582969
-drop table t1tmp;
+drop table t1tmp1;
+drop table t1tmp2;
 # index queries
 select * from t1 where b = '1984';
 a	b	c	d	e	f

=== modified file 'mysql-test/suite/ndb/t/ndb_restore_misc.test'
--- a/mysql-test/suite/ndb/t/ndb_restore_misc.test	2011-07-19 10:54:29 +0000
+++ b/mysql-test/suite/ndb/t/ndb_restore_misc.test	2012-04-11 07:36:28 +0000
@@ -192,9 +192,8 @@ source show_varpart.inc;
 # Bug #30667
 # ndb table discovery does not work correcly with information schema
 # - prior to bug fix this would yeild no output and a warning
-# (priviliges differ on embedded and server so replace)
---replace_column 18 #
-select * from information_schema.columns where table_name = "t1_c";
+select TABLE_SCHEMA, TABLE_NAME, COLUMN_NAME, ORDINAL_POSITION, DATA_TYPE
+  from information_schema.columns where table_name = "t1_c";
 
 # random output order??
 #show tables;

=== modified file 'mysql-test/suite/ndb/t/ndb_wl946_select_all.inc'
--- a/mysql-test/suite/ndb/t/ndb_wl946_select_all.inc	2012-04-06 07:53:42 +0000
+++ b/mysql-test/suite/ndb/t/ndb_wl946_select_all.inc	2012-04-11 08:20:45 +0000
@@ -3,11 +3,27 @@
 #
 # date/time uses "/" as separator instead of blank
 # timestamp is displayed as unix timestamp
+#
+# use mysql to grep out non-data lines (MTR grep is not real grep?)
+
+--let $dump_file1 = $MYSQLTEST_VARDIR/tmp/wl946_select_all1.txt
+--let $dump_file2 = $MYSQLTEST_VARDIR/tmp/wl946_select_all2.txt
 
---let $dump_file = $MYSQLTEST_VARDIR/tmp/wl946_select_all.txt
---exec $NDB_SELECT_ALL --no-defaults -d test --delimiter=, t1 | grep '^[0-9]*,' > $dump_file
+--exec $NDB_SELECT_ALL --no-defaults -d test --delimiter=, t1 > $dump_file1
+
+create temporary table t1tmp1 (
+  x char(255)
+) engine=myisam;
 
-create temporary table t1tmp (
+--chmod 0777 $dump_file1
+--replace_result $dump_file1 DUMP_FILE1
+eval load data infile '$dump_file1' into table t1tmp1;
+
+delete from t1tmp1 where x not regexp '^[0-9]*,';
+--replace_result $dump_file2 DUMP_FILE2
+eval select x from t1tmp1 into outfile '$dump_file2';
+
+create temporary table t1tmp2 (
   a int primary key,
   b char(40),
   c char(40),
@@ -16,13 +32,16 @@ create temporary table t1tmp (
   f char(40)
 ) engine=myisam;
 
---chmod 0777 $dump_file
---replace_result $dump_file DUMP_FILE
-eval load data infile '$dump_file' into table t1tmp
+--chmod 0777 $dump_file2
+--replace_result $dump_file2 DUMP_FILE2
+eval load data infile '$dump_file2' into table t1tmp2
 fields terminated by ',';
---remove_file $dump_file
 
 select count(*), sum(crc32(concat(a,b,c,d,e,unix_timestamp(f)))) from t1;
-select count(*), sum(crc32(concat(a,b,c,d,replace(e,'/',' '),f))) from t1tmp;
+select count(*), sum(crc32(concat(a,b,c,d,replace(e,'/',' '),f))) from t1tmp2;
+
+drop table t1tmp1;
+drop table t1tmp2;
 
-drop table t1tmp;
+--remove_file $dump_file1
+--remove_file $dump_file2

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-trunk-cluster branch (pekka.nousiainen:3469 to 3472)WL#946Pekka Nousiainen11 Apr