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
be470c38
Commit
be470c38
authored
Aug 29, 2005
by
bar@mysql.com
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.b12371
parents
88af3ceb
8d5bfbfa
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
42 additions
and
0 deletions
+42
-0
mysql-test/r/ctype_utf8.result
mysql-test/r/ctype_utf8.result
+9
-0
mysql-test/t/ctype_utf8.test
mysql-test/t/ctype_utf8.test
+12
-0
sql/item.cc
sql/item.cc
+20
-0
sql/item.h
sql/item.h
+1
-0
No files found.
mysql-test/r/ctype_utf8.result
View file @
be470c38
...
...
@@ -993,6 +993,15 @@ select * from t1 where a like "%abc\d%";
a
abcd
drop table t1;
set names utf8;
create table t1 (a char(3), b varchar(10));
insert into t1 values ('bar','kostja');
prepare my_stmt from "select * from t1 where a=?";
set @a:='bar';
execute my_stmt using @a;
a b
bar kostja
drop table t1;
CREATE TABLE t1 (
a varchar(255) NOT NULL default '',
KEY a (a)
...
...
mysql-test/t/ctype_utf8.test
View file @
be470c38
...
...
@@ -831,6 +831,18 @@ select * from t1 where a like "%abc\d%";
drop
table
t1
;
#
# Bug #12371 executing prepared statement fails (illegal mix of collations)
#
set
names
utf8
;
create
table
t1
(
a
char
(
3
),
b
varchar
(
10
));
insert
into
t1
values
(
'bar'
,
'kostja'
);
prepare
my_stmt
from
"select * from t1 where a=?"
;
set
@
a
:=
'bar'
;
execute
my_stmt
using
@
a
;
drop
table
t1
;
#
# Bug#9557 MyISAM utf8 table crash
#
...
...
sql/item.cc
View file @
be470c38
...
...
@@ -284,6 +284,26 @@ Item *Item_string::safe_charset_converter(CHARSET_INFO *tocs)
}
Item
*
Item_param
::
safe_charset_converter
(
CHARSET_INFO
*
tocs
)
{
if
(
const_item
())
{
Item_string
*
conv
;
uint
conv_errors
;
String
tmp
,
cstr
,
*
ostr
=
val_str
(
&
tmp
);
cstr
.
copy
(
ostr
->
ptr
(),
ostr
->
length
(),
ostr
->
charset
(),
tocs
,
&
conv_errors
);
if
(
conv_errors
||
!
(
conv
=
new
Item_string
(
cstr
.
ptr
(),
cstr
.
length
(),
cstr
.
charset
(),
collation
.
derivation
)))
return
NULL
;
conv
->
str_value
.
copy
();
conv
->
str_value
.
shrink_to_length
();
return
conv
;
}
return
NULL
;
}
bool
Item_string
::
eq
(
const
Item
*
item
,
bool
binary_cmp
)
const
{
if
(
type
()
==
item
->
type
()
&&
item
->
basic_const_item
())
...
...
sql/item.h
View file @
be470c38
...
...
@@ -618,6 +618,7 @@ public:
basic_const_item returned TRUE.
*/
Item
*
new_item
();
Item
*
safe_charset_converter
(
CHARSET_INFO
*
tocs
);
/*
Implement by-value equality evaluation if parameter value
is set and is a basic constant (integer, real or string).
...
...
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