Below is the list of changes that have just been committed into a local
6.0 repository of davi. When davi does a push these changes
will be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet@stripped, 2008-05-19 20:04:16-03:00, davi@stripped +3 -0
Remove THD::got_warning. The variable was not really
necessary because if the field store_value fails a warning
is set, otherwise no warning is set.
sql/field.cc@stripped, 2008-05-19 20:04:14-03:00, davi@stripped +2 -12
If store_value returns non-zero, no warning was issued.
sql/sql_class.h@stripped, 2008-05-19 20:04:14-03:00, davi@stripped +0 -1
Remove useless variable, hack was removed.
sql/sql_error.cc@stripped, 2008-05-19 20:04:14-03:00, davi@stripped +0 -1
Remove useless variable, hack was removed.
diff -Nrup a/sql/field.cc b/sql/field.cc
--- a/sql/field.cc 2008-05-19 19:59:10 -03:00
+++ b/sql/field.cc 2008-05-19 20:04:14 -03:00
@@ -2633,12 +2633,6 @@ int Field_new_decimal::store(const char
}
-/**
- @todo
- Fix following when double2my_decimal when double2decimal
- will return E_DEC_TRUNCATED always correctly
-*/
-
int Field_new_decimal::store(double nr)
{
ASSERT_COLUMN_MARKED_FOR_WRITE;
@@ -2652,12 +2646,10 @@ int Field_new_decimal::store(double nr)
{
if (check_overflow(err))
set_value_on_overflow(&decimal_value, decimal_value.sign());
- /* Only issue a warning if store_value doesn't issue an warning */
- table->in_use->got_warning= 0;
}
if (store_value(&decimal_value))
err= 1;
- else if (err && !table->in_use->got_warning)
+ else if (err)
err= warn_if_overflow(err);
DBUG_RETURN(err);
}
@@ -2674,12 +2666,10 @@ int Field_new_decimal::store(longlong nr
{
if (check_overflow(err))
set_value_on_overflow(&decimal_value, decimal_value.sign());
- /* Only issue a warning if store_value doesn't issue an warning */
- table->in_use->got_warning= 0;
}
if (store_value(&decimal_value))
err= 1;
- else if (err && !table->in_use->got_warning)
+ else if (err)
err= warn_if_overflow(err);
return err;
}
diff -Nrup a/sql/sql_class.h b/sql/sql_class.h
--- a/sql/sql_class.h 2008-04-14 07:10:01 -03:00
+++ b/sql/sql_class.h 2008-05-19 20:04:14 -03:00
@@ -1726,7 +1726,6 @@ public:
bool charset_is_character_set_filesystem;
bool enable_slow_log; /* enable slow log for current statement */
bool abort_on_warning;
- bool got_warning; /* Set on call to push_warning() */
bool no_warnings_for_error; /* no warnings on call to my_error() */
/* set during loop of derived table processing */
bool derived_tables_processing;
diff -Nrup a/sql/sql_error.cc b/sql/sql_error.cc
--- a/sql/sql_error.cc 2008-02-19 09:59:07 -03:00
+++ b/sql/sql_error.cc 2008-05-19 20:04:14 -03:00
@@ -115,7 +115,6 @@ MYSQL_ERROR *push_warning(THD *thd, MYSQ
if (thd->query_id != thd->warn_id && !thd->spcont)
mysql_reset_errors(thd, 0);
- thd->got_warning= 1;
/* Abort if we are using strict mode and we are not using IGNORE */
if ((int) level >= (int) MYSQL_ERROR::WARN_LEVEL_WARN &&
| Thread |
|---|
| • bk commit into 6.0 tree (davi:1.2638) | Davi Arnaut | 20 May 2008 |