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
f55745bd
Commit
f55745bd
authored
May 17, 2005
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge book.sanja.is.com.ua:/Users/bell/mysql/bk/mysql-4.1
into book.sanja.is.com.ua:/Users/bell/mysql/bk/work-4.1
parents
d16f9433
742415de
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
50 additions
and
1 deletion
+50
-1
BitKeeper/etc/logging_ok
BitKeeper/etc/logging_ok
+1
-0
mysql-test/r/subselect.result
mysql-test/r/subselect.result
+24
-0
mysql-test/t/subselect.test
mysql-test/t/subselect.test
+24
-0
sql/item.cc
sql/item.cc
+1
-1
No files found.
BitKeeper/etc/logging_ok
View file @
f55745bd
...
...
@@ -29,6 +29,7 @@ bar@gw.udmsearch.izhnet.ru
bar@mysql.com
bar@noter.intranet.mysql.r18.ru
bell@51.0.168.192.in-addr.arpa
bell@book.sanja.is.com.ua
bell@laptop.sanja.is.com.ua
bell@sanja.is.com.ua
bk@admin.bk
...
...
mysql-test/r/subselect.result
View file @
f55745bd
...
...
@@ -2697,3 +2697,27 @@ select (1,2,3) = (select * from t1);
ERROR 21000: Operand should contain 3 column(s)
select (select * from t1) = (1,2,3);
ERROR 21000: Operand should contain 2 column(s)
drop table t1
#;
CREATE TABLE `t1` (
`itemid` bigint(20) unsigned NOT NULL auto_increment,
`sessionid` bigint(20) unsigned default NULL,
`time` int(10) unsigned NOT NULL default '0',
`type` set('A','D','E','F','G','I','L','N','U') collate latin1_general_ci NOT
NULL default '',
`data` text collate latin1_general_ci NOT NULL,
PRIMARY KEY (`itemid`)
) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
INSERT INTO `t1` VALUES (1, 1, 1, 'D', '');
CREATE TABLE `t2` (
`sessionid` bigint(20) unsigned NOT NULL auto_increment,
`pid` int(10) unsigned NOT NULL default '0',
`date` int(10) unsigned NOT NULL default '0',
`ip` varchar(15) collate latin1_general_ci NOT NULL default '',
PRIMARY KEY (`sessionid`)
) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
INSERT INTO `t2` VALUES (1, 1, 1, '10.10.10.1');
SELECT s.ip, count( e.itemid ) FROM `t1` e JOIN t2 s ON s.sessionid = e.sessionid WHERE e.sessionid = ( SELECT sessionid FROM t2 ORDER BY sessionid DESC LIMIT 1 ) GROUP BY s.ip HAVING count( e.itemid ) >0 LIMIT 0 , 30;
ip count( e.itemid )
10.10.10.1 1
drop tables t1,t2;
mysql-test/t/subselect.test
View file @
f55745bd
...
...
@@ -1722,3 +1722,27 @@ select (1,2,3) = (select * from t1);
--
error
1241
select
(
select
*
from
t1
)
=
(
1
,
2
,
3
);
drop
table
t1
#
# Item_int_with_ref check (BUG#10020)
#
CREATE
TABLE
`t1`
(
`itemid`
bigint
(
20
)
unsigned
NOT
NULL
auto_increment
,
`sessionid`
bigint
(
20
)
unsigned
default
NULL
,
`time`
int
(
10
)
unsigned
NOT
NULL
default
'0'
,
`type`
set
(
'A'
,
'D'
,
'E'
,
'F'
,
'G'
,
'I'
,
'L'
,
'N'
,
'U'
)
collate
latin1_general_ci
NOT
NULL
default
''
,
`data`
text
collate
latin1_general_ci
NOT
NULL
,
PRIMARY
KEY
(
`itemid`
)
)
DEFAULT
CHARSET
=
latin1
COLLATE
=
latin1_general_ci
;
INSERT
INTO
`t1`
VALUES
(
1
,
1
,
1
,
'D'
,
''
);
CREATE
TABLE
`t2`
(
`sessionid`
bigint
(
20
)
unsigned
NOT
NULL
auto_increment
,
`pid`
int
(
10
)
unsigned
NOT
NULL
default
'0'
,
`date`
int
(
10
)
unsigned
NOT
NULL
default
'0'
,
`ip`
varchar
(
15
)
collate
latin1_general_ci
NOT
NULL
default
''
,
PRIMARY
KEY
(
`sessionid`
)
)
DEFAULT
CHARSET
=
latin1
COLLATE
=
latin1_general_ci
;
INSERT
INTO
`t2`
VALUES
(
1
,
1
,
1
,
'10.10.10.1'
);
SELECT
s
.
ip
,
count
(
e
.
itemid
)
FROM
`t1`
e
JOIN
t2
s
ON
s
.
sessionid
=
e
.
sessionid
WHERE
e
.
sessionid
=
(
SELECT
sessionid
FROM
t2
ORDER
BY
sessionid
DESC
LIMIT
1
)
GROUP
BY
s
.
ip
HAVING
count
(
e
.
itemid
)
>
0
LIMIT
0
,
30
;
drop
tables
t1
,
t2
;
sql/item.cc
View file @
f55745bd
...
...
@@ -2034,7 +2034,7 @@ bool Item_int::eq(const Item *arg, bool binary_cmp) const
Item
*
Item_int_with_ref
::
new_item
()
{
DBUG_ASSERT
(
ref
->
basic_
const_item
());
DBUG_ASSERT
(
ref
->
const_item
());
/*
We need to evaluate the constant to make sure it works with
parameter markers.
...
...
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