![]() ![]() MariaDB > Delete from ai_test where a = 'third' MariaDB > Delete from ai_test where a = 'second' MariaDB > Delete from ai_test where a = 'first' INSERT INTO ai_test(a) VALUES ('second') # Your MariaDB Server version: 10.1.29-MariaDB MariaDB ServerĬREATE TABLE IF NOT EXISTS ai_test(id INT AUTO_INCREMENT PRIMARY KEY, Well ok, I found the problem (it's a known issue from 2013). The connection from the application to database enforces this SQL modes:īut I don't think that these have something to do with AI. ![]() I do not use TRUNCATE project_queues or drop the table construction and created it again in code.ĭid somebody run into a similar issue like me? I can't find any anomalies in the log either. The Same record now points to multiple different project queues) show create table project_queues (Which damaged my references in the audit table. When the records are processed, they are deleted.ĭeletion is invoked by rails construction stroy in a loop which triggers DELETE record FROM table on MySql database.īut now I've noticed, that in the table project_queues the autoIncrement Id (primary key) was set up back to 1. I have a database table project_queues which is used as a queue, where I store some records. ![]() Use a Prepared Statement within a Stored Procedure: drop PROCEDURE if exists reset_autoincrement ĬREATE PROCEDURE reset_autoincrement (IN schemaName varchar(255))ĭECLARE cur1 CURSOR FOR SELECT COLUMN_NAME, TABLE_NAME FROM information_schema.I've just run into an issue which I'm not able to solve. We needed to do this after cleaning out a database. Update all auto increment columns in a database to the smallest possible value based on current values in the databases. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |