Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sqlite Integer Fields #58620

Closed
goatsofmendez mannequin opened this issue Mar 26, 2012 · 12 comments
Closed

Sqlite Integer Fields #58620

goatsofmendez mannequin opened this issue Mar 26, 2012 · 12 comments
Labels
release-blocker stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error

Comments

@goatsofmendez
Copy link
Mannequin

goatsofmendez mannequin commented Mar 26, 2012

BPO 14412
Nosy @loewis, @pitrou, @tjguk, @benjaminp, @briancurtin, @akheron
Files
  • sqltest.py
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2012-04-12.12:07:36.651>
    created_at = <Date 2012-03-26.11:00:01.268>
    labels = ['type-bug', 'library', 'release-blocker']
    title = 'Sqlite Integer Fields'
    updated_at = <Date 2012-04-12.12:07:36.650>
    user = 'https://bugs.python.org/goatsofmendez'

    bugs.python.org fields:

    activity = <Date 2012-04-12.12:07:36.650>
    actor = 'benjamin.peterson'
    assignee = 'none'
    closed = True
    closed_date = <Date 2012-04-12.12:07:36.651>
    closer = 'benjamin.peterson'
    components = ['Library (Lib)']
    creation = <Date 2012-03-26.11:00:01.268>
    creator = 'goatsofmendez'
    dependencies = []
    files = ['25027']
    hgrepos = []
    issue_num = 14412
    keywords = []
    message_count = 12.0
    messages = ['156809', '156812', '156817', '156818', '156929', '156940', '156959', '156972', '157671', '157904', '158122', '158123']
    nosy_count = 7.0
    nosy_names = ['loewis', 'pitrou', 'goatsofmendez', 'tim.golden', 'benjamin.peterson', 'brian.curtin', 'petri.lehtinen']
    pr_nums = []
    priority = 'release blocker'
    resolution = 'out of date'
    stage = None
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue14412'
    versions = ['Python 2.7']

    @goatsofmendez
    Copy link
    Mannequin Author

    goatsofmendez mannequin commented Mar 26, 2012

    There appears to be a problem with the handling of integer fields in SQLite in the 32-bit release candidate for 2.7.3.

    I'm running the 64-bit version of Windows 7.

    I've attached a script which reproduces the issue. The following are the results I get with different versions of Python, with the later two being as expected.

    Python - 2.7.3 rc2 - 32-bit:
    R:\>c:\python27\python "C:\Temp\sqltest.py"
    530428456761032704 <type 'long'>

    Python - 2.7.2 - 32-bit:
    R:\>c:\python27\python "C:\Temp\sqltest.py"
    123499999 <type 'int'>

    Python - 2.7.2 rc2 - 64-bit:
    R:\>c:\python27_64\python c:\temp\sqltest.py
    123499999 <type 'int'>

    I wonder if this might be related to the changes in bpo-8033.

    @goatsofmendez goatsofmendez mannequin added the type-bug An unexpected behavior, bug, or error label Mar 26, 2012
    @pitrou
    Copy link
    Member

    pitrou commented Mar 26, 2012

    Can't reproduce under Linux. Can someone test under Windows?

    @pitrou pitrou added stdlib Python modules in the Lib dir release-blocker labels Mar 26, 2012
    @pitrou
    Copy link
    Member

    pitrou commented Mar 26, 2012

    Can't reproduce on a 2.7 debug build under Windows either.
    Some data points:

    >>> hex(530428456761032704)
    '0x75c75df00000000'
    >>> hex(123499999)
    '0x75c75df'

    Looking at bpo-8033, it seems unlikely to have caused this problem.
    Perhaps we shipped the 2.7.3 rc with a buggy SQLite build?

    Can you (or someone else) check the 2.6, 3.1 and 3.2 release candidates as well?

    @goatsofmendez
    Copy link
    Mannequin Author

    goatsofmendez mannequin commented Mar 26, 2012

    I've tried the 32-bit version of 3.2.3rc2 and that works as expected.

    There don't seem to be Windows builds of 2.6 and 3.1 available so I haven't been able to try those.

    @goatsofmendez
    Copy link
    Mannequin Author

    goatsofmendez mannequin commented Mar 27, 2012

    I've done some more checking

    2.7.3rc1 32-bit works as expected.

    If I replace

    sqlite3.dll
    _sqlite3.lib

    in rc2 32-bit with those from rc1 then that fixes the problem.

    @loewis
    Copy link
    Mannequin

    loewis mannequin commented Mar 27, 2012

    I can't reproduce that. Your test script, with the released 2.7.3rc2, on Windows 7, gives

    123499999 <type 'int'>

    for me, as it should.

    @goatsofmendez
    Copy link
    Mannequin Author

    goatsofmendez mannequin commented Mar 28, 2012

    Is that with the 32-bit Python on a 64-bit copy of Windows?

    I've tried it on a different machine, again running Windows 7 64-bit and I'm getting the same incorrect results.

    @loewis
    Copy link
    Mannequin

    loewis mannequin commented Mar 28, 2012

    Is that with the 32-bit Python on a 64-bit copy of Windows?

    No, it was the 64-bit version.

    @benjaminp
    Copy link
    Contributor

    What steps can we take to further debug/address this?

    @benjaminp
    Copy link
    Contributor

    Given the lack of progress here, I will be releasing 2.7.3.

    @goatsofmendez
    Copy link
    Mannequin Author

    goatsofmendez mannequin commented Apr 12, 2012

    I've tested the released 2.7.3 and this works fine so there must just have been some oddity with the packaging of sqlite in rc2.

    @benjaminp
    Copy link
    Contributor

    Great!

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    release-blocker stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants