Below is the list of changes that have just been committed into a local
5.0 repository of ram. When ram 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
1.1810 05/03/14 16:37:08 ramil@stripped +3 -0
A fix (bug #8484: Traditional: STRICT_TRANS_TABLES and STRICT_ALL_TABLES don't work ).
sql/item_func.cc
1.173 05/03/14 16:36:58 ramil@stripped +2 -1
A fix (bug #8484: Traditional: STRICT_TRANS_TABLES and STRICT_ALL_TABLES don't work ).
We don't have MODE_ERROR_FOR_DIVISION_BY_ZERO set for
mode='STRICT_TRANS_TABLES' and mode='STRICT_ALL_TABLES', so
we should issue an error too if abort_on_warning is set (i.e).
mysql-test/t/strict.test
1.18 05/03/14 16:36:58 ramil@stripped +19 -0
A fix (bug #8484: Traditional: STRICT_TRANS_TABLES and STRICT_ALL_TABLES don't work ).
mysql-test/r/strict.result
1.19 05/03/14 16:36:58 ramil@stripped +16 -0
A fix (bug #8484: Traditional: STRICT_TRANS_TABLES and STRICT_ALL_TABLES don't work ).
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: ramil
# Host: gw.mysql.r18.ru
# Root: /usr/home/ram/work/5.0
--- 1.172/sql/item_func.cc 2005-03-10 01:52:48 +04:00
+++ 1.173/sql/item_func.cc 2005-03-14 16:36:58 +04:00
@@ -659,7 +659,8 @@
void Item_func::signal_divide_by_null()
{
THD *thd= current_thd;
- if (thd->variables.sql_mode & MODE_ERROR_FOR_DIVISION_BY_ZERO)
+ if (thd->variables.sql_mode & MODE_ERROR_FOR_DIVISION_BY_ZERO ||
+ thd->abort_on_warning)
push_warning(thd, MYSQL_ERROR::WARN_LEVEL_ERROR, ER_DIVISION_BY_ZERO,
ER(ER_DIVISION_BY_ZERO));
null_value= 1;
--- 1.18/mysql-test/r/strict.result 2005-03-10 17:08:40 +04:00
+++ 1.19/mysql-test/r/strict.result 2005-03-14 16:36:58 +04:00
@@ -1030,3 +1030,19 @@
select * from t1;
charcol varcharcol binarycol varbinarycol tinytextcol tinyblobcol
drop table t1;
+create table t1 (a int);
+set sql_mode='';
+insert into t1 values(5/0);
+set sql_mode='traditional';
+insert into t1 values(5/0);
+ERROR 22012: Division by 0
+set sql_mode='strict_trans_tables';
+insert into t1 values(5/0);
+ERROR 22012: Division by 0
+set sql_mode='strict_all_tables';
+insert into t1 values(5/0);
+ERROR 22012: Division by 0
+select * from t1;
+a
+NULL
+drop table t1;
--- 1.17/mysql-test/t/strict.test 2005-03-10 17:08:40 +04:00
+++ 1.18/mysql-test/t/strict.test 2005-03-14 16:36:58 +04:00
@@ -962,3 +962,22 @@
insert into t1 (tinyblobcol) values (repeat('x',256));
select * from t1;
drop table t1;
+
+#
+# Bug #8484: Traditional: STRICT_TRANS_TABLES and STRICT_ALL_TABLES don't work
+#
+
+create table t1 (a int);
+set sql_mode='';
+insert into t1 values(5/0);
+set sql_mode='traditional';
+--error 1365
+insert into t1 values(5/0);
+set sql_mode='strict_trans_tables';
+--error 1365
+insert into t1 values(5/0);
+set sql_mode='strict_all_tables';
+--error 1365
+insert into t1 values(5/0);
+select * from t1;
+drop table t1;
| Thread |
|---|
| • bk commit into 5.0 tree (ramil:1.1810) BUG#8484 | ramil | 14 Mar |