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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
87bb6200
Commit
87bb6200
authored
Aug 20, 2003
by
bell@laptop.sanja.is.com.ua
Browse files
Options
Browse Files
Download
Plain Diff
merge
parents
1ab66dda
341d5aa0
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
0 deletions
+20
-0
mysql-test/r/subselect.result
mysql-test/r/subselect.result
+7
-0
mysql-test/t/subselect.test
mysql-test/t/subselect.test
+11
-0
sql/item.h
sql/item.h
+2
-0
No files found.
mysql-test/r/subselect.result
View file @
87bb6200
...
@@ -1344,3 +1344,10 @@ a
...
@@ -1344,3 +1344,10 @@ a
2
2
10
10
drop table t1,t2;
drop table t1,t2;
CREATE TABLE t1 (s1 CHAR(5) COLLATE latin1_german1_ci,
s2 CHAR(5) COLLATE latin1_swedish_ci);
INSERT INTO t1 VALUES ('z','?');
select * from t1 where s1 > (select max(s2) from t1);
ERROR HY000: Illegal mix of collations (latin1_german1_ci,IMPLICIT) and (latin1_swedish_ci,IMPLICIT) for operation '>'
select * from t1 where s1 > any (select max(s2) from t1);
drop table t1;
mysql-test/t/subselect.test
View file @
87bb6200
...
@@ -901,3 +901,14 @@ insert into t3 values (1),(2),(10),(50);
...
@@ -901,3 +901,14 @@ insert into t3 values (1),(2),(10),(50);
select
a
from
t3
where
t3
.
a
in
(
select
a
from
t1
where
a
<=
3
union
select
*
from
t2
where
a
<=
30
);
select
a
from
t3
where
t3
.
a
in
(
select
a
from
t1
where
a
<=
3
union
select
*
from
t2
where
a
<=
30
);
drop
table
t1
,
t2
;
drop
table
t1
,
t2
;
#
# collation test
#
CREATE
TABLE
t1
(
s1
CHAR
(
5
)
COLLATE
latin1_german1_ci
,
s2
CHAR
(
5
)
COLLATE
latin1_swedish_ci
);
INSERT
INTO
t1
VALUES
(
'z'
,
'?'
);
--
error
1265
select
*
from
t1
where
s1
>
(
select
max
(
s2
)
from
t1
);
--
error
1265
select
*
from
t1
where
s1
>
any
(
select
max
(
s2
)
from
t1
);
drop
table
t1
;
sql/item.h
View file @
87bb6200
...
@@ -862,6 +862,7 @@ class Item_cache_int: public Item_cache
...
@@ -862,6 +862,7 @@ class Item_cache_int: public Item_cache
{
{
value
=
item
->
val_int_result
();
value
=
item
->
val_int_result
();
null_value
=
item
->
null_value
;
null_value
=
item
->
null_value
;
collation
.
set
(
item
->
collation
);
}
}
double
val
()
{
return
(
double
)
value
;
}
double
val
()
{
return
(
double
)
value
;
}
longlong
val_int
()
{
return
value
;
}
longlong
val_int
()
{
return
value
;
}
...
@@ -879,6 +880,7 @@ class Item_cache_real: public Item_cache
...
@@ -879,6 +880,7 @@ class Item_cache_real: public Item_cache
{
{
value
=
item
->
val_result
();
value
=
item
->
val_result
();
null_value
=
item
->
null_value
;
null_value
=
item
->
null_value
;
collation
.
set
(
item
->
collation
);
}
}
double
val
()
{
return
value
;
}
double
val
()
{
return
value
;
}
longlong
val_int
()
{
return
(
longlong
)
(
value
+
(
value
>
0
?
0.5
:
-
0.5
));
}
longlong
val_int
()
{
return
(
longlong
)
(
value
+
(
value
>
0
?
0.5
:
-
0.5
));
}
...
...
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