1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-29 00:08:14 +03:00

This problem has already been fixed by one of the previous changes.

Adding test case to cover queries which worked incorrectly earlier:
Bug#18321: Can't store EuroSign with latin1_german1_ci and latin1_general_ci
This commit is contained in:
bar@mysql.com
2006-04-06 10:51:23 +05:00
parent 8f1bddb8ed
commit 925ea02b4c
2 changed files with 36 additions and 0 deletions

View File

@@ -369,3 +369,25 @@ ERROR 42000: You have an error in your SQL syntax; check the manual that corresp
SELECT '<27>a' as str;
str
<EFBFBD>a
set @str= _latin1 'ABC <20><><EFBFBD>߲<EFBFBD><DFB2>~ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> @ abc';
SELECT convert(@str collate latin1_bin using utf8);
convert(@str collate latin1_bin using utf8)
ABC <20><><EFBFBD>߲<EFBFBD><DFB2>~ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> @ abc
SELECT convert(@str collate latin1_general_ci using utf8);
convert(@str collate latin1_general_ci using utf8)
ABC <20><><EFBFBD>߲<EFBFBD><DFB2>~ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> @ abc
SELECT convert(@str collate latin1_german1_ci using utf8);
convert(@str collate latin1_german1_ci using utf8)
ABC <20><><EFBFBD>߲<EFBFBD><DFB2>~ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> @ abc
SELECT convert(@str collate latin1_danish_ci using utf8);
convert(@str collate latin1_danish_ci using utf8)
ABC <20><><EFBFBD>߲<EFBFBD><DFB2>~ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> @ abc
SELECT convert(@str collate latin1_spanish_ci using utf8);
convert(@str collate latin1_spanish_ci using utf8)
ABC <20><><EFBFBD>߲<EFBFBD><DFB2>~ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> @ abc
SELECT convert(@str collate latin1_german2_ci using utf8);
convert(@str collate latin1_german2_ci using utf8)
ABC <20><><EFBFBD>߲<EFBFBD><DFB2>~ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> @ abc
SELECT convert(@str collate latin1_swedish_ci using utf8);
convert(@str collate latin1_swedish_ci using utf8)
ABC <20><><EFBFBD>߲<EFBFBD><DFB2>~ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> @ abc

View File

@@ -95,4 +95,18 @@ SET collation_connection='latin1_bin';
CREATE TABLE <20>a (a int);
SELECT '<27>a' as str;
#
# Bug#18321: Can't store EuroSign with latin1_german1_ci and latin1_general_ci
# The problem was in latin1->utf8->latin1 round trip.
#
set @str= _latin1 'ABC <20><><EFBFBD>߲<EFBFBD><DFB2>~ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> @ abc';
SELECT convert(@str collate latin1_bin using utf8);
SELECT convert(@str collate latin1_general_ci using utf8);
SELECT convert(@str collate latin1_german1_ci using utf8);
SELECT convert(@str collate latin1_danish_ci using utf8);
SELECT convert(@str collate latin1_spanish_ci using utf8);
SELECT convert(@str collate latin1_german2_ci using utf8);
SELECT convert(@str collate latin1_swedish_ci using utf8);
# End of 4.1 tests