Navigation Menu

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

bugs in _sqlite module #47562

Closed
vstinner opened this issue Jul 7, 2008 · 2 comments
Closed

bugs in _sqlite module #47562

vstinner opened this issue Jul 7, 2008 · 2 comments
Labels
stdlib Python modules in the Lib dir

Comments

@vstinner
Copy link
Member

vstinner commented Jul 7, 2008

BPO 3312
Nosy @birkenfeld, @vstinner
Files
  • _sqlite.patch: Patch to fix described bugs
  • 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 2008-07-16.22:33:35.570>
    created_at = <Date 2008-07-07.13:16:51.088>
    labels = ['library']
    title = 'bugs in _sqlite module'
    updated_at = <Date 2008-07-16.22:33:35.558>
    user = 'https://github.com/vstinner'

    bugs.python.org fields:

    activity = <Date 2008-07-16.22:33:35.558>
    actor = 'georg.brandl'
    assignee = 'none'
    closed = True
    closed_date = <Date 2008-07-16.22:33:35.570>
    closer = 'georg.brandl'
    components = ['Library (Lib)']
    creation = <Date 2008-07-07.13:16:51.088>
    creator = 'vstinner'
    dependencies = []
    files = ['10841']
    hgrepos = []
    issue_num = 3312
    keywords = ['patch']
    message_count = 2.0
    messages = ['69387', '69850']
    nosy_count = 2.0
    nosy_names = ['georg.brandl', 'vstinner']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = None
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue3312'
    versions = ['Python 2.6']

    @vstinner
    Copy link
    Member Author

    vstinner commented Jul 7, 2008

    (A) module_register_adapter() doesn't check microprotocols_add()
    result, whereas it can fails (eg. dict setitem error).
    Example: "import _sqlite3; _sqlite3.register_adapter({}, None)" =>
    should raise a TypeError (unhashable type: 'dict').

    (B) Connection.set_isolation_level() tries to create the
    string "BEGIN "+isolation_level and the store it as PyString in
    begin_statement. But if the result can not be converted to string,
    Python crashs. Example:

    >>> import _sqlite3
    >>> c=_sqlite3.Connection("a")
    >>> c.isolation_level = u"\xe9"
    Erreur de segmentation (core dumped)

    Attached patch fix the two bugs.

    @vstinner vstinner added the stdlib Python modules in the Lib dir label Jul 7, 2008
    @birkenfeld
    Copy link
    Member

    Thanks, fixed in r65040.

    @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
    stdlib Python modules in the Lib dir
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants