summaryrefslogtreecommitdiff
path: root/sql/item.cc
diff options
context:
space:
mode:
authorunknown <ramil/ram@ramil.myoffice.izhnet.ru>2007-05-24 20:21:04 +0500
committerunknown <ramil/ram@ramil.myoffice.izhnet.ru>2007-05-24 20:21:04 +0500
commit7be03ef01f4a3bdc730e360e43969230a114c3c8 (patch)
tree5929abc2c2174df0f7a69649b74b71a3ab9c7625 /sql/item.cc
parente079e2049990159bc3c798303bcab7d954370235 (diff)
parent5b3b80b44f413925a33580bd4229a14b0d6836fa (diff)
downloadmariadb-git-7be03ef01f4a3bdc730e360e43969230a114c3c8.tar.gz
Merge mysql.com:/home/ram/work/mysql-5.0-maint
into mysql.com:/home/ram/work/b28464.new/b28464.new.5.0 sql/item.h: Auto merged sql/sql_yacc.yy: Auto merged sql/item.cc: SCCS merged
Diffstat (limited to 'sql/item.cc')
-rw-r--r--sql/item.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/sql/item.cc b/sql/item.cc
index 0f5d3c86485..a5dfa0db6b6 100644
--- a/sql/item.cc
+++ b/sql/item.cc
@@ -2313,6 +2313,7 @@ default_set_param_func(Item_param *param,
Item_param::Item_param(unsigned pos_in_query_arg) :
+ strict_type(FALSE),
state(NO_VALUE),
item_result_type(STRING_RESULT),
/* Don't pretend to be a literal unless value for this item is set. */
@@ -2507,6 +2508,8 @@ bool Item_param::set_from_user_var(THD *thd, const user_var_entry *entry)
if (entry && entry->value)
{
item_result_type= entry->type;
+ if (strict_type && required_result_type != item_result_type)
+ DBUG_RETURN(1);
switch (item_result_type) {
case REAL_RESULT:
set_double(*(double*)entry->value);