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
5cdd1eb6
Commit
5cdd1eb6
authored
Jun 13, 2006
by
igor@rurik.mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Post-review corrections of the fix for bug #18206.
parent
fc46017c
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
2 deletions
+26
-2
mysql-test/r/func_group.result
mysql-test/r/func_group.result
+13
-0
mysql-test/t/func_group.test
mysql-test/t/func_group.test
+9
-0
sql/opt_sum.cc
sql/opt_sum.cc
+4
-2
No files found.
mysql-test/r/func_group.result
View file @
5cdd1eb6
...
...
@@ -940,3 +940,16 @@ EXPLAIN SELECT MAX(b) FROM t1;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 2
DROP TABLE t1;
CREATE TABLE t1 (id int , b varchar(512), INDEX(b(250))) COLLATE latin1_bin;
Warnings:
Warning 1246 Converting column 'b' from CHAR to TEXT
INSERT INTO t1 VALUES
(1,CONCAT(REPEAT('_', 250), "qq")), (1,CONCAT(REPEAT('_', 250), "zz")),
(1,CONCAT(REPEAT('_', 250), "aa")), (1,CONCAT(REPEAT('_', 250), "ff"));
SELECT MAX(b) FROM t1;
MAX(b)
__________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________zz
EXPLAIN SELECT MAX(b) FROM t1;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 4
DROP TABLE t1;
mysql-test/t/func_group.test
View file @
5cdd1eb6
...
...
@@ -617,4 +617,13 @@ SELECT MAX(b) FROM t1;
EXPLAIN
SELECT
MAX
(
b
)
FROM
t1
;
DROP
TABLE
t1
;
CREATE
TABLE
t1
(
id
int
,
b
varchar
(
512
),
INDEX
(
b
(
250
)))
COLLATE
latin1_bin
;
INSERT
INTO
t1
VALUES
(
1
,
CONCAT
(
REPEAT
(
'_'
,
250
),
"qq"
)),
(
1
,
CONCAT
(
REPEAT
(
'_'
,
250
),
"zz"
)),
(
1
,
CONCAT
(
REPEAT
(
'_'
,
250
),
"aa"
)),
(
1
,
CONCAT
(
REPEAT
(
'_'
,
250
),
"ff"
));
SELECT
MAX
(
b
)
FROM
t1
;
EXPLAIN
SELECT
MAX
(
b
)
FROM
t1
;
DROP
TABLE
t1
;
# End of 4.1 tests
sql/opt_sum.cc
View file @
5cdd1eb6
...
...
@@ -686,7 +686,9 @@ static bool find_key_for_maxmin(bool max_fl, TABLE_REF *ref,
return
0
;
/* Check whether the index component is partial */
if
(
part
->
length
<
table
->
field
[
part
->
fieldnr
-
1
]
->
pack_length
())
Field
*
part_field
=
table
->
field
[
part
->
fieldnr
-
1
];
if
((
part_field
->
flags
&
BLOB_FLAG
)
||
part
->
length
<
part_field
->
key_length
())
break
;
if
(
field
->
eq
(
part
->
field
))
...
...
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