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
e1efba02
Commit
e1efba02
authored
Apr 11, 2007
by
igor@olga.mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Post-merge fix.
parent
3b990d2c
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
3 deletions
+9
-3
mysql-test/r/row.result
mysql-test/r/row.result
+6
-0
sql/item_cmpfunc.cc
sql/item_cmpfunc.cc
+3
-3
No files found.
mysql-test/r/row.result
View file @
e1efba02
...
@@ -193,6 +193,12 @@ SELECT ROW(2,1) IN (ROW(21,2),ROW(ROW(1,1,3),0));
...
@@ -193,6 +193,12 @@ SELECT ROW(2,1) IN (ROW(21,2),ROW(ROW(1,1,3),0));
ERROR 21000: Operand should contain 1 column(s)
ERROR 21000: Operand should contain 1 column(s)
SELECT ROW(2,1) IN (ROW(ROW(1,1,3),0),ROW(21,2));
SELECT ROW(2,1) IN (ROW(ROW(1,1,3),0),ROW(21,2));
ERROR 21000: Operand should contain 1 column(s)
ERROR 21000: Operand should contain 1 column(s)
SELECT ROW(1,1,1) = ROW(1,1,1) as `1`, ROW(1,1,1) = ROW(1,2,1) as `0`, ROW(1,NULL,1) = ROW(2,2,1) as `0`, ROW(1,NULL,1) = ROW(1,2,2) as `0`, ROW(1,NULL,1) = ROW(1,2,1) as `null` ;
1 0 0 0 null
1 0 0 0 NULL
select row(NULL,1)=(2,0);
row(NULL,1)=(2,0)
0
CREATE TABLE t1 (a int, b int, PRIMARY KEY (a,b));
CREATE TABLE t1 (a int, b int, PRIMARY KEY (a,b));
INSERT INTO t1 VALUES (1,1), (2,1), (3,1), (1,2), (3,2), (3,3);
INSERT INTO t1 VALUES (1,1), (2,1), (3,1), (1,2), (3,2), (3,3);
EXPLAIN SELECT * FROM t1 WHERE a=3 AND b=2;
EXPLAIN SELECT * FROM t1 WHERE a=3 AND b=2;
...
...
sql/item_cmpfunc.cc
View file @
e1efba02
...
@@ -95,9 +95,9 @@ static int cmp_row_type(Item* item1, Item* item2)
...
@@ -95,9 +95,9 @@ static int cmp_row_type(Item* item1, Item* item2)
return
1
;
return
1
;
for
(
uint
i
=
0
;
i
<
n
;
i
++
)
for
(
uint
i
=
0
;
i
<
n
;
i
++
)
{
{
if
(
item2
->
el
(
i
)
->
check_cols
(
item1
->
el
(
i
)
->
cols
())
||
if
(
item2
->
el
ement_index
(
i
)
->
check_cols
(
item1
->
element_index
(
i
)
->
cols
())
||
(
item1
->
el
(
i
)
->
result_type
()
==
ROW_RESULT
&&
(
item1
->
el
ement_index
(
i
)
->
result_type
()
==
ROW_RESULT
&&
cmp_row_type
(
item1
->
el
(
i
),
item2
->
el
(
i
))))
cmp_row_type
(
item1
->
el
ement_index
(
i
),
item2
->
element_index
(
i
))))
return
1
;
return
1
;
}
}
return
0
;
return
0
;
...
...
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