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
ad7e825d
Commit
ad7e825d
authored
Mar 27, 2009
by
Ramil Kalimullin
Browse files
Options
Browse Files
Download
Plain Diff
Merge
parents
296390a2
c2c47b67
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
83 additions
and
3 deletions
+83
-3
mysql-test/include/mix1.inc
mysql-test/include/mix1.inc
+40
-0
mysql-test/r/innodb_mysql.result
mysql-test/r/innodb_mysql.result
+30
-0
sql/handler.cc
sql/handler.cc
+13
-3
No files found.
mysql-test/include/mix1.inc
View file @
ad7e825d
...
@@ -1122,6 +1122,46 @@ SELECT a, b, c FROM t1 WHERE b = 1 ORDER BY a DESC LIMIT 5;
...
@@ -1122,6 +1122,46 @@ SELECT a, b, c FROM t1 WHERE b = 1 ORDER BY a DESC LIMIT 5;
DROP
TABLE
t1
;
DROP
TABLE
t1
;
#
# Bug#37284 Crash in Field_string::type()
#
--
disable_warnings
DROP
TABLE
IF
EXISTS
t1
;
--
enable_warnings
CREATE
TABLE
t1
(
a
char
(
50
))
ENGINE
=
InnoDB
;
CREATE
INDEX
i1
on
t1
(
a
(
3
));
SELECT
*
FROM
t1
WHERE
a
=
'abcde'
;
DROP
TABLE
t1
;
--
echo
#
--
echo
# BUG #26288: savepoint are not deleted on comit, if the transaction
--
echo
# was otherwise empty
--
echo
#
BEGIN
;
SAVEPOINT
s1
;
COMMIT
;
--
error
1305
RELEASE
SAVEPOINT
s1
;
BEGIN
;
SAVEPOINT
s2
;
COMMIT
;
--
error
1305
ROLLBACK
TO
SAVEPOINT
s2
;
BEGIN
;
SAVEPOINT
s3
;
ROLLBACK
;
--
error
1305
RELEASE
SAVEPOINT
s3
;
BEGIN
;
SAVEPOINT
s4
;
ROLLBACK
;
--
error
1305
ROLLBACK
TO
SAVEPOINT
s4
;
--
echo
End
of
5.0
tests
--
echo
End
of
5.0
tests
# Fix for BUG#19243 "wrong LAST_INSERT_ID() after ON DUPLICATE KEY
# Fix for BUG#19243 "wrong LAST_INSERT_ID() after ON DUPLICATE KEY
...
...
mysql-test/r/innodb_mysql.result
View file @
ad7e825d
...
@@ -1378,6 +1378,36 @@ a b c
...
@@ -1378,6 +1378,36 @@ a b c
5 1 1
5 1 1
4 1 1
4 1 1
DROP TABLE t1;
DROP TABLE t1;
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (a char(50)) ENGINE=InnoDB;
CREATE INDEX i1 on t1 (a(3));
SELECT * FROM t1 WHERE a = 'abcde';
a
DROP TABLE t1;
#
# BUG #26288: savepoint are not deleted on comit, if the transaction
# was otherwise empty
#
BEGIN;
SAVEPOINT s1;
COMMIT;
RELEASE SAVEPOINT s1;
ERROR 42000: SAVEPOINT s1 does not exist
BEGIN;
SAVEPOINT s2;
COMMIT;
ROLLBACK TO SAVEPOINT s2;
ERROR 42000: SAVEPOINT s2 does not exist
BEGIN;
SAVEPOINT s3;
ROLLBACK;
RELEASE SAVEPOINT s3;
ERROR 42000: SAVEPOINT s3 does not exist
BEGIN;
SAVEPOINT s4;
ROLLBACK;
ROLLBACK TO SAVEPOINT s4;
ERROR 42000: SAVEPOINT s4 does not exist
End of 5.0 tests
End of 5.0 tests
CREATE TABLE `t2` (
CREATE TABLE `t2` (
`k` int(11) NOT NULL auto_increment,
`k` int(11) NOT NULL auto_increment,
...
...
sql/handler.cc
View file @
ad7e825d
...
@@ -1184,6 +1184,16 @@ int ha_commit_trans(THD *thd, bool all)
...
@@ -1184,6 +1184,16 @@ int ha_commit_trans(THD *thd, bool all)
if
(
rw_trans
)
if
(
rw_trans
)
start_waiting_global_read_lock
(
thd
);
start_waiting_global_read_lock
(
thd
);
}
}
else
if
(
all
)
{
/*
A COMMIT of an empty transaction. There may be savepoints.
Destroy them. If the transaction is not empty
savepoints are cleared in ha_commit_one_phase()
or ha_rollback_trans().
*/
thd
->
transaction
.
cleanup
();
}
#endif
/* USING_TRANSACTIONS */
#endif
/* USING_TRANSACTIONS */
DBUG_RETURN
(
error
);
DBUG_RETURN
(
error
);
}
}
...
@@ -1292,11 +1302,11 @@ int ha_rollback_trans(THD *thd, bool all)
...
@@ -1292,11 +1302,11 @@ int ha_rollback_trans(THD *thd, bool all)
thd
->
transaction
.
xid_state
.
xid
.
null
();
thd
->
transaction
.
xid_state
.
xid
.
null
();
}
}
if
(
all
)
if
(
all
)
{
thd
->
variables
.
tx_isolation
=
thd
->
session_tx_isolation
;
thd
->
variables
.
tx_isolation
=
thd
->
session_tx_isolation
;
thd
->
transaction
.
cleanup
();
}
}
}
/* Always cleanup. Even if there nht==0. There may be savepoints. */
if
(
all
)
thd
->
transaction
.
cleanup
();
#endif
/* USING_TRANSACTIONS */
#endif
/* USING_TRANSACTIONS */
if
(
all
)
if
(
all
)
thd
->
transaction_rollback_request
=
FALSE
;
thd
->
transaction_rollback_request
=
FALSE
;
...
...
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