Skip to content

Commit

Permalink
A clean-up for the previous patch
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander Barkov committed Sep 2, 2014
1 parent 1427e1d commit b088609
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
7 changes: 7 additions & 0 deletions mysql-test/r/ctype_utf8.result
Original file line number Diff line number Diff line change
Expand Up @@ -5954,6 +5954,13 @@ SET @arg00=_binary 0xFF;
EXECUTE stmt USING @arg00;
ERROR HY000: Invalid utf8 character string: 'FF'
DEALLOCATE PREPARE stmt;
SET NAMES latin1;
PREPARE stmt FROM "SELECT CONCAT(_utf8'a' COLLATE utf8_unicode_ci, ?)";
EXECUTE stmt USING @no_such_var;
CONCAT(_utf8'a' COLLATE utf8_unicode_ci, ?)
NULL
DEALLOCATE PREPARE stmt;
SET NAMES utf8;
#
# End of 10.0 tests
#
5 changes: 5 additions & 0 deletions mysql-test/t/ctype_utf8.test
Original file line number Diff line number Diff line change
Expand Up @@ -1675,6 +1675,11 @@ SET @arg00=_binary 0xFF;
--error ER_INVALID_CHARACTER_STRING
EXECUTE stmt USING @arg00;
DEALLOCATE PREPARE stmt;
SET NAMES latin1;
PREPARE stmt FROM "SELECT CONCAT(_utf8'a' COLLATE utf8_unicode_ci, ?)";
EXECUTE stmt USING @no_such_var;
DEALLOCATE PREPARE stmt;
SET NAMES utf8;

--echo #
--echo # End of 10.0 tests
Expand Down
2 changes: 2 additions & 0 deletions sql/item.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1274,6 +1274,8 @@ Item *Item_param::safe_charset_converter(CHARSET_INFO *tocs)
*/
if (const_item())
{
if (state == NULL_VALUE)
return this;
uint cnv_errors;
String *ostr= val_str(&cnvstr);
if (!needs_charset_converter(tocs))
Expand Down

0 comments on commit b088609

Please sign in to comment.