Below is the list of changes that have just been committed into a local
5.0 repository of guilhem. When guilhem 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.2063 06/02/18 17:32:15 guilhem@stripped +3 -0
Fix for BUG#13897 "failure to do SET SQL_MODE=N where N is a number > 31" (the
original bug's title isn't the simplest
symptom). sys_var::check_set() was wrong. mysqlbinlog makes use of such SET SQL_MODE=N
(where N is interpreted like if SQL_MODE was a field of type SET), so
this bug affected recovery from binlogs if the server was running with certain SQL_MODE
values,
for example the default values on Windows (STRICT_TRANS_TABLES); to work around this bug
people
had to edit mysqlbinlog's output.
sql/set_var.cc
1.150 06/02/18 17:32:11 guilhem@stripped +6 -1
For a set, it does not make sense to test if the supplied argument exceeds the number
of elements in the set
(such test would make sense for an enum), but rather to check if it exceeds 2^this (to
verify
that only reasonable bits are set).
mysql-test/t/sql_mode.test
1.17 06/02/18 17:32:11 guilhem@stripped +9 -0
test for various numeric SQL_MODE values
mysql-test/r/sql_mode.result
1.33 06/02/18 17:32:11 guilhem@stripped +16 -0
result update
# 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: guilhem
# Host: gbichot3.local
# Root: /home/mysql_src/mysql-5.0
--- 1.32/mysql-test/r/sql_mode.result 2005-10-27 23:18:10 +02:00
+++ 1.33/mysql-test/r/sql_mode.result 2006-02-18 17:32:11 +01:00
@@ -478,4 +478,20 @@
create view v2 as select a from t2 where a in (select a from v1);
drop view v2, v1;
drop table t1, t2;
+select @@sql_mode;
+@@sql_mode
+ANSI_QUOTES
+set sql_mode=2097152;
+select @@sql_mode;
+@@sql_mode
+STRICT_TRANS_TABLES
+set sql_mode=16384+(65536*4);
+select @@sql_mode;
+@@sql_mode
+REAL_AS_FLOAT,PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,NO_TABLE_OPTIONS,ANSI
+set sql_mode=2147483648;
+ERROR 42000: Variable 'sql_mode' can't be set to the value of '2147483648'
+select @@sql_mode;
+@@sql_mode
+REAL_AS_FLOAT,PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,NO_TABLE_OPTIONS,ANSI
SET @@SQL_MODE=@OLD_SQL_MODE;
--- 1.16/mysql-test/t/sql_mode.test 2005-10-27 23:18:10 +02:00
+++ 1.17/mysql-test/t/sql_mode.test 2006-02-18 17:32:11 +01:00
@@ -255,4 +255,13 @@
drop view v2, v1;
drop table t1, t2;
+select @@sql_mode;
+set sql_mode=2097152;
+select @@sql_mode;
+set sql_mode=16384+(65536*4);
+select @@sql_mode;
+--error 1231
+set sql_mode=2147483648; # that mode does not exist
+select @@sql_mode;
+
SET @@SQL_MODE=@OLD_SQL_MODE;
--- 1.149/sql/set_var.cc 2006-02-14 05:24:58 +01:00
+++ 1.150/sql/set_var.cc 2006-02-18 17:32:11 +01:00
@@ -1659,7 +1659,12 @@
else
{
ulonglong tmp= var->value->val_int();
- if (tmp >= enum_names->count)
+ /*
+ For when the enum is made to contain 64 elements, as 1ULL<<64 is
+ undefined, we guard with a "count<64" test.
+ */
+ if (unlikely((tmp >= ((ULL(1)) << enum_names->count)) &&
+ (enum_names->count < 64)))
{
llstr(tmp, buff);
goto err;
| Thread |
|---|
| • bk commit into 5.0 tree (guilhem:1.2063) BUG#13897 | guilhem | 18 Feb |