Below is the list of changes that have just been committed into a local
5.1 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@stripped, 2007-05-24 15:42:46+05:00, ramil@stripped +6 -0
Merge mysql.com:/home/ram/work/b26842/b26842.5.0
into mysql.com:/home/ram/work/b26842/b26842.5.1
MERGE: 1.1810.2938.20
BitKeeper/deleted/.del-ctype_cp932_notembedded.result~f8bc6ad0446e82e3@stripped, 2007-05-24
15:38:22+05:00, ramil@stripped +0 -1
MERGE: 1.1.2.2
BitKeeper/deleted/.del-ctype_cp932_notembedded.result~f8bc6ad0446e82e3@stripped,
2007-05-24 15:36:59+05:00, ramil@stripped +0 -0
Merge rename: mysql-test/r/ctype_cp932_notembedded.result ->
BitKeeper/deleted/.del-ctype_cp932_notembedded.result~f8bc6ad0446e82e3
mysql-test/extra/binlog_tests/ctype_cp932_binlog.test@stripped, 2007-05-24 15:40:46+05:00,
ramil@stripped +0 -1
MERGE: 1.2.3.2
mysql-test/extra/binlog_tests/ctype_cp932_binlog.test@stripped, 2007-05-24
15:36:59+05:00, ramil@stripped +0 -0
Merge rename: mysql-test/t/ctype_cp932_binlog.test ->
mysql-test/extra/binlog_tests/ctype_cp932_binlog.test
mysql-test/r/binlog_stm_ctype_ucs.result@stripped, 2007-05-24 15:41:06+05:00,
ramil@stripped +0 -7
MERGE: 1.2.5.2
mysql-test/r/binlog_stm_ctype_ucs.result@stripped, 2007-05-24 15:36:59+05:00,
ramil@stripped +0 -0
Merge rename: mysql-test/r/ctype_cp932_binlog.result ->
mysql-test/r/binlog_stm_ctype_ucs.result
mysql-test/r/rpl_user_variables.result@stripped, 2007-05-24 15:41:30+05:00,
ramil@stripped +0 -37
MERGE: 1.14.1.5
mysql-test/t/rpl_user_variables.test@stripped, 2007-05-24 15:42:41+05:00,
ramil@stripped +0 -39
MERGE: 1.12.1.4
sql/sql_prepare.cc@stripped, 2007-05-24 15:36:59+05:00, ramil@stripped +0
-0
Auto merged
MERGE: 1.142.1.61
# 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: ramil.myoffice.izhnet.ru
# Root: /home/ram/work/b26842/b26842.5.1/RESYNC
--- 1.2.5.1/mysql-test/r/ctype_cp932_binlog.result 2007-05-24 15:42:51 +05:00
+++ 1.15/mysql-test/r/binlog_stm_ctype_ucs.result 2007-05-24 15:42:51 +05:00
@@ -1,45 +1,27 @@
-drop table if exists t1;
-set names cp932;
-set character_set_database = cp932;
-RESET MASTER;
-CREATE TABLE t1(f1 blob);
-PREPARE stmt1 FROM 'INSERT INTO t1 VALUES(?)';
-SET @var1= x'8300';
-EXECUTE stmt1 USING @var1;
-SHOW BINLOG EVENTS FROM 98;
+SET TIMESTAMP=10000;
+create table t2 (c char(30)) charset=ucs2;
+set @v=convert('abc' using ucs2);
+reset master;
+insert into t2 values (@v);
+show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
-master-bin.000001 98 Query 1 188 use `test`; CREATE TABLE t1(f1 blob)
-master-bin.000001 188 Query 1 283 use `test`; INSERT INTO t1 VALUES(0x8300)
-SELECT HEX(f1) FROM t1;
-HEX(f1)
-8300
-DROP table t1;
-CREATE TABLE t4 (s1 CHAR(50) CHARACTER SET latin1,
-s2 CHAR(50) CHARACTER SET cp932,
-d DECIMAL(10,2))|
-CREATE PROCEDURE bug18293 (IN ins1 CHAR(50),
-IN ins2 CHAR(50) CHARACTER SET cp932,
-IN ind DECIMAL(10,2))
-BEGIN
-INSERT INTO t4 VALUES (ins1, ins2, ind);
-END|
-CALL bug18293("Foo's a Bar", _cp932 0xED40ED41ED42, 47.93)|
-SELECT HEX(s1),HEX(s2),d FROM t4|
-HEX(s1) HEX(s2) d
-466F6F2773206120426172 ED40ED41ED42 47.93
-DROP PROCEDURE bug18293|
-DROP TABLE t4|
-SHOW BINLOG EVENTS FROM 362|
-Log_name Pos Event_type Server_id End_log_pos Info
-master-bin.000001 362 Query 1 528 use `test`; CREATE TABLE t4 (s1 CHAR(50) CHARACTER SET
latin1,
-s2 CHAR(50) CHARACTER SET cp932,
-d DECIMAL(10,2))
-master-bin.000001 528 Query 1 776 use `test`; CREATE DEFINER=`root`@`localhost` PROCEDURE
bug18293 (IN ins1 CHAR(50),
-IN ins2 CHAR(50) CHARACTER SET cp932,
-IN ind DECIMAL(10,2))
-BEGIN
-INSERT INTO t4 VALUES (ins1, ins2, ind);
-END
-master-bin.000001 776 Query 1 995 use `test`; INSERT INTO t4 VALUES (
NAME_CONST('ins1',_latin1 0x466F6F2773206120426172), NAME_CONST('ins2',_cp932
0xED40ED41ED42), NAME_CONST('ind',47.93))
-master-bin.000001 995 Query 1 1084 use `test`; DROP PROCEDURE bug18293
-master-bin.000001 1084 Query 1 1163 use `test`; DROP TABLE t4
+master-bin.000001 # User var # # @`v`=_ucs2 0x006100620063 COLLATE ucs2_general_ci
+master-bin.000001 # Query # # use `test`; insert into t2 values (@v)
+flush logs;
+/*!40019 SET @@session.max_insert_delayed_threads=0*/;
+/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
+DELIMITER /*!*/;
+ROLLBACK/*!*/;
+SET @`v`:=_ucs2 0x006100620063 COLLATE `ucs2_general_ci`/*!*/;
+use test/*!*/;
+SET TIMESTAMP=10000/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1,
@@session.unique_checks=1/*!*/;
+SET @@session.sql_mode=0/*!*/;
+/*!\C latin1 *//*!*/;
+SET
@@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+insert into t2 values (@v)/*!*/;
+DELIMITER ;
+# End of log file
+ROLLBACK /* added by mysqlbinlog */;
+/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
+drop table t2;
--- 1.2.3.1/mysql-test/t/ctype_cp932_binlog.test 2007-05-24 15:42:51 +05:00
+++ 1.10/mysql-test/extra/binlog_tests/ctype_cp932_binlog.test 2007-05-24 15:42:51 +05:00
@@ -26,32 +26,9 @@ SET @var1= x'8300';
# code (and I have used it to test the fix) until there is some way to
# exercise this code from mysql-test-run.
EXECUTE stmt1 USING @var1;
-SHOW BINLOG EVENTS FROM 98;
+source include/show_binlog_events.inc;
SELECT HEX(f1) FROM t1;
DROP table t1;
# end test for bug#11338
# End of 4.1 tests
-
-#
-# Bug#18293: Values in stored procedure written to binlog unescaped
-#
-
-delimiter |;
-CREATE TABLE t4 (s1 CHAR(50) CHARACTER SET latin1,
- s2 CHAR(50) CHARACTER SET cp932,
- d DECIMAL(10,2))|
-CREATE PROCEDURE bug18293 (IN ins1 CHAR(50),
- IN ins2 CHAR(50) CHARACTER SET cp932,
- IN ind DECIMAL(10,2))
- BEGIN
- INSERT INTO t4 VALUES (ins1, ins2, ind);
- END|
-CALL bug18293("Foo's a Bar", _cp932 0xED40ED41ED42, 47.93)|
-SELECT HEX(s1),HEX(s2),d FROM t4|
-DROP PROCEDURE bug18293|
-DROP TABLE t4|
-SHOW BINLOG EVENTS FROM 362|
-delimiter ;|
-
-# End of 5.0 tests
--- 1.1.2.1/mysql-test/r/ctype_cp932_notembedded.result 2007-05-24 15:42:51 +05:00
+++ 1.5/BitKeeper/deleted/.del-ctype_cp932_notembedded.result~f8bc6ad0446e82e3 2007-05-24
15:42:51 +05:00
@@ -6,10 +6,11 @@ CREATE TABLE t1(f1 blob);
PREPARE stmt1 FROM 'INSERT INTO t1 VALUES(?)';
SET @var1= x'8300';
EXECUTE stmt1 USING @var1;
-SHOW BINLOG EVENTS FROM 98;
+SHOW BINLOG EVENTS FROM 102;
Log_name Pos Event_type Server_id End_log_pos Info
-master-bin.000001 98 Query 1 188 use `test`; CREATE TABLE t1(f1 blob)
-master-bin.000001 188 Query 1 283 use `test`; INSERT INTO t1 VALUES(0x8300)
+master-bin.000001 102 Query 1 189 use `test`; CREATE TABLE t1(f1 blob)
+master-bin.000001 189 User var 1 228 @`var1`=_binary 0x8300 COLLATE binary
+master-bin.000001 228 Query 1 321 use `test`; INSERT INTO t1 VALUES(@'var1')
SELECT HEX(f1) FROM t1;
HEX(f1)
8300
--- 1.217/sql/sql_prepare.cc 2007-05-24 15:42:51 +05:00
+++ 1.218/sql/sql_prepare.cc 2007-05-24 15:42:51 +05:00
@@ -981,6 +981,7 @@ static bool insert_params_from_vars_with
String buf;
const String *val;
uint32 length= 0;
+ THD *thd= stmt->thd;
DBUG_ENTER("insert_params_from_vars");
@@ -991,34 +992,20 @@ static bool insert_params_from_vars_with
{
Item_param *param= *it;
varname= var_it++;
- if (get_var_with_binlog(stmt->thd, stmt->lex->sql_command,
- *varname, &entry))
- DBUG_RETURN(1);
- if (param->set_from_user_var(stmt->thd, entry))
+ entry= (user_var_entry *) hash_search(&thd->user_vars, (byte*)
varname->str,
+ varname->length);
+ /*
+ We have to call the setup_one_conversion_function() here to set
+ the parameter's members that might be needed further
+ (e.g. value.cs_info.character_set_client is used in the query_val_str()).
+ */
+ setup_one_conversion_function(thd, param, param->param_type);
+ if (param->set_from_user_var(thd, entry))
DBUG_RETURN(1);
- /* Insert @'escaped-varname' instead of parameter in the query */
- if (entry)
- {
- char *start, *ptr;
- buf.length(0);
- if (buf.reserve(entry->name.length*2+3))
- DBUG_RETURN(1);
+ val= param->query_val_str(&buf);
- start= ptr= buf.c_ptr_quick();
- *ptr++= '@';
- *ptr++= '\'';
- ptr+= escape_string_for_mysql(&my_charset_utf8_general_ci,
- ptr, 0, entry->name.str,
- entry->name.length);
- *ptr++= '\'';
- buf.length(ptr - start);
- val= &buf;
- }
- else
- val= &my_null_string;
-
- if (param->convert_str_value(stmt->thd))
+ if (param->convert_str_value(thd))
DBUG_RETURN(1); /* out of memory */
if (query->replace(param->pos_in_query+length, 1, *val))
| Thread |
|---|
| • bk commit into 5.1 tree (ramil:1.2508) | ramil | 24 May |