Bug #11888 SHOW CREATE PROCEDURE/FUNCTION doesn't show non-ascii characters correctly
| Submitted: | 12 Jul 2005 15:51 | Modified: | 19 Jul 2005 7:20 |
|---|---|---|---|
| Reporter: | Per-Erik Martin | Email Updates: | |
| Status: | Duplicate | Impact on me: | |
| Category: | MySQL Server | Severity: | S3 (Non-critical) |
| Version: | 5.0 | OS: | Linux (linux) |
| Assigned to: | Assigned Account | CPU Architecture: | Any |
[13 Jul 2005 17:52]
Jorge del Conde
I was able to reproduce this in 5.0 from bk and Linux !
[14 Jul 2005 10:00]
Per-Erik Martin
SP charsets test
Attachment: sp-charsets.sql (application/octet-stream, text), 1.40 KiB.
[14 Jul 2005 10:02]
Per-Erik Martin
I see in an email that strange things might happen to non-USASCII characters when cutting and pasting in a web browser, so just to make sure I have attached the test case as a file here too.
[19 Jul 2005 7:20]
Alexander Barkov
Duplicate with 3349
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.041 sec. using MySQL 8.4.7-u6-cloud
Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the
respective copyright holders.
It is not reviewed in advance
by Oracle and does not necessarily represent the opinion of
Oracle or any other party.
Description: Different character set settings cause SHOW CREATE PROCEDURE/FUNCTION to display non-ascii characters incorrectly, sometimes as just a question mark. Some parts are shown differently, i.e. the name, the CREATE PROCEDURE ..., and the body. Switching between different charcter sets sometimes cause syntax errors when attempting to read routines from the database. Note: This seems to be mostly a problem with latin1, and when switching between character sets. Just sticking to one character set (preferably utf8) causes no problems. How to repeat: This tests some combinations using latin1 and utf8. It's possible that similar discrepancies can be found using other combinations. et character set latin1; drop table if exists räkor; create table räkor ( typ char(10), antal int ); drop procedure if exists räkna_räkor; delimiter //; create procedure räkna_räkor() begin declare alla_räkor int default 0; fånig: begin declare n int; select count(*) from räkor where typ = 'stora'; set alla_räkor = alla_räkor + n; select count(*) from räkor where typ = 'små'; set alla_räkor = alla_räkor + n; end fånig; select alla_räkor; end// delimiter ;// select 'show latin1-latin1'; show create table räkor; show create procedure räkna_räkor; set character set utf8; select 'show latin1-utf8'; show create table räkor; show create procedure räkna_räkor; drop table if exists räkor; create table räkor ( typ char(10), antal int ); drop procedure if exists räkna_räkor; delimiter //; create procedure räkna_räkor() begin declare alla_räkor int default 0; fÃ¥nig: begin declare n int; select count(*) from räkor where typ = 'stora'; set alla_räkor = alla_räkor + n; select count(*) from räkor where typ = 'smÃ¥'; set alla_räkor = alla_räkor + n; end fÃ¥nig; select alla_räkor; end// delimiter ;// select 'utf8-utf8'; show create table räkor; show create procedure räkna_räkor; set character set latin1; select 'utf8-latin1'; show create table räkor; show create procedure räkna_räkor; drop table räkor; drop procedure räkna_räkor;