summaryrefslogtreecommitdiff
path: root/mysql-test/r/mysql.result
diff options
context:
space:
mode:
authorGeorgi Kodinov <joro@sun.com>2009-01-09 13:50:18 +0200
committerGeorgi Kodinov <joro@sun.com>2009-01-09 13:50:18 +0200
commitac885d5dfbe4c094f693851433516265a57868d6 (patch)
treed2c700b58b3a495ae4d568d4c8e77e8e32bffe14 /mysql-test/r/mysql.result
parent374f49b2629114a9473268da4321af405a9d2394 (diff)
downloadmariadb-git-ac885d5dfbe4c094f693851433516265a57868d6.tar.gz
Bug #41437: Value stored in 'case' lacks charset, causes segfault
When substituting system constant functions with a constant result the server was not expecting that the function may return NULL. Fixed by checking for NULL and returning Item_null (in the relevant collation) if the result of the system constant function was NULL. mysql-test/r/mysql.result: Bug #41437: test case mysql-test/t/mysql.test: Bug #41437: test case. Relies on database() returning NULL if no database is selected. sql/item_strfunc.cc: Bug #41437: Check for NULL result on evaluating the system constant function and return a constant NULL item.
Diffstat (limited to 'mysql-test/r/mysql.result')
-rw-r--r--mysql-test/r/mysql.result2
1 files changed, 2 insertions, 0 deletions
diff --git a/mysql-test/r/mysql.result b/mysql-test/r/mysql.result
index 95bdcab6ba1..9bad3b9f791 100644
--- a/mysql-test/r/mysql.result
+++ b/mysql-test/r/mysql.result
@@ -186,4 +186,6 @@ delimiter
2
2
2
+@z:='1' @z=database()
+1 NULL
End of 5.0 tests