summaryrefslogtreecommitdiff
path: root/sql/item.cc
diff options
context:
space:
mode:
authorunknown <monty@mishka.mysql.fi>2005-09-14 01:41:44 +0300
committerunknown <monty@mishka.mysql.fi>2005-09-14 01:41:44 +0300
commitf8f1c01675858dcd30d2f29ed3cbc8284baf189e (patch)
treefed5fb311670c7f36e10dc2e65ab02177c47316a /sql/item.cc
parentb50eb4cd42d2d5073afb2af5af8b19c825a9cca1 (diff)
downloadmariadb-git-f8f1c01675858dcd30d2f29ed3cbc8284baf189e.tar.gz
Added option --valgrind-mysqltest to mysql-test-run
Added flag to Field::store(longlong) to specify if value is unsigned. This fixes bug #12750: Incorrect storage of 9999999999999999999 in DECIMAL(19, 0) Fixed warning from valgrind in CREATE ... SELECT Fixed double free of mysql.options if reconnect failed mysql-test/mysql-test-run.sh: Added option --valgrind-mysqltest to allow one to run mysqltest with valgrind mysql-test/r/bigint.result: Update results after fix for Field::store(longlong) mysql-test/r/range.result: Update results after fix for Field::store(longlong) mysql-test/r/strict.result: Update results after fix for Field::store(longlong) (This fixes some wrong results when storing things into bigint columns) mysql-test/r/type_ranges.result: Update results after fix for Field::store(longlong) mysql-test/t/bigint.test: Added testing for #12750: Incorrect storage of 9999999999999999999 in DECIMAL(19, 0) mysql-test/t/innodb.test: Removed comments affected by this bug fix mysql-test/t/mysqldump.test: Fixed result to not depend on existing config files mysql-test/t/range.test: 0xff numbers are now unsigned mysql-test/t/strict.test: Added errors for things that previously (wrongly) succeeded sql-common/client.c: Fixed double free of mysql.options if reconnect failed sql/field.cc: Added flag to Field::store(longlong) to specify if value is unsigned sql/field.h: Added flag to Field::store(longlong) to specify if value is unsigned sql/field_conv.cc: Fixed calls to Field::store(longlong,flag) sql/ha_ndbcluster.cc: Fixed calls to Field::store(longlong,flag) sql/handler.cc: Fixed calls to Field::store(longlong,flag) sql/item.cc: Fixed calls to Field::store(longlong,flag) sql/item_sum.cc: Fixed calls to Field::store(longlong,flag) sql/sp.cc: Fixed calls to Field::store(longlong,flag) sql/sql_acl.cc: Fixed calls to Field::store(longlong,flag) sql/sql_help.cc: Fixed calls to Field::store(longlong,flag) sql/sql_show.cc: Fixed calls to Field::store(longlong,flag) sql/sql_table.cc: Fixed varning from valgrind sql/sql_udf.cc: Fixed calls to Field::store(longlong,flag) sql/tztime.cc: Fixed calls to Field::store(longlong,flag) sql/unireg.cc: Fixed calls to Field::store(longlong,flag)
Diffstat (limited to 'sql/item.cc')
-rw-r--r--sql/item.cc14
1 files changed, 6 insertions, 8 deletions
diff --git a/sql/item.cc b/sql/item.cc
index e7da646ae73..2086d8cc161 100644
--- a/sql/item.cc
+++ b/sql/item.cc
@@ -2341,7 +2341,7 @@ int Item_param::save_in_field(Field *field, bool no_conversions)
switch (state) {
case INT_VALUE:
- return field->store(value.integer);
+ return field->store(value.integer, unsigned_flag);
case REAL_VALUE:
return field->store(value.real);
case DECIMAL_VALUE:
@@ -3895,7 +3895,7 @@ int Item::save_in_field(Field *field, bool no_conversions)
if (null_value)
return set_field_to_null_with_conversions(field, no_conversions);
field->set_notnull();
- error=field->store(nr);
+ error=field->store(nr, unsigned_flag);
}
return error;
}
@@ -3911,12 +3911,10 @@ int Item_string::save_in_field(Field *field, bool no_conversions)
return field->store(result->ptr(),result->length(),collation.collation);
}
+
int Item_uint::save_in_field(Field *field, bool no_conversions)
{
- /*
- TODO: To be fixed when wen have a
- field->store(longlong, unsigned_flag) method
- */
+ /* Item_int::save_in_field handles both signed and unsigned. */
return Item_int::save_in_field(field, no_conversions);
}
@@ -3927,7 +3925,7 @@ int Item_int::save_in_field(Field *field, bool no_conversions)
if (null_value)
return set_field_to_null(field);
field->set_notnull();
- return field->store(nr);
+ return field->store(nr, unsigned_flag);
}
@@ -4134,7 +4132,7 @@ int Item_hex_string::save_in_field(Field *field, bool no_conversions)
else
{
longlong nr=val_int();
- error=field->store(nr);
+ error=field->store(nr, TRUE); // Assume hex numbers are unsigned
}
return error;
}