From: Sergey Petrunia Date: December 21 2005 8:47am Subject: bk commit into 5.1 tree (sergefp:1.1974) BUG#15871 List-Archive: http://lists.mysql.com/commits/313 X-Bug: 15871 Message-Id: <20051221084756.456AB2C7D57@newbox.mylan> Below is the list of changes that have just been committed into a local 5.1 repository of psergey. When psergey 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.1974 05/12/21 11:47:48 sergefp@stripped +1 -0 BUG#15871: For SQL Syntax prepared statemets, set Item_param::cs_info.character_set_client to NULL, as it is checked. sql/item.cc 1.162 05/12/21 11:47:40 sergefp@stripped +3 -1 BUG#15871: Item_param::query_val_str() checks the Item_param::cs_info.character_set_client, but it was not defined for SQL syntax prepared statements. To avoid comparison with uninitialized data, set character_set_client to NULL for SQL syntax PSes, and modify the check accordingly. # 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: sergefp # Host: newbox.mylan # Root: /home/psergey/mysql-5.1-ppruning-merge --- 1.161/sql/item.cc 2005-12-12 22:55:12 +03:00 +++ 1.162/sql/item.cc 2005-12-21 11:47:40 +03:00 @@ -2335,6 +2335,7 @@ CHARSET_INFO *tocs= thd->variables.collation_connection; uint32 dummy_offset; + value.cs_info.character_set_client= NULL; value.cs_info.character_set_of_placeholder= fromcs; /* Setup source and destination character sets so that they @@ -2653,7 +2654,8 @@ buf= str->c_ptr_quick(); ptr= buf; - if (value.cs_info.character_set_client->escape_with_backslash_is_dangerous) + if (value.cs_info.character_set_client && + value.cs_info.character_set_client->escape_with_backslash_is_dangerous) { ptr= str_to_hex(ptr, str_value.ptr(), str_value.length()); }