Below is the list of changes that have just been committed into a local
5.0 repository of ram. When ram does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet@stripped, 2007-11-28 10:55:13+04:00, ramil@stripped +9 -0
Fix for bug #32726: crash with cast in order by clause and cp932 charset
- fix for #31070 (missed during merging) applied for cp932 charset.
- tests/results adjusted.
mysql-test/include/ctype_common.inc@stripped, 2007-11-28 10:55:11+04:00, ramil@stripped +2
-0
Fix for bug #32726: crash with cast in order by clause and cp932 charset
- tests/results adjusted.
mysql-test/r/ctype_big5.result@stripped, 2007-11-28 10:55:11+04:00, ramil@stripped +4 -0
Fix for bug #32726: crash with cast in order by clause and cp932 charset
- tests/results adjusted.
mysql-test/r/ctype_cp932.result@stripped, 2007-11-28 10:55:11+04:00, ramil@stripped +74 -0
Fix for bug #32726: crash with cast in order by clause and cp932 charset
- tests/results adjusted.
mysql-test/r/ctype_euckr.result@stripped, 2007-11-28 10:55:11+04:00, ramil@stripped +4 -0
Fix for bug #32726: crash with cast in order by clause and cp932 charset
- tests/results adjusted.
mysql-test/r/ctype_gb2312.result@stripped, 2007-11-28 10:55:11+04:00, ramil@stripped +4 -0
Fix for bug #32726: crash with cast in order by clause and cp932 charset
- tests/results adjusted.
mysql-test/r/ctype_gbk.result@stripped, 2007-11-28 10:55:11+04:00, ramil@stripped +4 -0
Fix for bug #32726: crash with cast in order by clause and cp932 charset
- tests/results adjusted.
mysql-test/r/ctype_uca.result@stripped, 2007-11-28 10:55:11+04:00, ramil@stripped +4 -0
Fix for bug #32726: crash with cast in order by clause and cp932 charset
- tests/results adjusted.
mysql-test/t/ctype_cp932.test@stripped, 2007-11-28 10:55:11+04:00, ramil@stripped +4 -0
Fix for bug #32726: crash with cast in order by clause and cp932 charset
- tests/results adjusted.
strings/ctype-cp932.c@stripped, 2007-11-28 10:55:12+04:00, ramil@stripped +2 -2
Fix for bug #32726: crash with cast in order by clause and cp932 charset
- fix for #31070 (missed during merging) applied for cp932.
diff -Nrup a/mysql-test/include/ctype_common.inc b/mysql-test/include/ctype_common.inc
--- a/mysql-test/include/ctype_common.inc 2007-10-04 10:19:59 +05:00
+++ b/mysql-test/include/ctype_common.inc 2007-11-28 10:55:11 +04:00
@@ -53,11 +53,13 @@ DROP TABLE t1;
#
# Bug #31070: crash during conversion of charsets
+# Bug #32726: crash with cast in order by clause and cp932 charset
#
create table t1 (a set('a') not null);
insert into t1 values (),();
select cast(a as char(1)) from t1;
select a sounds like a from t1;
+select 1 from t1 order by cast(a as char(1));
drop table t1;
DROP DATABASE d1;
diff -Nrup a/mysql-test/r/ctype_big5.result b/mysql-test/r/ctype_big5.result
--- a/mysql-test/r/ctype_big5.result 2007-10-04 12:09:20 +05:00
+++ b/mysql-test/r/ctype_big5.result 2007-11-28 10:55:11 +04:00
@@ -64,6 +64,10 @@ select a sounds like a from t1;
a sounds like a
1
1
+select 1 from t1 order by cast(a as char(1));
+1
+1
+1
drop table t1;
DROP DATABASE d1;
USE test;
diff -Nrup a/mysql-test/r/ctype_cp932.result b/mysql-test/r/ctype_cp932.result
--- a/mysql-test/r/ctype_cp932.result 2007-07-04 16:17:39 +05:00
+++ b/mysql-test/r/ctype_cp932.result 2007-11-28 10:55:11 +04:00
@@ -2,6 +2,80 @@ drop table if exists t1;
drop table if exists t2;
drop table if exists t3;
drop table if exists t4;
+SET @test_character_set= 'cp932';
+SET @test_collation= 'cp932_japanese_ci';
+SET @safe_character_set_server= @@character_set_server;
+SET @safe_collation_server= @@collation_server;
+SET character_set_server= @test_character_set;
+SET collation_server= @test_collation;
+CREATE DATABASE d1;
+USE d1;
+CREATE TABLE t1 (c CHAR(10), KEY(c));
+SHOW FULL COLUMNS FROM t1;
+Field Type Collation Null Key Default Extra Privileges Comment
+c char(10) cp932_japanese_ci YES MUL NULL
+INSERT INTO t1 VALUES ('aaa'),('aaaa'),('aaaaa');
+SELECT c as want3results FROM t1 WHERE c LIKE 'aaa%';
+want3results
+aaa
+aaaa
+aaaaa
+DROP TABLE t1;
+CREATE TABLE t1 (c1 varchar(15), KEY c1 (c1(2)));
+SHOW FULL COLUMNS FROM t1;
+Field Type Collation Null Key Default Extra Privileges Comment
+c1 varchar(15) cp932_japanese_ci YES MUL NULL
+INSERT INTO t1 VALUES ('location'),('loberge'),('lotre'),('boabab');
+SELECT c1 as want3results from t1 where c1 like 'l%';
+want3results
+location
+loberge
+lotre
+SELECT c1 as want3results from t1 where c1 like 'lo%';
+want3results
+location
+loberge
+lotre
+SELECT c1 as want1result from t1 where c1 like 'loc%';
+want1result
+location
+SELECT c1 as want1result from t1 where c1 like 'loca%';
+want1result
+location
+SELECT c1 as want1result from t1 where c1 like 'locat%';
+want1result
+location
+SELECT c1 as want1result from t1 where c1 like 'locati%';
+want1result
+location
+SELECT c1 as want1result from t1 where c1 like 'locatio%';
+want1result
+location
+SELECT c1 as want1result from t1 where c1 like 'location%';
+want1result
+location
+DROP TABLE t1;
+create table t1 (a set('a') not null);
+insert into t1 values (),();
+Warnings:
+Warning 1364 Field 'a' doesn't have a default value
+select cast(a as char(1)) from t1;
+cast(a as char(1))
+
+
+select a sounds like a from t1;
+a sounds like a
+1
+1
+select 1 from t1 order by cast(a as char(1));
+1
+1
+1
+drop table t1;
+DROP DATABASE d1;
+USE test;
+SET character_set_server= @safe_character_set_server;
+SET collation_server= @safe_collation_server;
set names cp932;
set character_set_database = cp932;
CREATE TABLE t1(c1 CHAR(1)) DEFAULT CHARACTER SET = cp932;
diff -Nrup a/mysql-test/r/ctype_euckr.result b/mysql-test/r/ctype_euckr.result
--- a/mysql-test/r/ctype_euckr.result 2007-10-04 12:09:20 +05:00
+++ b/mysql-test/r/ctype_euckr.result 2007-11-28 10:55:11 +04:00
@@ -64,6 +64,10 @@ select a sounds like a from t1;
a sounds like a
1
1
+select 1 from t1 order by cast(a as char(1));
+1
+1
+1
drop table t1;
DROP DATABASE d1;
USE test;
diff -Nrup a/mysql-test/r/ctype_gb2312.result b/mysql-test/r/ctype_gb2312.result
--- a/mysql-test/r/ctype_gb2312.result 2007-10-04 12:09:20 +05:00
+++ b/mysql-test/r/ctype_gb2312.result 2007-11-28 10:55:11 +04:00
@@ -64,6 +64,10 @@ select a sounds like a from t1;
a sounds like a
1
1
+select 1 from t1 order by cast(a as char(1));
+1
+1
+1
drop table t1;
DROP DATABASE d1;
USE test;
diff -Nrup a/mysql-test/r/ctype_gbk.result b/mysql-test/r/ctype_gbk.result
--- a/mysql-test/r/ctype_gbk.result 2007-10-04 12:09:20 +05:00
+++ b/mysql-test/r/ctype_gbk.result 2007-11-28 10:55:11 +04:00
@@ -64,6 +64,10 @@ select a sounds like a from t1;
a sounds like a
1
1
+select 1 from t1 order by cast(a as char(1));
+1
+1
+1
drop table t1;
DROP DATABASE d1;
USE test;
diff -Nrup a/mysql-test/r/ctype_uca.result b/mysql-test/r/ctype_uca.result
--- a/mysql-test/r/ctype_uca.result 2007-10-04 12:09:20 +05:00
+++ b/mysql-test/r/ctype_uca.result 2007-11-28 10:55:11 +04:00
@@ -2599,6 +2599,10 @@ select a sounds like a from t1;
a sounds like a
1
1
+select 1 from t1 order by cast(a as char(1));
+1
+1
+1
drop table t1;
DROP DATABASE d1;
USE test;
diff -Nrup a/mysql-test/t/ctype_cp932.test b/mysql-test/t/ctype_cp932.test
--- a/mysql-test/t/ctype_cp932.test 2007-07-04 16:17:39 +05:00
+++ b/mysql-test/t/ctype_cp932.test 2007-11-28 10:55:11 +04:00
@@ -8,6 +8,10 @@ drop table if exists t3;
drop table if exists t4;
--enable_warnings
+SET @test_character_set= 'cp932';
+SET @test_collation= 'cp932_japanese_ci';
+-- source include/ctype_common.inc
+
set names cp932;
set character_set_database = cp932;
diff -Nrup a/strings/ctype-cp932.c b/strings/ctype-cp932.c
--- a/strings/ctype-cp932.c 2007-07-04 16:17:39 +05:00
+++ b/strings/ctype-cp932.c 2007-11-28 10:55:12 +04:00
@@ -5359,12 +5359,12 @@ my_wc_mb_cp932(CHARSET_INFO *cs __attri
static int
my_mb_wc_cp932(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t *pwc, const uchar *s, const uchar *e){
- int hi=s[0];
+ int hi;
if (s >= e)
return MY_CS_TOOSMALL;
- if (hi < 0x80)
+ if ((hi= s[0]) < 0x80)
{
pwc[0]=hi;
return 1;
| Thread |
|---|
| • bk commit into 5.0 tree (ramil:1.2591) BUG#32726 | ramil | 28 Nov |