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

memory corruption with C client library

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • None
    • None
    • None
    • Linux, Windows

    Description

      Frequently, SQLite database files are corrupted (malformed) when used along with C client library to connect to MySQL server.

      Source code for the test suite can be found as attachment.

      Overview of the sample test code where SQLite corruption is reproducible:
      1. Create database files
      2. Sets journal mode for all database files to "WAL"
      3. Spawns threads

      In each thread:
      1. Opens the database file
      2. Begins SQLite transaction
      3. Connects to MySQL server
      4. Add a row in SQLite database file
      5. Commits SQLite transaction
      6. Closes the SQLite database file and repeats step 1

      Each thread access only one SQLite database file.

      Within few seconds of running the sample test code, the databases appear to corrupt and cannot be used anymore. (with only 25 threads)

      If MySQL operations are not involved in the test code, it runs fine and can scale as many as 1000 threads without issues (1000 thread and 1000 SQLite databases).

      With MySQL operations, SQLite database files corrupt frequently.

      Attachments

        Activity

          People

            georg Georg Richter
            ashwinkumar Ashwin
            Votes:
            0 Vote for this issue
            Watchers:
            3 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.