From 77f59b989cacc3aa4147047f5b8ffdd1a3c8c98d Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 26 Nov 2007 21:28:01 +0100 Subject: patch for bug#32496 (2nd) with ansi conformant and Mysql test case. BitKeeper/etc/ignore: Added scripts/make_win_src_distribution_old server-tools/instance-manager/net_serv.cc to the ignore list --- mysql-test/suite/funcs_1/r/innodb_views.result | 15 +++++++++++---- mysql-test/suite/funcs_1/r/memory_views.result | 15 +++++++++++---- mysql-test/suite/funcs_1/r/myisam_views.result | 15 +++++++++++---- mysql-test/suite/funcs_1/views/views_master.inc | 9 +++++++++ 4 files changed, 42 insertions(+), 12 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/suite/funcs_1/r/innodb_views.result b/mysql-test/suite/funcs_1/r/innodb_views.result index 3bb56a82612..7f94f266102 100644 --- a/mysql-test/suite/funcs_1/r/innodb_views.result +++ b/mysql-test/suite/funcs_1/r/innodb_views.result @@ -9836,16 +9836,23 @@ f2 two SET sql_mode = 'traditional,ansi'; CREATE OR REPLACE VIEW v1 AS +SELECT f3 AS "pure column f3:", f1 + f3 AS "sum of columns f1 + f3 =", +3 * (- 0.11111E+1) AS "product of constants 3 * (- 0.11111E+1):", +'->' || CAST(f3 AS CHAR) || '<-' + AS "expression with '||'=CONCAT and CAST(DECIMAL column AS CHAR):" +FROM t1 WHERE f1 = 2; +CREATE OR REPLACE VIEW v1 AS SELECT f3 AS "pure column f3: ", f1 + f3 AS "sum of columns f1 + f3 = ", 3 * (- 0.11111E+1) AS "product of constants 3 * (- 0.11111E+1): ", '->' || CAST(f3 AS CHAR) || '<-' AS "expression with '||'=CONCAT and CAST(DECIMAL column AS CHAR): " FROM t1 WHERE f1 = 2; +ERROR 42000: Incorrect column name 'pure column f3: ' SELECT * FROM v1; -pure column f3: 2.20000 -sum of columns f1 + f3 = 4.20000 -product of constants 3 * (- 0.11111E+1): -3.3333 -expression with '||'=CONCAT and CAST(DECIMAL column AS CHAR): ->2.20000<- +pure column f3: 2.20000 +sum of columns f1 + f3 = 4.20000 +product of constants 3 * (- 0.11111E+1): -3.3333 +expression with '||'=CONCAT and CAST(DECIMAL column AS CHAR): ->2.20000<- SET sql_mode = ''; Testcases 3.3.1.55 - 3.3.1.62 diff --git a/mysql-test/suite/funcs_1/r/memory_views.result b/mysql-test/suite/funcs_1/r/memory_views.result index 69dee081446..5fae2f8700a 100644 --- a/mysql-test/suite/funcs_1/r/memory_views.result +++ b/mysql-test/suite/funcs_1/r/memory_views.result @@ -9841,16 +9841,23 @@ f2 two SET sql_mode = 'traditional,ansi'; CREATE OR REPLACE VIEW v1 AS +SELECT f3 AS "pure column f3:", f1 + f3 AS "sum of columns f1 + f3 =", +3 * (- 0.11111E+1) AS "product of constants 3 * (- 0.11111E+1):", +'->' || CAST(f3 AS CHAR) || '<-' + AS "expression with '||'=CONCAT and CAST(DECIMAL column AS CHAR):" +FROM t1 WHERE f1 = 2; +CREATE OR REPLACE VIEW v1 AS SELECT f3 AS "pure column f3: ", f1 + f3 AS "sum of columns f1 + f3 = ", 3 * (- 0.11111E+1) AS "product of constants 3 * (- 0.11111E+1): ", '->' || CAST(f3 AS CHAR) || '<-' AS "expression with '||'=CONCAT and CAST(DECIMAL column AS CHAR): " FROM t1 WHERE f1 = 2; +ERROR 42000: Incorrect column name 'pure column f3: ' SELECT * FROM v1; -pure column f3: 2.20000 -sum of columns f1 + f3 = 4.20000 -product of constants 3 * (- 0.11111E+1): -3.3333 -expression with '||'=CONCAT and CAST(DECIMAL column AS CHAR): ->2.20000<- +pure column f3: 2.20000 +sum of columns f1 + f3 = 4.20000 +product of constants 3 * (- 0.11111E+1): -3.3333 +expression with '||'=CONCAT and CAST(DECIMAL column AS CHAR): ->2.20000<- SET sql_mode = ''; Testcases 3.3.1.55 - 3.3.1.62 diff --git a/mysql-test/suite/funcs_1/r/myisam_views.result b/mysql-test/suite/funcs_1/r/myisam_views.result index 83af04dcd2c..6f80aa12097 100644 --- a/mysql-test/suite/funcs_1/r/myisam_views.result +++ b/mysql-test/suite/funcs_1/r/myisam_views.result @@ -9858,16 +9858,23 @@ f2 two SET sql_mode = 'traditional,ansi'; CREATE OR REPLACE VIEW v1 AS +SELECT f3 AS "pure column f3:", f1 + f3 AS "sum of columns f1 + f3 =", +3 * (- 0.11111E+1) AS "product of constants 3 * (- 0.11111E+1):", +'->' || CAST(f3 AS CHAR) || '<-' + AS "expression with '||'=CONCAT and CAST(DECIMAL column AS CHAR):" +FROM t1 WHERE f1 = 2; +CREATE OR REPLACE VIEW v1 AS SELECT f3 AS "pure column f3: ", f1 + f3 AS "sum of columns f1 + f3 = ", 3 * (- 0.11111E+1) AS "product of constants 3 * (- 0.11111E+1): ", '->' || CAST(f3 AS CHAR) || '<-' AS "expression with '||'=CONCAT and CAST(DECIMAL column AS CHAR): " FROM t1 WHERE f1 = 2; +ERROR 42000: Incorrect column name 'pure column f3: ' SELECT * FROM v1; -pure column f3: 2.20000 -sum of columns f1 + f3 = 4.20000 -product of constants 3 * (- 0.11111E+1): -3.3333 -expression with '||'=CONCAT and CAST(DECIMAL column AS CHAR): ->2.20000<- +pure column f3: 2.20000 +sum of columns f1 + f3 = 4.20000 +product of constants 3 * (- 0.11111E+1): -3.3333 +expression with '||'=CONCAT and CAST(DECIMAL column AS CHAR): ->2.20000<- SET sql_mode = ''; Testcases 3.3.1.55 - 3.3.1.62 diff --git a/mysql-test/suite/funcs_1/views/views_master.inc b/mysql-test/suite/funcs_1/views/views_master.inc index b06873af159..6c4992d235c 100644 --- a/mysql-test/suite/funcs_1/views/views_master.inc +++ b/mysql-test/suite/funcs_1/views/views_master.inc @@ -2410,6 +2410,15 @@ SELECT * FROM v1; # 3.3.1.54 --vertical_results SET sql_mode = 'traditional,ansi'; +# due to bug#32496 "no trailing blanks in identifier". +CREATE OR REPLACE VIEW v1 AS +SELECT f3 AS "pure column f3:", f1 + f3 AS "sum of columns f1 + f3 =", + 3 * (- 0.11111E+1) AS "product of constants 3 * (- 0.11111E+1):", + '->' || CAST(f3 AS CHAR) || '<-' + AS "expression with '||'=CONCAT and CAST(DECIMAL column AS CHAR):" +FROM t1 WHERE f1 = 2; +# This error is not conformant with ansi (see bug#32496). hhunger +--error ER_WRONG_COLUMN_NAME CREATE OR REPLACE VIEW v1 AS SELECT f3 AS "pure column f3: ", f1 + f3 AS "sum of columns f1 + f3 = ", 3 * (- 0.11111E+1) AS "product of constants 3 * (- 0.11111E+1): ", -- cgit v1.2.1