summaryrefslogtreecommitdiff
path: root/mysql-test/r/lowercase_table.result
diff options
context:
space:
mode:
authorunknown <bar@mysql.com/bar.intranet.mysql.r18.ru>2006-10-30 14:40:15 +0400
committerunknown <bar@mysql.com/bar.intranet.mysql.r18.ru>2006-10-30 14:40:15 +0400
commite463ee942152e22c77d52403dbfb772648d4f35d (patch)
tree28784d5ea063d9e530189c3e9d57d06b9c2b5fae /mysql-test/r/lowercase_table.result
parent4453dc48e461aa1df8c68b1e11ccf3d7c4e29584 (diff)
downloadmariadb-git-e463ee942152e22c77d52403dbfb772648d4f35d.tar.gz
Bug#20404: SHOW CREATE TABLE fails with Turkish I
Problem: SHOW CREATE TABLE printed garbage in table name for tables having TURKISH I (i.e. LATIN CAPITABLE LETTER I WITH DOT ABOVE) when lower-case-table-name=1. Reason: In some cases during lower/upper conversion in utf8, the result string can be shorter the original string (including the above letter). Old implementation of caseup_str() and casedn_str() didn't handle the result length properly, assuming that length cannot change. This fix changes the result type of cs->cset->casedn_str() and cs->cset->caseup_str() from VOID to UINT, to return the result length, as well as put '\0' terminator on a proper place. Also, my_caseup_str_utf8() and my_casedn_str_utf8() were rewritten not to use strlen() for performance purposes. It was done with help of adding of new functions - my_utf8_uni_no_range() and my_uni_utf8_no_range() - for null terminated strings. include/m_ctype.h: Changeing return type from void to int for caseup_str() and casedn_str() mysql-test/r/lowercase_table.result: Adding test case mysql-test/t/lowercase_table.test: Adding test case sql/sql_parse.cc: Set table->table.length to result of my_casedn_str(). strings/ctype-bin.c: Changeing return type from void to int for caseup_str() and casedn_str() strings/ctype-mb.c: Changeing return type from void to int for caseup_str() and casedn_str() strings/ctype-simple.c: Changeing return type from void to int for caseup_str() and casedn_str() strings/ctype-ucs2.c: Changeing return type from void to int for caseup_str() and casedn_str() strings/ctype-utf8.c: Changeing return type from void to int for caseup_str() and casedn_str(). Optimization, to get rid of strlen(): Adding my_utf8_uni_no_range() and my_uni_utf8_no_range() - for null terninated strings.
Diffstat (limited to 'mysql-test/r/lowercase_table.result')
-rw-r--r--mysql-test/r/lowercase_table.result24
1 files changed, 24 insertions, 0 deletions
diff --git a/mysql-test/r/lowercase_table.result b/mysql-test/r/lowercase_table.result
index 7705961d08d..6df3cf61ddb 100644
--- a/mysql-test/r/lowercase_table.result
+++ b/mysql-test/r/lowercase_table.result
@@ -84,3 +84,27 @@ create table t2 like T1;
drop table t1, t2;
show tables;
Tables_in_test
+set names utf8;
+drop table if exists İ,İİ;
+create table İ (s1 int);
+show create table İ;
+Table Create Table
+İ CREATE TABLE `i` (
+ `s1` int(11) default NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+show tables;
+Tables_in_test
+i
+drop table İ;
+create table İİ (s1 int);
+show create table İİ;
+Table Create Table
+İİ CREATE TABLE `ii` (
+ `s1` int(11) default NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+show tables;
+Tables_in_test
+ii
+drop table İİ;
+set names latin1;
+End of 5.0 tests