summaryrefslogtreecommitdiff
path: root/sql/item_func.cc
diff options
context:
space:
mode:
authorunknown <serg@serg.mysql.com>2000-11-28 18:11:18 +0100
committerunknown <serg@serg.mysql.com>2000-11-28 18:11:18 +0100
commitb865c72adb710c9cd5378e4b55eda0ffc9352303 (patch)
treeeb5ed1a0abb845262a5b1d5977e66783acd0e227 /sql/item_func.cc
parent85a61b2cce24448f7ea24c75584a6f7061fd94e5 (diff)
downloadmariadb-git-b865c72adb710c9cd5378e4b55eda0ffc9352303.tar.gz
errmsg.txt translated
opt_range.h bugs with const_tables and filesort fixed opt_range.cc bugs with const_tables and filesort fixed item_func.cc bugs with const_tables and filesort fixed ha_myisam.h bugs with const_tables and filesort fixed ha_myisam.cc bugs with const_tables and filesort fixed ft_search.c bugs with const_tables and filesort fixed myisam/ft_search.c: bugs with const_tables and filesort fixed sql/ha_myisam.cc: bugs with const_tables and filesort fixed sql/ha_myisam.h: bugs with const_tables and filesort fixed sql/item_func.cc: bugs with const_tables and filesort fixed sql/opt_range.cc: bugs with const_tables and filesort fixed sql/opt_range.h: bugs with const_tables and filesort fixed sql/share/russian/errmsg.txt: translated
Diffstat (limited to 'sql/item_func.cc')
-rw-r--r--sql/item_func.cc9
1 files changed, 6 insertions, 3 deletions
diff --git a/sql/item_func.cc b/sql/item_func.cc
index 3d002e5c9d9..ac1e3298d02 100644
--- a/sql/item_func.cc
+++ b/sql/item_func.cc
@@ -1840,9 +1840,12 @@ err:
double Item_func_match::val()
{
- // Don't know how to return an error from val(), so NULL will be returned
- if ((null_value=(ft_handler==NULL)))
- return 0.0;
+ /* If called uninitialized we should return neither NULL nor 0 (important
+ for const_tables) so, let's return -1, which is obviously incorrect
+ for normal operation, and could be easily spotted */
+
+ if (ft_handler==NULL)
+ return -1.0;
if (join_key)
{