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
9019ea07
Commit
9019ea07
authored
Mar 06, 2005
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge serg@bk-internal.mysql.com:/home/bk/mysql-4.1/
into serg.mylan:/usr/home/serg/Abk/mysql-4.1
parents
870059eb
f1c81bf6
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
58 additions
and
1 deletion
+58
-1
BitKeeper/etc/logging_ok
BitKeeper/etc/logging_ok
+1
-0
mysql-test/r/func_group.result
mysql-test/r/func_group.result
+26
-0
mysql-test/t/func_group.test
mysql-test/t/func_group.test
+30
-0
sql/opt_sum.cc
sql/opt_sum.cc
+1
-1
No files found.
BitKeeper/etc/logging_ok
View file @
9019ea07
...
...
@@ -67,6 +67,7 @@ hf@deer.(none)
hf@deer.mysql.r18.ru
hf@genie.(none)
igor@hundin.mysql.fi
igor@linux.local
igor@rurik.mysql.com
ingo@mysql.com
jan@hundin.mysql.fi
...
...
mysql-test/r/func_group.result
View file @
9019ea07
...
...
@@ -754,3 +754,29 @@ show columns from t2;
Field Type Null Key Default Extra
f2 datetime 0000-00-00 00:00:00
drop table t2, t1;
CREATE TABLE t1(
id int PRIMARY KEY,
a int,
b int,
INDEX i_b_id(a,b,id),
INDEX i_id(a,id)
);
INSERT INTO t1 VALUES
(1,1,4), (2,2,1), (3,1,3), (4,2,1), (5,1,1);
SELECT MAX(id) FROM t1 WHERE id < 3 AND a=2 AND b=6;
MAX(id)
NULL
DROP TABLE t1;
CREATE TABLE t1(
id int PRIMARY KEY,
a int,
b int,
INDEX i_id(a,id),
INDEX i_b_id(a,b,id)
);
INSERT INTO t1 VALUES
(1,1,4), (2,2,1), (3,1,3), (4,2,1), (5,1,1);
SELECT MAX(id) FROM t1 WHERE id < 3 AND a=2 AND b=6;
MAX(id)
NULL
DROP TABLE t1;
mysql-test/t/func_group.test
View file @
9019ea07
...
...
@@ -496,3 +496,33 @@ drop table t2;
create
table
t2
select
f2
from
(
select
now
()
f2
from
t1
)
a
;
show
columns
from
t2
;
drop
table
t2
,
t1
;
#
# Bug 8893: wrong result for min/max optimization with 2 indexes
#
CREATE
TABLE
t1
(
id
int
PRIMARY
KEY
,
a
int
,
b
int
,
INDEX
i_b_id
(
a
,
b
,
id
),
INDEX
i_id
(
a
,
id
)
);
INSERT
INTO
t1
VALUES
(
1
,
1
,
4
),
(
2
,
2
,
1
),
(
3
,
1
,
3
),
(
4
,
2
,
1
),
(
5
,
1
,
1
);
SELECT
MAX
(
id
)
FROM
t1
WHERE
id
<
3
AND
a
=
2
AND
b
=
6
;
DROP
TABLE
t1
;
# change the order of the last two index definitions
CREATE
TABLE
t1
(
id
int
PRIMARY
KEY
,
a
int
,
b
int
,
INDEX
i_id
(
a
,
id
),
INDEX
i_b_id
(
a
,
b
,
id
)
);
INSERT
INTO
t1
VALUES
(
1
,
1
,
4
),
(
2
,
2
,
1
),
(
3
,
1
,
3
),
(
4
,
2
,
1
),
(
5
,
1
,
1
);
SELECT
MAX
(
id
)
FROM
t1
WHERE
id
<
3
AND
a
=
2
AND
b
=
6
;
DROP
TABLE
t1
;
sql/opt_sum.cc
View file @
9019ea07
...
...
@@ -624,7 +624,6 @@ static bool find_key_for_maxmin(bool max_fl, TABLE_REF *ref,
{
if
(
!
(
field
->
flags
&
PART_KEY_FLAG
))
return
0
;
// Not key field
*
prefix_len
=
0
;
TABLE
*
table
=
field
->
table
;
uint
idx
=
0
;
...
...
@@ -637,6 +636,7 @@ static bool find_key_for_maxmin(bool max_fl, TABLE_REF *ref,
KEY_PART_INFO
*
part
,
*
part_end
;
key_part_map
key_part_to_use
=
0
;
uint
jdx
=
0
;
*
prefix_len
=
0
;
for
(
part
=
keyinfo
->
key_part
,
part_end
=
part
+
keyinfo
->
key_parts
;
part
!=
part_end
;
part
++
,
jdx
++
,
key_part_to_use
=
(
key_part_to_use
<<
1
)
|
1
)
...
...
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