Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
39860d67
Commit
39860d67
authored
Aug 16, 2006
by
bar@mysql.com/bar.intranet.mysql.r18.ru
Browse files
Options
Browse Files
Download
Plain Diff
Merge abarkov@bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/usr/home/bar/mysql-4.1.b9509
parents
bacdcb05
b1f9b63a
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
60 additions
and
2 deletions
+60
-2
client/mysql.cc
client/mysql.cc
+7
-2
mysql-test/r/ctype_utf8.result
mysql-test/r/ctype_utf8.result
+31
-0
mysql-test/t/ctype_utf8.test
mysql-test/t/ctype_utf8.test
+18
-0
sql/sql_select.cc
sql/sql_select.cc
+4
-0
No files found.
client/mysql.cc
View file @
39860d67
...
@@ -2154,9 +2154,14 @@ print_table_data(MYSQL_RES *result)
...
@@ -2154,9 +2154,14 @@ print_table_data(MYSQL_RES *result)
(
void
)
tee_fputs
(
"|"
,
PAGER
);
(
void
)
tee_fputs
(
"|"
,
PAGER
);
for
(
uint
off
=
0
;
(
field
=
mysql_fetch_field
(
result
))
;
off
++
)
for
(
uint
off
=
0
;
(
field
=
mysql_fetch_field
(
result
))
;
off
++
)
{
{
tee_fprintf
(
PAGER
,
" %-*s|"
,(
int
)
min
(
field
->
max_length
,
uint
name_length
=
(
uint
)
strlen
(
field
->
name
);
uint
numcells
=
charset_info
->
cset
->
numcells
(
charset_info
,
field
->
name
,
field
->
name
+
name_length
);
uint
display_length
=
field
->
max_length
+
name_length
-
numcells
;
tee_fprintf
(
PAGER
,
" %-*s|"
,(
int
)
min
(
display_length
,
MAX_COLUMN_LENGTH
),
MAX_COLUMN_LENGTH
),
field
->
name
);
field
->
name
);
num_flag
[
off
]
=
IS_NUM
(
field
->
type
);
num_flag
[
off
]
=
IS_NUM
(
field
->
type
);
}
}
(
void
)
tee_fputs
(
"
\n
"
,
PAGER
);
(
void
)
tee_fputs
(
"
\n
"
,
PAGER
);
...
...
mysql-test/r/ctype_utf8.result
View file @
39860d67
...
@@ -924,6 +924,37 @@ NULL
...
@@ -924,6 +924,37 @@ NULL
select ifnull(NULL, _utf8'string');
select ifnull(NULL, _utf8'string');
ifnull(NULL, _utf8'string')
ifnull(NULL, _utf8'string')
string
string
set names utf8;
create table t1 (s1 char(5) character set utf8 collate utf8_lithuanian_ci);
insert into t1 values ('I'),('K'),('Y');
select * from t1 where s1 < 'K' and s1 = 'Y';
s1
I
Y
select * from t1 where 'K' > s1 and s1 = 'Y';
s1
I
Y
drop table t1;
create table t1 (s1 char(5) character set utf8 collate utf8_czech_ci);
insert into t1 values ('c'),('d'),('h'),('ch'),('CH'),('cH'),('Ch'),('i');
select * from t1 where s1 > 'd' and s1 = 'CH';
s1
ch
CH
Ch
select * from t1 where 'd' < s1 and s1 = 'CH';
s1
ch
CH
Ch
select * from t1 where s1 = 'cH' and s1 <> 'ch';
s1
cH
select * from t1 where 'cH' = s1 and s1 <> 'ch';
s1
cH
drop table t1;
create table t1 (a varchar(255)) default character set utf8;
create table t1 (a varchar(255)) default character set utf8;
insert into t1 values (1.0);
insert into t1 values (1.0);
drop table t1;
drop table t1;
...
...
mysql-test/t/ctype_utf8.test
View file @
39860d67
...
@@ -727,6 +727,24 @@ drop table t1;
...
@@ -727,6 +727,24 @@ drop table t1;
select
repeat
(
_utf8
'+'
,
3
)
as
h
union
select
NULL
;
select
repeat
(
_utf8
'+'
,
3
)
as
h
union
select
NULL
;
select
ifnull
(
NULL
,
_utf8
'string'
);
select
ifnull
(
NULL
,
_utf8
'string'
);
#
# Bug#9509 Optimizer: wrong result after AND with comparisons
#
set
names
utf8
;
create
table
t1
(
s1
char
(
5
)
character
set
utf8
collate
utf8_lithuanian_ci
);
insert
into
t1
values
(
'I'
),(
'K'
),(
'Y'
);
select
*
from
t1
where
s1
<
'K'
and
s1
=
'Y'
;
select
*
from
t1
where
'K'
>
s1
and
s1
=
'Y'
;
drop
table
t1
;
create
table
t1
(
s1
char
(
5
)
character
set
utf8
collate
utf8_czech_ci
);
insert
into
t1
values
(
'c'
),(
'd'
),(
'h'
),(
'ch'
),(
'CH'
),(
'cH'
),(
'Ch'
),(
'i'
);
select
*
from
t1
where
s1
>
'd'
and
s1
=
'CH'
;
select
*
from
t1
where
'd'
<
s1
and
s1
=
'CH'
;
select
*
from
t1
where
s1
=
'cH'
and
s1
<>
'ch'
;
select
*
from
t1
where
'cH'
=
s1
and
s1
<>
'ch'
;
drop
table
t1
;
#
#
# Bug#10714: Inserting double value into utf8 column crashes server
# Bug#10714: Inserting double value into utf8 column crashes server
#
#
...
...
sql/sql_select.cc
View file @
39860d67
...
@@ -4549,6 +4549,8 @@ change_cond_ref_to_const(THD *thd, I_List<COND_CMP> *save_list,
...
@@ -4549,6 +4549,8 @@ change_cond_ref_to_const(THD *thd, I_List<COND_CMP> *save_list,
left_item
->
collation
.
collation
==
value
->
collation
.
collation
))
left_item
->
collation
.
collation
==
value
->
collation
.
collation
))
{
{
Item
*
tmp
=
value
->
new_item
();
Item
*
tmp
=
value
->
new_item
();
tmp
->
collation
.
set
(
right_item
->
collation
);
if
(
tmp
)
if
(
tmp
)
{
{
thd
->
change_item_tree
(
args
+
1
,
tmp
);
thd
->
change_item_tree
(
args
+
1
,
tmp
);
...
@@ -4570,6 +4572,8 @@ change_cond_ref_to_const(THD *thd, I_List<COND_CMP> *save_list,
...
@@ -4570,6 +4572,8 @@ change_cond_ref_to_const(THD *thd, I_List<COND_CMP> *save_list,
right_item
->
collation
.
collation
==
value
->
collation
.
collation
))
right_item
->
collation
.
collation
==
value
->
collation
.
collation
))
{
{
Item
*
tmp
=
value
->
new_item
();
Item
*
tmp
=
value
->
new_item
();
tmp
->
collation
.
set
(
left_item
->
collation
);
if
(
tmp
)
if
(
tmp
)
{
{
thd
->
change_item_tree
(
args
,
tmp
);
thd
->
change_item_tree
(
args
,
tmp
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment