[CONC-99] memory corruption with C client library Created: 2014-06-18  Updated: 2014-06-20  Resolved: 2014-06-20

Status: Closed
Project: MariaDB Connector/C
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Ashwin Assignee: Georg Richter
Resolution: Fixed Votes: 0
Labels: memory_corruption
Environment:

Linux, Windows


Attachments: File SQLite_corruption.tar.gz    

 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.



 Comments   
Comment by Georg Richter [ 2014-06-20 ]

fixed in rev. 144

Generated at Thu Feb 08 03:02:52 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.