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
fdc2b921
Commit
fdc2b921
authored
May 30, 2006
by
evgen@moonbone.local
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
item_cmpfunc.cc, func_in.result, multi_update.result:
After merge fix
parent
de96d529
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
0 deletions
+32
-0
mysql-test/r/func_in.result
mysql-test/r/func_in.result
+8
-0
mysql-test/r/multi_update.result
mysql-test/r/multi_update.result
+1
-0
sql/item_cmpfunc.cc
sql/item_cmpfunc.cc
+23
-0
No files found.
mysql-test/r/func_in.result
View file @
fdc2b921
...
@@ -212,12 +212,20 @@ select f2 from t1 where f2 in (1,'z');
...
@@ -212,12 +212,20 @@ select f2 from t1 where f2 in (1,'z');
f2
f2
0
0
1
1
Warnings:
Warning 1292 Truncated incorrect INTEGER value: 'z'
select f1 from t1 where 'z' in (1,f1);
select f1 from t1 where 'z' in (1,f1);
f1
f1
z
z
select * from t1 where 'z' in (f2,f1);
select * from t1 where 'z' in (f2,f1);
f1 f2
f1 f2
1 0
a 1
z 2
z 2
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'z'
Warning 1292 Truncated incorrect DOUBLE value: 'z'
Warning 1292 Truncated incorrect DOUBLE value: 'z'
select * from t1 where 1 in (f2,f1);
select * from t1 where 1 in (f2,f1);
f1 f2
f1 f2
1 0
1 0
...
...
mysql-test/r/multi_update.result
View file @
fdc2b921
...
@@ -480,6 +480,7 @@ create table t1(a int);
...
@@ -480,6 +480,7 @@ create table t1(a int);
create table t2(a int);
create table t2(a int);
delete from t1,t2 using t1,t2 where t1.a=(select a from t1);
delete from t1,t2 using t1,t2 where t1.a=(select a from t1);
ERROR HY000: You can't specify target table 't1' for update in FROM clause
ERROR HY000: You can't specify target table 't1' for update in FROM clause
drop table t1, t2;
create table t1 ( c char(8) not null ) engine=innodb;
create table t1 ( c char(8) not null ) engine=innodb;
insert into t1 values ('0'),('1'),('2'),('3'),('4'),('5'),('6'),('7'),('8'),('9');
insert into t1 values ('0'),('1'),('2'),('3'),('4'),('5'),('6'),('7'),('8'),('9');
insert into t1 values ('A'),('B'),('C'),('D'),('E'),('F');
insert into t1 values ('A'),('B'),('C'),('D'),('E'),('F');
...
...
sql/item_cmpfunc.cc
View file @
fdc2b921
...
@@ -63,6 +63,27 @@ static void agg_result_type(Item_result *type, Item **items, uint nitems)
...
@@ -63,6 +63,27 @@ static void agg_result_type(Item_result *type, Item **items, uint nitems)
}
}
/*
Aggregates result types from the array of items.
SYNOPSIS:
agg_cmp_type()
type [out] the aggregated type
items array of items to aggregate the type from
nitems number of items in the array
DESCRIPTION
This function aggregates result types from the array of items. Found type
supposed to be used later for comparison of values of these items.
Aggregation itself is performed by the item_cmp_type() function.
NOTES
Aggregation rules:
If all items are constants the type will be aggregated from all items.
If there are some non-constant items then only types of non-constant
items will be used for aggregation.
*/
static
void
agg_cmp_type
(
THD
*
thd
,
Item_result
*
type
,
Item
**
items
,
uint
nitems
)
static
void
agg_cmp_type
(
THD
*
thd
,
Item_result
*
type
,
Item
**
items
,
uint
nitems
)
{
{
uint
i
;
uint
i
;
...
@@ -89,6 +110,8 @@ static void agg_cmp_type(THD *thd, Item_result *type, Item **items, uint nitems)
...
@@ -89,6 +110,8 @@ static void agg_cmp_type(THD *thd, Item_result *type, Item **items, uint nitems)
}
}
else
if
(
is_const
)
else
if
(
is_const
)
type
[
0
]
=
item_cmp_type
(
type
[
0
],
items
[
i
]
->
result_type
());
type
[
0
]
=
item_cmp_type
(
type
[
0
],
items
[
i
]
->
result_type
());
else
if
(
field
&&
convert_constant_item
(
thd
,
field
,
&
items
[
i
]))
type
[
0
]
=
INT_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