Bug #67359 | case/when statement with mixed collation makes mysqld crash | ||
---|---|---|---|
Submitted: | 24 Oct 2012 13:51 | Modified: | 24 Oct 2012 16:31 |
Reporter: | Sandro Souza | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Charsets | Severity: | S2 (Serious) |
Version: | 5.5.13 | OS: | Linux (CentOS release 5.4) |
Assigned to: | CPU Architecture: | Any |
[24 Oct 2012 13:51]
Sandro Souza
[24 Oct 2012 14:05]
Peter Laursen
Not reproducible for me with MySQL 5.5.28 64-bit Windows server DROP PROCEDURE IF EXISTS my_crashing_procedure; DELIMITER && CREATE PROCEDURE my_crashing_procedure(p INT) BEGIN SELECT CASE WHEN p=1 THEN CONVERT('RESULT 1' USING latin1) WHEN p=2 THEN CONVERT('RESULT 2' USING latin1) ELSE CONVERT('RESULT 3' USING utf8) END result; END && DELIMITER ; CALL my_crashing_procedure(1); CALL my_crashing_procedure(1); CALL my_crashing_procedure(2); CALL my_crashing_procedure(2); CALL my_crashing_procedure(3); CALL my_crashing_procedure(3); .. etc. No crash here with neither SET NAMES latin1 nor utf8 for the connection. Peter (not a MySQL/Oracle person)
[24 Oct 2012 14:10]
MySQL Verification Team
Thank you for the bug report. Please try with latest version. Thanks. Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 1 Server version: 5.5.27-log MySQL Community Server (GPL) Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> use test Database changed mysql> delimiter $$ mysql> drop procedure if exists my_crashing_procedure; -> CREATE PROCEDURE my_crashing_procedure(p int) -> BEGIN -> select -> case when p=1 then convert('RESULT 1' using latin1) -> when p=2 then convert('RESULT 2' using latin1) -> else convert('RESULT 3' using utf8) -> end result; -> END$$ Query OK, 0 rows affected, 1 warning (0.21 sec) Query OK, 0 rows affected (0.21 sec) mysql> delimiter ; mysql> call my_crashing_procedure(1); +----------+ | result | +----------+ | RESULT 1 | +----------+ 1 row in set (0.00 sec) Query OK, 0 rows affected (0.01 sec) mysql> call my_crashing_procedure(1); -- server crashes here +----------+ | result | +----------+ | RESULT 1 | +----------+ 1 row in set (0.00 sec) Query OK, 0 rows affected (0.01 sec) mysql>
[24 Oct 2012 14:37]
Sandro Souza
I upgraded to a newer version and it's working now. It looks like this bug is present only on 5.5.13. May I close it?
[24 Oct 2012 16:31]
MySQL Verification Team
Thank you for the feedback.