
We’ve been working hard on improving data consistency, SQL compatibility, and concurrency in memcp. Today’s update brings several improvements under the hood that make your databases faster, safer, and more reliable.
🔒 Data Consistency & Sanitization
- Automatic type sanitization for integer columns
When inserting intoINT,BIGINT,SMALLINT, and similar columns, string inputs are now automatically converted to integers.
→ This ensures data integrity without requiring manual casting.
→ Data compression is now much better when receiving SQL queries from prepared statements e.g. from PHP scripts
⚡️ Concurrency & Rebuild Improvements
- Rebuild process is now safer under heavy writes
- Mutexes are held until the new shard is fully ready, ensuring inserts/deletes don’t race ahead of the rebuild.
- Logging cleanup is now synchronized with to avoid race conditions.
- Rebuild estimation improved by subtracting deletions for more accurate size tracking.
→ You can now rebuild shards while inserts are happening without risking corruption.
🛠 SQL Parser & Compatibility
- ALTER TABLE ADD COLUMN now supports full column attributes:
PRIMARY KEY,UNIQUE,AUTO_INCREMENT,NOT NULL,DEFAULT,ON UPDATE,COMMENT,COLLATE- Future-proofing:
GENERATED ALWAYS ASis reserved for later support.
- DELETE now reports the number of affected rows – making it easier to track what’s actually happening in your queries.
✅ Quality-of-Life Fixes
- Improved update/delete handling in shards with clearer internal logging.
- Cleaner synchronization of logfiles when rebuilding.
Why this matters
These changes mean:
- Safer schema evolution with real attribute support.
- More predictable and reliable concurrent writes.
- Better visibility when modifying data.
- Reduced need for manual data cleaning thanks to automatic sanitization.
Comments are closed