From 4fbcb69ef33d7bd3e31db712e346c49e3adfc178 Mon Sep 17 00:00:00 2001 From: "mleich@five.local.lan" <> Date: Mon, 5 May 2008 19:49:17 +0200 Subject: [PATCH] Fix for the latest instability found within funcs_1: ndb_views Bug#31237 Test "ndb_views" fails because of differing order of select results --- mysql-test/suite/funcs_1/r/innodb_views.result | 4 ++-- mysql-test/suite/funcs_1/r/memory_views.result | 4 ++-- mysql-test/suite/funcs_1/r/myisam_views.result | 4 ++-- mysql-test/suite/funcs_1/r/ndb_views.result | 4 ++-- mysql-test/suite/funcs_1/views/views_master.inc | 3 +++ 5 files changed, 11 insertions(+), 8 deletions(-) diff --git a/mysql-test/suite/funcs_1/r/innodb_views.result b/mysql-test/suite/funcs_1/r/innodb_views.result index 77f66d359d0..5abbc3b3481 100644 --- a/mysql-test/suite/funcs_1/r/innodb_views.result +++ b/mysql-test/suite/funcs_1/r/innodb_views.result @@ -22497,8 +22497,8 @@ f1 f2 f4 report 2 NULL <-- 10 --> v1 2 ALTER TABLE t1 CHANGE COLUMN f4 f4 CHAR(8); Warnings: -Warning 1265 Data truncated for column 'f4' at row 4 -Warning 1265 Data truncated for column 'f4' at row 5 +Warning 1265 Data truncated for column 'f4' at row <some number> +Warning 1265 Data truncated for column 'f4' at row <some number> INSERT INTO t1 SET f1 = 3, f4 = '<-- 10 -->', report = 't1 3'; Warnings: Warning 1265 Data truncated for column 'f4' at row 1 diff --git a/mysql-test/suite/funcs_1/r/memory_views.result b/mysql-test/suite/funcs_1/r/memory_views.result index 16de6d89450..5811f4841b4 100644 --- a/mysql-test/suite/funcs_1/r/memory_views.result +++ b/mysql-test/suite/funcs_1/r/memory_views.result @@ -22498,8 +22498,8 @@ f1 f2 f4 report 2 NULL <-- 10 --> v1 2 ALTER TABLE t1 CHANGE COLUMN f4 f4 CHAR(8); Warnings: -Warning 1265 Data truncated for column 'f4' at row 4 -Warning 1265 Data truncated for column 'f4' at row 5 +Warning 1265 Data truncated for column 'f4' at row <some number> +Warning 1265 Data truncated for column 'f4' at row <some number> INSERT INTO t1 SET f1 = 3, f4 = '<-- 10 -->', report = 't1 3'; Warnings: Warning 1265 Data truncated for column 'f4' at row 1 diff --git a/mysql-test/suite/funcs_1/r/myisam_views.result b/mysql-test/suite/funcs_1/r/myisam_views.result index 3915cb47068..43b8c0899b1 100644 --- a/mysql-test/suite/funcs_1/r/myisam_views.result +++ b/mysql-test/suite/funcs_1/r/myisam_views.result @@ -24200,8 +24200,8 @@ f1 f2 f4 report 2 NULL <-- 10 --> v1 2 ALTER TABLE t1 CHANGE COLUMN f4 f4 CHAR(8); Warnings: -Warning 1265 Data truncated for column 'f4' at row 4 -Warning 1265 Data truncated for column 'f4' at row 5 +Warning 1265 Data truncated for column 'f4' at row <some number> +Warning 1265 Data truncated for column 'f4' at row <some number> INSERT INTO t1 SET f1 = 3, f4 = '<-- 10 -->', report = 't1 3'; Warnings: Warning 1265 Data truncated for column 'f4' at row 1 diff --git a/mysql-test/suite/funcs_1/r/ndb_views.result b/mysql-test/suite/funcs_1/r/ndb_views.result index ed61dca3fa1..d0e3b192c6e 100644 --- a/mysql-test/suite/funcs_1/r/ndb_views.result +++ b/mysql-test/suite/funcs_1/r/ndb_views.result @@ -22496,8 +22496,8 @@ f1 f2 f4 report 2 NULL <-- 10 --> v1 2 ALTER TABLE t1 CHANGE COLUMN f4 f4 CHAR(8); Warnings: -Warning 1265 Data truncated for column 'f4' at row 2 -Warning 1265 Data truncated for column 'f4' at row 5 +Warning 1265 Data truncated for column 'f4' at row <some number> +Warning 1265 Data truncated for column 'f4' at row <some number> INSERT INTO t1 SET f1 = 3, f4 = '<-- 10 -->', report = 't1 3'; Warnings: Warning 1265 Data truncated for column 'f4' at row 1 diff --git a/mysql-test/suite/funcs_1/views/views_master.inc b/mysql-test/suite/funcs_1/views/views_master.inc index b6628070705..99eac999ba6 100644 --- a/mysql-test/suite/funcs_1/views/views_master.inc +++ b/mysql-test/suite/funcs_1/views/views_master.inc @@ -3903,6 +3903,9 @@ SELECT * FROM t1 order by f1, report; SELECT * FROM v1 order by f1, report; # # 3. Length of one base table column is reduced +# We have to mangle within warnings the row numbers, because they are not +# deterministic in case of NDB. +--replace_regex /at row [0-9]/at row <some number>/ ALTER TABLE t1 CHANGE COLUMN f4 f4 CHAR(8); INSERT INTO t1 SET f1 = 3, f4 = '<-- 10 -->', report = 't1 3'; INSERT INTO v1 SET f1 = 3, f4 = '<-- 10 -->', report = 'v1 3'; -- 2.30.9