summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorunknown <mhansson/martin@linux-st28.site>2007-10-09 11:36:05 +0200
committerunknown <mhansson/martin@linux-st28.site>2007-10-09 11:36:05 +0200
commita462f34a94ffe2c055dbaf3e2a854911c36edfaa (patch)
tree2d233dfda102d9dabe9cc564b8339c61460e6f73 /mysql-test
parent554d405d73c5618b0dbca4e118a8739932a3a39f (diff)
downloadmariadb-git-a462f34a94ffe2c055dbaf3e2a854911c36edfaa.tar.gz
Bug#30832:Assertion + crash with select name_const('test',now());
Completion of previous patch. Negative number were denied as the second argument to NAME_CONST. mysql-test/r/func_misc.result: Bug#30832 completion: test result mysql-test/t/func_misc.test: Bug#30832 completion: test case added negative numbers sql/item_func.h: Bug#30832 completion The function that represents unary minus is considered a constant if the argument is.
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/func_misc.result6
-rw-r--r--mysql-test/t/func_misc.test2
2 files changed, 8 insertions, 0 deletions
diff --git a/mysql-test/r/func_misc.result b/mysql-test/r/func_misc.result
index bb6f4127a2a..c941790c35b 100644
--- a/mysql-test/r/func_misc.result
+++ b/mysql-test/r/func_misc.result
@@ -195,9 +195,15 @@ NULL
SELECT NAME_CONST('test', 1);
test
1
+SELECT NAME_CONST('test', -1);
+test
+-1
SELECT NAME_CONST('test', 1.0);
test
1.0
+SELECT NAME_CONST('test', -1.0);
+test
+-1.0
SELECT NAME_CONST('test', 'test');
test
test
diff --git a/mysql-test/t/func_misc.test b/mysql-test/t/func_misc.test
index c93e411e691..2c34f77b1ff 100644
--- a/mysql-test/t/func_misc.test
+++ b/mysql-test/t/func_misc.test
@@ -199,7 +199,9 @@ SELECT NAME_CONST('test', UPPER('test'));
SELECT NAME_CONST('test', NULL);
SELECT NAME_CONST('test', 1);
+SELECT NAME_CONST('test', -1);
SELECT NAME_CONST('test', 1.0);
+SELECT NAME_CONST('test', -1.0);
SELECT NAME_CONST('test', 'test');
--echo End of 5.0 tests