summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <mhansson/martin@linux-st28.site>2007-10-09 11:37:46 +0200
committerunknown <mhansson/martin@linux-st28.site>2007-10-09 11:37:46 +0200
commit46f2f2ef1136cce2bcc912c65b7e7200f306ee75 (patch)
tree03f78dbdec73264847015d23d7f3b6b81b2a1329
parent7e5f4fe24b0fcd8801cd3d8c0d0968c6e9431dc2 (diff)
parenta462f34a94ffe2c055dbaf3e2a854911c36edfaa (diff)
downloadmariadb-git-46f2f2ef1136cce2bcc912c65b7e7200f306ee75.tar.gz
Merge linux-st28.site:/home/martin/mysql/src/bug30832-again/my50-bug30832-again
into linux-st28.site:/home/martin/mysql/src/bug30832-again/my51-bug30832-again mysql-test/r/func_misc.result: Auto merged mysql-test/t/func_misc.test: Auto merged sql/item_func.h: Auto merged
-rw-r--r--mysql-test/r/func_misc.result6
-rw-r--r--mysql-test/t/func_misc.test2
-rw-r--r--sql/item_func.h1
3 files changed, 9 insertions, 0 deletions
diff --git a/mysql-test/r/func_misc.result b/mysql-test/r/func_misc.result
index 4bd9d0be174..aa75cde0525 100644
--- a/mysql-test/r/func_misc.result
+++ b/mysql-test/r/func_misc.result
@@ -200,9 +200,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 a8715346d0a..4b7685c3633 100644
--- a/mysql-test/t/func_misc.test
+++ b/mysql-test/t/func_misc.test
@@ -208,7 +208,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
diff --git a/sql/item_func.h b/sql/item_func.h
index 8800692f192..c22eb9b9cd9 100644
--- a/sql/item_func.h
+++ b/sql/item_func.h
@@ -436,6 +436,7 @@ public:
longlong int_op();
my_decimal *decimal_op(my_decimal *);
const char *func_name() const { return "-"; }
+ virtual bool basic_const_item() const { return args[0]->basic_const_item(); }
void fix_length_and_dec();
void fix_num_length_and_dec();
uint decimal_precision() const { return args[0]->decimal_precision(); }