Uploaded image for project: 'MariaDB Connector/C'
  1. MariaDB Connector/C
  2. CONC-242

Incorrect description for mysql_optionsv option MYSQL_OPT_RECONNECT

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Blocker
    • Resolution: Fixed
    • 2.3.2
    • N/A
    • None
    • None

    Description

      The current document said that that option can accept following as param:
      NULL or (void *)"1"
      But in 2.3.2 source code file libmariadb.c:3046,
      mysql->reconnect= *(uint *)arg1;
      where uint is unsigne int, which consume 4 bytes, and there is no NULL check for arg1.
      And in 3.0.1 source code file mariadb_lib.c:2650,
      mysql->options.reconnect= *(my_bool *)arg1;
      where my_bool is a char type, which consume 1 byte, and there is no NULL check for arg1.

      Please correct the document AND please also document the type change (uint -> char) since version 3.0.1, as old code which use "*(uint *)arg1 == 1" won't equal to "*(char *)arg1 == 1" in Big Endian arch.

      Attachments

        Activity

          People

            georg Georg Richter
            godfrey Zhang Jingqiang
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.