summaryrefslogtreecommitdiff
path: root/sql/procedure.h
diff options
context:
space:
mode:
authorunknown <monty@mysql.com>2005-01-15 17:38:43 +0200
committerunknown <monty@mysql.com>2005-01-15 17:38:43 +0200
commit6ead860060ebeae29f46d6c89f0bf7a45e748819 (patch)
tree9532a0d754f20c628deab518965a132839dbb1cb /sql/procedure.h
parent2f246d2ff62ff284f035208fa9de98f1508d94ec (diff)
downloadmariadb-git-6ead860060ebeae29f46d6c89f0bf7a45e748819.tar.gz
After merge fixes
Fix for BIT(X) field as string mysql-test/r/func_gconcat.result: Fix wrong merge mysql-test/r/func_sapdb.result: Use results so that dimitry can fix them properly mysql-test/r/innodb.result: Update test after fast TRUNCATE in InnoDB mysql-test/r/ps_1general.result: After megre fixes mysql-test/r/type_bit.result: New test to verify patch for Bit fields mysql-test/t/ps_1general.test: After merge fixes mysql-test/t/type_bit.test: New test to verify patch for Bit fields sql/field.cc: Fix for new my_strntod() Fix for BIT(X) field as string sql/item.h: Fix for new my_strntod() sql/item_func.h: Fix for new my_strntod() sql/item_sum.h: Fix for new my_strntod() sql/procedure.h: Fix for new my_strntod() sql/sql_base.cc: Port fix for INSERT DELAYED with prepared statements to 5.0
Diffstat (limited to 'sql/procedure.h')
-rw-r--r--sql/procedure.h17
1 files changed, 13 insertions, 4 deletions
diff --git a/sql/procedure.h b/sql/procedure.h
index 4212a9246a5..33c1288c88e 100644
--- a/sql/procedure.h
+++ b/sql/procedure.h
@@ -59,10 +59,18 @@ public:
void set(double nr) { value=nr; }
void set(longlong nr) { value=(double) nr; }
void set(const char *str,uint length,CHARSET_INFO *cs)
- { int err; value=my_strntod(cs,(char*) str,length,(char**)0,&err); }
+ {
+ int err_not_used;
+ char *end_not_used;
+ value= my_strntod(cs,(char*) str,length, &end_not_used, &err_not_used);
+ }
double val_real() { return value; }
longlong val_int() { return (longlong) value; }
- String *val_str(String *s) { s->set(value,decimals,default_charset()); return s; }
+ String *val_str(String *s)
+ {
+ s->set(value,decimals,default_charset());
+ return s;
+ }
unsigned int size_of() { return sizeof(*this);}
};
@@ -98,10 +106,11 @@ public:
{ str_value.copy(str,length,cs); }
double val_real()
{
- int err;
+ int err_not_used;
+ char *end_not_used;
CHARSET_INFO *cs=str_value.charset();
return my_strntod(cs, (char*) str_value.ptr(), str_value.length(),
- (char**) 0, &err);
+ &end_not_used, &err_not_used);
}
longlong val_int()
{