Below is the list of changes that have just been committed into a local
5.1 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-02-08 10:47:25-02:00, davi@stripped +4 -0
Manual merge of Bug 33798
mysql-test/extra/binlog_tests/binlog.test@stripped, 2008-02-08 10:47:22-02:00, davi@stripped +17 -0
Manual merge of binlog test case for Bug#33798
mysql-test/suite/binlog/r/binlog_row_binlog.result@stripped, 2008-02-08 10:47:22-02:00, davi@stripped +16 -0
Add test case result for Bug#33798
mysql-test/suite/binlog/r/binlog_stm_binlog.result@stripped, 2008-02-08 10:47:22-02:00, davi@stripped +15 -0
Add test case result for Bug#33798
sql/item.cc@stripped, 2008-02-08 10:47:22-02:00, davi@stripped +1 -4
Use new method which accepts a unsigned flag.
diff -Nrup a/mysql-test/extra/binlog_tests/binlog.test b/mysql-test/extra/binlog_tests/binlog.test
--- a/mysql-test/extra/binlog_tests/binlog.test 2008-02-08 10:21:45 -02:00
+++ b/mysql-test/extra/binlog_tests/binlog.test 2008-02-08 10:47:22 -02:00
@@ -108,6 +108,23 @@ drop table t1;
set global binlog_cache_size=@bcs;
set session autocommit = @ac;
+#
+# Bug#33798: prepared statements improperly handle large unsigned ints
+#
+--disable_warnings
+drop table if exists t1;
+--enable_warnings
+reset master;
+create table t1 (a bigint unsigned, b bigint(20) unsigned);
+prepare stmt from "insert into t1 values (?,?)";
+set @a= 9999999999999999;
+set @b= 14632475938453979136;
+execute stmt using @a, @b;
+deallocate prepare stmt;
+drop table t1;
+--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/ /Server ver: [^,]*,/Server version,/
+show binlog events from 0;
+
--echo End of 5.0 tests
# Test of a too big SET INSERT_ID: see if the truncated value goes
diff -Nrup a/mysql-test/suite/binlog/r/binlog_row_binlog.result b/mysql-test/suite/binlog/r/binlog_row_binlog.result
--- a/mysql-test/suite/binlog/r/binlog_row_binlog.result 2007-07-30 08:32:03 -03:00
+++ b/mysql-test/suite/binlog/r/binlog_row_binlog.result 2008-02-08 10:47:22 -02:00
@@ -1072,6 +1072,22 @@ master-bin.000001 30301 Rotate 1 30345 m
drop table t1;
set global binlog_cache_size=@bcs;
set session autocommit = @ac;
+drop table if exists t1;
+reset master;
+create table t1 (a bigint unsigned, b bigint(20) unsigned);
+prepare stmt from "insert into t1 values (?,?)";
+set @a= 9999999999999999;
+set @b= 14632475938453979136;
+execute stmt using @a, @b;
+deallocate prepare stmt;
+drop table t1;
+show binlog events from 0;
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 4 Format_desc 1 106 Server version, Binlog ver: 4
+master-bin.000001 106 Query 1 227 use `test`; create table t1 (a bigint unsigned, b bigint(20) unsigned)
+master-bin.000001 227 Table_map 1 269 table_id: # (test.t1)
+master-bin.000001 269 Write_rows 1 315 table_id: # flags: STMT_END_F
+master-bin.000001 315 Query 1 391 use `test`; drop table t1
End of 5.0 tests
reset master;
create table t1 (id tinyint auto_increment primary key);
diff -Nrup a/mysql-test/suite/binlog/r/binlog_stm_binlog.result b/mysql-test/suite/binlog/r/binlog_stm_binlog.result
--- a/mysql-test/suite/binlog/r/binlog_stm_binlog.result 2008-02-08 10:21:52 -02:00
+++ b/mysql-test/suite/binlog/r/binlog_stm_binlog.result 2008-02-08 10:47:22 -02:00
@@ -579,6 +579,21 @@ master-bin.000001 36593 Rotate 1 36637 m
drop table t1;
set global binlog_cache_size=@bcs;
set session autocommit = @ac;
+drop table if exists t1;
+reset master;
+create table t1 (a bigint unsigned, b bigint(20) unsigned);
+prepare stmt from "insert into t1 values (?,?)";
+set @a= 9999999999999999;
+set @b= 14632475938453979136;
+execute stmt using @a, @b;
+deallocate prepare stmt;
+drop table t1;
+show binlog events from 0;
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 4 Format_desc 1 106 Server version, Binlog ver: 4
+master-bin.000001 106 Query 1 227 use `test`; create table t1 (a bigint unsigned, b bigint(20) unsigned)
+master-bin.000001 227 Query 1 351 use `test`; insert into t1 values (9999999999999999,14632475938453979136)
+master-bin.000001 351 Query 1 427 use `test`; drop table t1
End of 5.0 tests
reset master;
create table t1 (id tinyint auto_increment primary key);
diff -Nrup a/sql/item.cc b/sql/item.cc
--- a/sql/item.cc 2008-02-08 10:21:35 -02:00
+++ b/sql/item.cc 2008-02-08 10:47:22 -02:00
@@ -2926,10 +2926,7 @@ const String *Item_param::query_val_str(
{
switch (state) {
case INT_VALUE:
- if (unsigned_flag)
- str->set((ulonglong) value.integer, &my_charset_bin);
- else
- str->set(value.integer, &my_charset_bin);
+ str->set_int(value.integer, unsigned_flag, &my_charset_bin);
break;
case REAL_VALUE:
str->set_real(value.real, NOT_FIXED_DEC, &my_charset_bin);
| Thread |
|---|
| • bk commit into 5.1 tree (davi:1.2526) | Davi Arnaut | 8 Feb |