Skip to content

If HAVE_LONG_LONG is not defined, longval will not be initialized (_sqlite) #46792

Closed

Description

@ocean-city
mannequin
BPO 2540
Nosy @loewis
Files
  • fix.patch
  • 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-05-04.13:03:48.861>
    created_at = <Date 2008-04-03.04:00:30.834>
    labels = ['extension-modules', 'type-bug']
    title = 'If HAVE_LONG_LONG is not defined, longval will not be initialized (_sqlite)'
    updated_at = <Date 2008-05-04.13:03:48.828>
    user = 'https://bugs.python.org/ocean-city'

    bugs.python.org fields:

    activity = <Date 2008-05-04.13:03:48.828>
    actor = 'ghaering'
    assignee = 'ghaering'
    closed = True
    closed_date = <Date 2008-05-04.13:03:48.861>
    closer = 'ghaering'
    components = ['Extension Modules']
    creation = <Date 2008-04-03.04:00:30.834>
    creator = 'ocean-city'
    dependencies = []
    files = ['9930']
    hgrepos = []
    issue_num = 2540
    keywords = ['patch']
    message_count = 5.0
    messages = ['64888', '64889', '64892', '64893', '66205']
    nosy_count = 3.0
    nosy_names = ['loewis', 'ghaering', 'ocean-city']
    pr_nums = []
    priority = 'normal'
    resolution = 'rejected'
    stage = None
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue2540'
    versions = ['Python 3.0']

    Activity

    1. ocean-city commented on Apr 3, 2008

      ocean-citymannequin
      MannequinAuthor

      I noticed compiler warned "'longval' is not used anywhere."
      And I found 'longval' was not initialized where HAVE_LONG_LONG
      was not defined. Is attached patch intended behavior? Thanks.

    2. ocean-city commented on Apr 3, 2008

      ocean-citymannequin
      MannequinAuthor

      Oh, I forgot this. When I debuged with
      #undef HAVE_LONG_LONG
      I noticed test_sqlite.py failed with this error message.

      ======================================================================
      ERROR: CheckLargeInt (sqlite3.test.types.SqliteTypeTests)
      ----------------------------------------------------------------------

      Traceback (most recent call last):
        File "e:\python-dev\py3k\lib\sqlite3\test\types.py", line 52, in
      CheckLargeInt
      self.cur.execute("insert into test(i) values (?)", (num,))
      

      OverflowError: Python int too large to convert to C long

      ======================================================================
      ERROR: CheckLargeInt (sqlite3.test.types.DeclTypesTests)
      ----------------------------------------------------------------------

      Traceback (most recent call last):
        File "e:\python-dev\py3k\lib\sqlite3\test\types.py", line 146, in
      CheckLargeIn
      t
          self.cur.execute("insert into test(i) values (?)", (num,))
      OverflowError: Python int too large to convert to C long

      Maybe some fix for test is needed?

    3. loewis commented on Apr 3, 2008

      loewismannequin
      Mannequin

      Gerhard, what do you think?

    4. ghaering commented on Apr 3, 2008

      ghaeringmannequin
      Mannequin

      My problem is that I can't really test (better than #undefining
      HAVE_LONG_LONG) this, because I have no platform to test on that doesn't
      have long longs.

      I'm not even sure SQLite *really* works when there is no 64-bit type.
      I'll ask on the SQLite mailing list. If that is so, then I'd like to get
      rid of the superfluous #ifdefs.

    5. ghaering commented on May 4, 2008

      ghaeringmannequin
      Mannequin

      SQLite requires 64-bit integers in order to build. So the whole
      HAVE_LONG_LONG #ifdefing was useless. I've removed it in r62700.

    6. transferred this issue fromon Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      extension-modulesC modules in the Modules dirtype-bugAn unexpected behavior, bug, or error

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions