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
babcdb64
Commit
babcdb64
authored
Feb 22, 2005
by
bell@51.0.168.192.in-addr.arpa
Browse files
Options
Browse Files
Download
Plain Diff
Merge 51.0.168.192.in-addr.arpa:/Users/bell/mysql/bk/mysql-4.1
into 51.0.168.192.in-addr.arpa:/Users/bell/mysql/bk/work-4.1
parents
9a9811f3
89a55308
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
14 deletions
+14
-14
mysql-test/r/user_var.result
mysql-test/r/user_var.result
+9
-7
mysql-test/t/user_var.test
mysql-test/t/user_var.test
+0
-2
sql/item_func.cc
sql/item_func.cc
+5
-5
No files found.
mysql-test/r/user_var.result
View file @
babcdb64
...
@@ -123,7 +123,7 @@ drop table t1;
...
@@ -123,7 +123,7 @@ drop table t1;
set @a=_latin2'test';
set @a=_latin2'test';
select charset(@a),collation(@a),coercibility(@a);
select charset(@a),collation(@a),coercibility(@a);
charset(@a) collation(@a) coercibility(@a)
charset(@a) collation(@a) coercibility(@a)
latin2 latin2_general_ci
3
latin2 latin2_general_ci
2
select @a=_latin2'TEST';
select @a=_latin2'TEST';
@a=_latin2'TEST'
@a=_latin2'TEST'
1
1
...
@@ -133,12 +133,13 @@ select @a=_latin2'TEST' collate latin2_bin;
...
@@ -133,12 +133,13 @@ select @a=_latin2'TEST' collate latin2_bin;
set @a=_latin2'test' collate latin2_general_ci;
set @a=_latin2'test' collate latin2_general_ci;
select charset(@a),collation(@a),coercibility(@a);
select charset(@a),collation(@a),coercibility(@a);
charset(@a) collation(@a) coercibility(@a)
charset(@a) collation(@a) coercibility(@a)
latin2 latin2_general_ci
0
latin2 latin2_general_ci
2
select @a=_latin2'TEST';
select @a=_latin2'TEST';
@a=_latin2'TEST'
@a=_latin2'TEST'
1
1
select @a=_latin2'TEST' collate latin2_bin;
select @a=_latin2'TEST' collate latin2_bin;
ERROR HY000: Illegal mix of collations (latin2_general_ci,EXPLICIT) and (latin2_bin,EXPLICIT) for operation '='
@a=_latin2'TEST' collate latin2_bin
0
select charset(@a:=_latin2'test');
select charset(@a:=_latin2'test');
charset(@a:=_latin2'test')
charset(@a:=_latin2'test')
latin2
latin2
...
@@ -147,21 +148,22 @@ collation(@a:=_latin2'test')
...
@@ -147,21 +148,22 @@ collation(@a:=_latin2'test')
latin2_general_ci
latin2_general_ci
select coercibility(@a:=_latin2'test');
select coercibility(@a:=_latin2'test');
coercibility(@a:=_latin2'test')
coercibility(@a:=_latin2'test')
3
2
select collation(@a:=_latin2'test' collate latin2_bin);
select collation(@a:=_latin2'test' collate latin2_bin);
collation(@a:=_latin2'test' collate latin2_bin)
collation(@a:=_latin2'test' collate latin2_bin)
latin2_bin
latin2_bin
select coercibility(@a:=_latin2'test' collate latin2_bin);
select coercibility(@a:=_latin2'test' collate latin2_bin);
coercibility(@a:=_latin2'test' collate latin2_bin)
coercibility(@a:=_latin2'test' collate latin2_bin)
0
2
select (@a:=_latin2'test' collate latin2_bin) = _latin2'TEST';
select (@a:=_latin2'test' collate latin2_bin) = _latin2'TEST';
(@a:=_latin2'test' collate latin2_bin) = _latin2'TEST'
(@a:=_latin2'test' collate latin2_bin) = _latin2'TEST'
0
0
select charset(@a),collation(@a),coercibility(@a);
select charset(@a),collation(@a),coercibility(@a);
charset(@a) collation(@a) coercibility(@a)
charset(@a) collation(@a) coercibility(@a)
latin2 latin2_bin
0
latin2 latin2_bin
2
select (@a:=_latin2'test' collate latin2_bin) = _latin2'TEST' collate latin2_general_ci;
select (@a:=_latin2'test' collate latin2_bin) = _latin2'TEST' collate latin2_general_ci;
ERROR HY000: Illegal mix of collations (latin2_bin,EXPLICIT) and (latin2_general_ci,EXPLICIT) for operation '='
(@a:=_latin2'test' collate latin2_bin) = _latin2'TEST' collate latin2_general_ci
1
create table t1 (a varchar(50));
create table t1 (a varchar(50));
reset master;
reset master;
SET TIMESTAMP=10000;
SET TIMESTAMP=10000;
...
...
mysql-test/t/user_var.test
View file @
babcdb64
...
@@ -84,7 +84,6 @@ select @a=_latin2'TEST' collate latin2_bin;
...
@@ -84,7 +84,6 @@ select @a=_latin2'TEST' collate latin2_bin;
set
@
a
=
_latin2
'test'
collate
latin2_general_ci
;
set
@
a
=
_latin2
'test'
collate
latin2_general_ci
;
select
charset
(
@
a
),
collation
(
@
a
),
coercibility
(
@
a
);
select
charset
(
@
a
),
collation
(
@
a
),
coercibility
(
@
a
);
select
@
a
=
_latin2
'TEST'
;
select
@
a
=
_latin2
'TEST'
;
--
error
1267
select
@
a
=
_latin2
'TEST'
collate
latin2_bin
;
select
@
a
=
_latin2
'TEST'
collate
latin2_bin
;
#
#
...
@@ -97,7 +96,6 @@ select collation(@a:=_latin2'test' collate latin2_bin);
...
@@ -97,7 +96,6 @@ select collation(@a:=_latin2'test' collate latin2_bin);
select
coercibility
(
@
a
:=
_latin2
'test'
collate
latin2_bin
);
select
coercibility
(
@
a
:=
_latin2
'test'
collate
latin2_bin
);
select
(
@
a
:=
_latin2
'test'
collate
latin2_bin
)
=
_latin2
'TEST'
;
select
(
@
a
:=
_latin2
'test'
collate
latin2_bin
)
=
_latin2
'TEST'
;
select
charset
(
@
a
),
collation
(
@
a
),
coercibility
(
@
a
);
select
charset
(
@
a
),
collation
(
@
a
),
coercibility
(
@
a
);
--
error
1267
select
(
@
a
:=
_latin2
'test'
collate
latin2_bin
)
=
_latin2
'TEST'
collate
latin2_general_ci
;
select
(
@
a
:=
_latin2
'test'
collate
latin2_bin
)
=
_latin2
'TEST'
collate
latin2_general_ci
;
# Check that user variables are binlogged correctly (BUG#3875)
# Check that user variables are binlogged correctly (BUG#3875)
...
...
sql/item_func.cc
View file @
babcdb64
...
@@ -2361,7 +2361,7 @@ static user_var_entry *get_variable(HASH *hash, LEX_STRING &name,
...
@@ -2361,7 +2361,7 @@ static user_var_entry *get_variable(HASH *hash, LEX_STRING &name,
entry
->
value
=
0
;
entry
->
value
=
0
;
entry
->
length
=
0
;
entry
->
length
=
0
;
entry
->
update_query_id
=
0
;
entry
->
update_query_id
=
0
;
entry
->
collation
.
set
(
NULL
,
DERIVATION_
NONE
);
entry
->
collation
.
set
(
NULL
,
DERIVATION_
IMPLICIT
);
/*
/*
If we are here, we were called from a SET or a query which sets a
If we are here, we were called from a SET or a query which sets a
variable. Imagine it is this:
variable. Imagine it is this:
...
@@ -2419,8 +2419,8 @@ bool Item_func_set_user_var::fix_fields(THD *thd, TABLE_LIST *tables,
...
@@ -2419,8 +2419,8 @@ bool Item_func_set_user_var::fix_fields(THD *thd, TABLE_LIST *tables,
and the variable has previously been initialized.
and the variable has previously been initialized.
*/
*/
if
(
!
entry
->
collation
.
collation
||
!
args
[
0
]
->
null_value
)
if
(
!
entry
->
collation
.
collation
||
!
args
[
0
]
->
null_value
)
entry
->
collation
.
set
(
args
[
0
]
->
collation
);
entry
->
collation
.
set
(
args
[
0
]
->
collation
.
collation
,
DERIVATION_IMPLICIT
);
collation
.
set
(
entry
->
collation
);
collation
.
set
(
entry
->
collation
.
collation
,
DERIVATION_IMPLICIT
);
cached_result_type
=
args
[
0
]
->
result_type
();
cached_result_type
=
args
[
0
]
->
result_type
();
return
0
;
return
0
;
}
}
...
@@ -2432,7 +2432,7 @@ Item_func_set_user_var::fix_length_and_dec()
...
@@ -2432,7 +2432,7 @@ Item_func_set_user_var::fix_length_and_dec()
maybe_null
=
args
[
0
]
->
maybe_null
;
maybe_null
=
args
[
0
]
->
maybe_null
;
max_length
=
args
[
0
]
->
max_length
;
max_length
=
args
[
0
]
->
max_length
;
decimals
=
args
[
0
]
->
decimals
;
decimals
=
args
[
0
]
->
decimals
;
collation
.
set
(
args
[
0
]
->
collation
);
collation
.
set
(
args
[
0
]
->
collation
.
collation
,
DERIVATION_IMPLICIT
);
}
}
...
@@ -2659,7 +2659,7 @@ Item_func_set_user_var::update()
...
@@ -2659,7 +2659,7 @@ Item_func_set_user_var::update()
res
=
update_hash
((
void
*
)
save_result
.
vstr
->
ptr
(),
res
=
update_hash
((
void
*
)
save_result
.
vstr
->
ptr
(),
save_result
.
vstr
->
length
(),
STRING_RESULT
,
save_result
.
vstr
->
length
(),
STRING_RESULT
,
save_result
.
vstr
->
charset
(),
save_result
.
vstr
->
charset
(),
args
[
0
]
->
collation
.
derivation
);
DERIVATION_IMPLICIT
);
break
;
break
;
}
}
case
ROW_RESULT
:
case
ROW_RESULT
:
...
...
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