Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
bbf7bb7a
Commit
bbf7bb7a
authored
Mar 18, 2018
by
Aviv Palivoda
Committed by
Berker Peksag
Mar 18, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bpo-27645: Fix version number in 'database in transaction' fallback (GH-6131)
It was actually fixed in SQLite 3.8.8, not 3.8.7.
parent
7f81bb2a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
5 deletions
+3
-5
Lib/sqlite3/test/backup.py
Lib/sqlite3/test/backup.py
+1
-3
Modules/_sqlite/connection.c
Modules/_sqlite/connection.c
+2
-2
No files found.
Lib/sqlite3/test/backup.py
View file @
bbf7bb7a
...
...
@@ -37,14 +37,12 @@ class BackupTests(unittest.TestCase):
self
.
cx
.
backup
(
bck
)
def
test_bad_target_in_transaction
(
self
):
if
sqlite
.
sqlite_version_info
==
(
3
,
8
,
7
,
1
):
self
.
skipTest
(
'skip until we debug https://bugs.python.org/issue27645#msg313562'
)
bck
=
sqlite
.
connect
(
':memory:'
)
bck
.
execute
(
'CREATE TABLE bar (key INTEGER)'
)
bck
.
executemany
(
'INSERT INTO bar (key) VALUES (?)'
,
[(
3
,),
(
4
,)])
with
self
.
assertRaises
(
sqlite
.
OperationalError
)
as
cm
:
self
.
cx
.
backup
(
bck
)
if
sqlite
.
sqlite_version_info
<
(
3
,
8
,
7
):
if
sqlite
.
sqlite_version_info
<
(
3
,
8
,
8
):
self
.
assertEqual
(
str
(
cm
.
exception
),
'target is in transaction'
)
def
test_keyword_only_args
(
self
):
...
...
Modules/_sqlite/connection.c
View file @
bbf7bb7a
...
...
@@ -1481,8 +1481,8 @@ pysqlite_connection_backup(pysqlite_Connection *self, PyObject *args, PyObject *
return
NULL
;
}
#if SQLITE_VERSION_NUMBER < 300800
7
/* Since 3.8.
7
this is already done, per commit
#if SQLITE_VERSION_NUMBER < 300800
8
/* Since 3.8.
8
this is already done, per commit
https://www.sqlite.org/src/info/169b5505498c0a7e */
if
(
!
sqlite3_get_autocommit
(((
pysqlite_Connection
*
)
target
)
->
db
))
{
PyErr_SetString
(
pysqlite_OperationalError
,
"target is in transaction"
);
...
...
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