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
68048e42
Commit
68048e42
authored
Aug 15, 2007
by
mhansson@dl145s.mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge mhansson@bk-internal.mysql.com:/home/bk/mysql-5.1-opt
into dl145s.mysql.com:/data0/mhansson/my51-bug28570
parents
9308d434
eb35a876
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
51 additions
and
3 deletions
+51
-3
mysql-test/include/mix1.inc
mysql-test/include/mix1.inc
+30
-0
mysql-test/r/innodb_mysql.result
mysql-test/r/innodb_mysql.result
+18
-0
sql/handler.cc
sql/handler.cc
+2
-1
sql/opt_range.cc
sql/opt_range.cc
+1
-2
No files found.
mysql-test/include/mix1.inc
View file @
68048e42
...
...
@@ -939,6 +939,36 @@ alter table t1 add index(a(1024));
show
create
table
t1
;
drop
table
t1
;
#
# Bug #28570: handler::index_read() is called with different find_flag when
# ORDER BY is used
#
CREATE
TABLE
t1
(
a
INT
,
b
INT
,
KEY
(
b
)
)
ENGINE
=
InnoDB
;
INSERT
INTO
t1
VALUES
(
1
,
10
),
(
2
,
10
),
(
2
,
20
),
(
3
,
30
);
START
TRANSACTION
;
SELECT
*
FROM
t1
WHERE
b
=
20
FOR
UPDATE
;
--
connect
(
conn2
,
localhost
,
root
,,
test
)
# This statement gives a "failed: 1205: Lock wait timeout exceeded; try
# restarting transaction" message when the bug is present.
START
TRANSACTION
;
SELECT
*
FROM
t1
WHERE
b
=
10
ORDER
BY
A
FOR
UPDATE
;
ROLLBACK
;
--
disconnect
conn2
--
connection
default
ROLLBACK
;
DROP
TABLE
t1
;
--
echo
End
of
5.0
tests
# Fix for BUG#19243 "wrong LAST_INSERT_ID() after ON DUPLICATE KEY
...
...
mysql-test/r/innodb_mysql.result
View file @
68048e42
...
...
@@ -1123,6 +1123,24 @@ t1 CREATE TABLE `t1` (
KEY `a` (`a`(255))
) ENGINE=InnoDB DEFAULT CHARSET=utf8
drop table t1;
CREATE TABLE t1 (
a INT,
b INT,
KEY (b)
) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1,10), (2,10), (2,20), (3,30);
START TRANSACTION;
SELECT * FROM t1 WHERE b=20 FOR UPDATE;
a b
2 20
START TRANSACTION;
SELECT * FROM t1 WHERE b=10 ORDER BY A FOR UPDATE;
a b
1 10
2 10
ROLLBACK;
ROLLBACK;
DROP TABLE t1;
End of 5.0 tests
CREATE TABLE `t2` (
`k` int(11) NOT NULL auto_increment,
...
...
sql/handler.cc
View file @
68048e42
...
...
@@ -3186,7 +3186,8 @@ int handler::read_multi_range_next(KEY_MULTI_RANGE **found_range_p)
read_range_first()
start_key Start key. Is 0 if no min range
end_key End key. Is 0 if no max range
eq_range_arg Set to 1 if start_key == end_key
eq_range_arg Set to 1 if start_key == end_key and the range endpoints
will not change during query execution.
sorted Set to 1 if result should be sorted per key
NOTES
...
...
sql/opt_range.cc
View file @
68048e42
...
...
@@ -7815,8 +7815,7 @@ QUICK_RANGE_SELECT *get_quick_select_for_ref(THD *thd, TABLE *table,
range
->
min_keypart_map
=
range
->
max_keypart_map
=
make_prev_keypart_map
(
ref
->
key_parts
);
range
->
flag
=
((
ref
->
key_length
==
key_info
->
key_length
&&
(
key_info
->
flags
&
(
HA_NOSAME
|
HA_END_SPACE_KEY
))
==
HA_NOSAME
)
?
EQ_RANGE
:
0
);
(
key_info
->
flags
&
HA_END_SPACE_KEY
)
==
0
)
?
EQ_RANGE
:
0
);
if
(
!
(
quick
->
key_parts
=
key_part
=
(
KEY_PART
*
)
alloc_root
(
&
quick
->
alloc
,
sizeof
(
KEY_PART
)
*
ref
->
key_parts
)))
...
...
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