summaryrefslogtreecommitdiff
path: root/mysql-test/t/func_system.test
diff options
context:
space:
mode:
authorunknown <bar@mysql.com>2005-08-08 19:09:54 +0500
committerunknown <bar@mysql.com>2005-08-08 19:09:54 +0500
commitd3a6f4082fa5c50881b4344a23d157f8c3c5009d (patch)
tree9bdb449b91e6b7a6573d54fc11844c6e6a0115be /mysql-test/t/func_system.test
parente63010037479aaebb191e43032b5f5365419a48c (diff)
downloadmariadb-git-d3a6f4082fa5c50881b4344a23d157f8c3c5009d.tar.gz
func_system.result, func_system.test:
adding test case item_strfunc.cc: Bug#12351 CONCAT with USER()/DATEBASE() and a column gets strange results. Mark created Item_str as constant, so CONCAT cannot reuse it for optimization purposes. sql/item_strfunc.cc: Bug#12351 CONCAT with USER()/DATEBASE() and a column gets strange results mysql-test/t/func_system.test: adding test case mysql-test/r/func_system.result: adding test case
Diffstat (limited to 'mysql-test/t/func_system.test')
-rw-r--r--mysql-test/t/func_system.test12
1 files changed, 12 insertions, 0 deletions
diff --git a/mysql-test/t/func_system.test b/mysql-test/t/func_system.test
index d7e215f5d48..4a526935491 100644
--- a/mysql-test/t/func_system.test
+++ b/mysql-test/t/func_system.test
@@ -32,6 +32,18 @@ drop table t1;
select TRUE,FALSE,NULL;
#
+# Bug#12351: CONCAT with USER()/DATEBASE() and
+# a constant and a column gets strange results
+#
+create table t1 (c1 char(5)) character set=latin1;
+insert into t1 values('row 1');
+insert into t1 values('row 2');
+insert into t1 values('row 3');
+select concat(user(), '--', c1) from t1;
+select concat(database(), '--', c1) from t1;
+drop table t1;
+
+#
# Bug#8291 Illegal collation mix with USER() function
#
create table t1 (a char(10)) character set latin1;