Blog Archive
Every post on Dewiride Developer Blogs, newest first. Pick a year or a month to narrow it down, or page through them all.
- Posts
- 1,085
- Topics
- 132
- Reading time
- 130 h
- First post
- Jun 2025
Posts 571–600 of 1,085 · November 4–5, 2026
Page 20 of 37
November 2026
802 postsThursday, November 5, 2026
29 of 124 posts
Fixed: "ERROR 1356 (HY000): View 'sys.innodb_lock_waits' references invalid table(s) or column(s) or function(s)" in MySQL
A SELECT from a sys view failed with ERROR 1356, which sounds like a broken view. Here it's a missing right: the account could read the view, and not run the functions it calls. GRANT EXECUTE ON sys.* fixes it. Real output from MySQL 9.7.
4 min readFixed: "ERROR 1221 (HY000): Incorrect usage of DB GRANT and GLOBAL PRIVILEGES" in MySQL
GRANT PROCESS ON inventory.* failed with ERROR 1221, because PROCESS is a server-wide privilege and can't be granted on one database. Grant it on *.* instead. Real output from MySQL 9.7.
3 min readFixed: Warning 1751: "The creation of some temporary tables could not be rolled back" in MySQL
A ROLLBACK reported 1 warning: the temporary table created inside the transaction stayed behind. The rest of the transaction was rolled back as normal. Create temporary tables before you start, and the warning goes away. Real output from MySQL 9.7.
4 min readFixed: Deadlock When a MySQL Transaction Inserts a Child Row Before Updating the Parent
Two transactions insert a child row and then update the parent, and one fails with ERROR 1213. The foreign key check takes a shared lock on the parent, so both hold it and neither can upgrade. Update the parent first, and the deadlock goes away. Real output from MySQL 9.7.
5 min readFixed: Deadlock on INSERT After SELECT FOR UPDATE on a Missing Row in MySQL
Check that a row doesn't exist with FOR UPDATE, then insert it: two sessions doing that deadlock with ERROR 1213. Each holds a gap lock the other's INSERT needs. Skip the check, insert directly, and let a unique index decide. Real output from MySQL 9.7.
5 min readFixed: EXPLAIN UPDATE Says "not executable by iterator executor" in MySQL
In MySQL 9.7, EXPLAIN UPDATE prints <not executable by iterator executor> and nothing useful, because the default format is TREE. Ask for FORMAT=TRADITIONAL, and you get the plan: which index it uses, and how many rows it reads. Real output.
4 min readFixed: "ERROR 1040 (HY000): Too many connections" in MySQL
A new connection was refused with ERROR 1040, because the server was already at max_connections. See who's using them, end what's stuck, and raise the limit if the load is real. Here's each step on MySQL 9.7, with the reserved slot for administrators that makes it possible.
4 min readFixed: "ERROR 1238 (HY000): Variable is a read only variable" in MySQL
Setting innodb_rollback_on_timeout failed with ERROR 1238, because it can only be set when MySQL starts. In Docker Compose that's a command line in compose.yaml. Here's the fix on MySQL 9.7, and the proof that a lock wait timeout then rolls back the whole transaction.
4 min readFixed: "ERROR 1094 (HY000): Unknown thread id" in MySQL
KILL failed with ERROR 1094, because no connection has that ID: it has already ended, or the number came from the wrong column. List the connections again, and use PROCESSLIST_ID, not THREAD_ID. Real output from MySQL 9.7.
3 min readFixed: "ERROR 1095 (HY000): You are not owner of thread" in MySQL
KILL failed with ERROR 1095, because the account can only stop its own connections. Run it from an account with CONNECTION_ADMIN, or ask whoever owns the connection to finish. Real output from MySQL 9.7.
3 min readFixed: "ERROR 2013 (HY000): Lost connection to MySQL server during query"
The mysql client reported ERROR 2013, reconnected by itself, and carried on, while my open transaction was silently rolled back. The cause here was a KILL from another session. Here's how to tell what happened to your work, and what to do next. Real output from MySQL 9.7.
5 min readFixed: "ERROR 1317 (70100): Query execution was interrupted" in MySQL
A statement ended with ERROR 1317 because someone, or something, ran KILL QUERY on it. The connection is fine, and the statement didn't happen. Find out what stopped it, deal with the reason it was stuck, and run it again. Real output from MySQL 9.7.
4 min readFixed: ROLLBACK Doesn't Undo My Changes After CREATE TABLE in MySQL
An UPDATE in a transaction, then a CREATE TABLE, then ROLLBACK, and the UPDATE stayed. CREATE TABLE committed it, silently, as ALTER TABLE, TRUNCATE and others do. Keep structure changes out of transactions. Real output from MySQL 9.7.
4 min readFixed: ALTER TABLE Hangs on "Waiting for table metadata lock" in MySQL
An ALTER TABLE sat at Waiting for table metadata lock, with nothing wrong in the statement. An idle transaction had read the table and never finished, and a plain SELECT is enough to hold the lock. Here's how to find it with sys.schema_table_lock_waits on MySQL 9.7, and end it.
5 min readFixed: A MySQL SELECT in a Transaction Returns an Old Value
Inside a transaction, a SELECT kept returning 50 after another session had saved 40. That's REPEATABLE READ's snapshot working as designed. Commit and read again, use FOR UPDATE to read the newest row, or switch to READ COMMITTED. Real output from MySQL 9.7.
5 min readFixed: "ERROR at line 1: Unknown command '\G'" in the mysql Client
The same \G that works when you type it fails with Unknown command when it comes from --execute or a script, because the MySQL 9.7 client switches its local commands off outside interactive use. Use --vertical, or turn them on with --commands=ON.
4 min readFixed: "ERROR 3024 (HY000): Query execution was interrupted, maximum statement execution time exceeded" in MySQL
A SELECT was stopped with ERROR 3024, because it ran past max_execution_time. Check the limit, then either make the query cheaper or give that one query more time with an optimizer hint, which took a real query from a failure at 1 second to a result at 4.7 seconds on MySQL 9.7.
4 min readFixed: "ERROR 1305 (42000): SAVEPOINT does not exist" in MySQL
ROLLBACK TO SAVEPOINT failed with ERROR 1305, because the savepoint was already gone: released, or wiped out when the transaction ended. Here are both cases on MySQL 9.7, and the order of statements that works.
4 min readFixed: "ERROR 1792 (25006): Cannot execute statement in a READ ONLY transaction" in MySQL
An UPDATE inside START TRANSACTION READ ONLY failed with ERROR 1792, and so did CREATE TEMPORARY TABLE. Use a normal transaction when you need to write, or create the temporary table first. Real output from MySQL 9.7.
4 min readFixed: "ERROR 1568 (25001): Transaction characteristics can't be changed while a transaction is in progress" in MySQL
SET TRANSACTION ISOLATION LEVEL failed with ERROR 1568, because a transaction was already open. The level has to be set before the transaction starts, so finish the transaction first. Real output from MySQL 9.7.
3 min readFixed: "ERROR 3572 (HY000): Statement aborted because lock(s) could not be acquired immediately and NOWAIT is set" in MySQL
A SELECT FOR UPDATE NOWAIT failed with ERROR 3572, because another transaction held the row. That's the option doing its job, so the fix is to handle it: try again once the row is free, take the free rows with SKIP LOCKED, or drop NOWAIT and wait. Real output from MySQL 9.7.
4 min readFixed: "ERROR 1142 (42000): SELECT command denied to user for table 'data_locks'" in MySQL
The tools for reading locks live in the performance_schema and sys schemas, and an ordinary account can't read them: ERROR 1142. Three GRANT statements on a separate account fix it, with no access to your own tables. Real output from MySQL 9.7.
4 min readFixed: "ERROR 1227 (42000): Access denied; you need (at least one of) the SUPER or SYSTEM_VARIABLES_ADMIN privilege(s)" in MySQL
SET GLOBAL failed with ERROR 1227, because changing a setting for the whole server takes an administrator. Usually you don't need it: SET SESSION changes the same setting for your own connection, with no special rights. Real output from MySQL 9.7.
5 min readFixed: "ERROR 1227 (42000): Access denied; you need (at least one of) the PROCESS privilege(s) for this operation" in MySQL
Reading information_schema.innodb_trx or running SHOW ENGINE INNODB STATUS failed with ERROR 1227, because the account doesn't have the PROCESS privilege. Don't give it to your app's account: a small separate account can read locks and transactions without touching your data.
5 min readFixed: "ERROR 1205 (HY000): Lock wait timeout exceeded; try restarting transaction" in MySQL
An UPDATE waited for a row until MySQL gave up with ERROR 1205. Another transaction had the row, sitting idle with its work uncommitted. Here's how to find it with sys.innodb_lock_waits, why the timeout only undoes the last statement, and how to fix it on MySQL 9.7.
6 min readFixed: "ERROR 1213 (40001): Deadlock found when trying to get lock; try restarting transaction" in MySQL
Two MySQL transactions each held the row the other wanted, so MySQL rolled one back with ERROR 1213. The report in SHOW ENGINE INNODB STATUS shows the cycle. Taking the rows in the same order means the second transaction waits instead of failing. Real output from MySQL 9.7.
8 min readFixed: A Named Pipe's Reader Never Finishes in a Shell Script
My script closed its end of a named pipe and waited for the reader, and it waited forever, because a background process it had started kept a copy of that end open. Close the descriptor for the child with 3>&-. Real output from zsh on macOS.
4 min readFixed: "pkill -f" Killed Another Script That Only Mentioned the Name
pkill -f matches the full command line of every process, so stopping an API also killed a script in another terminal, because its command line mentioned the API's name. See what would match with pgrep -lf, and stop a process by its saved ID. Real output from macOS.
4 min readFixed: "xargs: command line cannot be assembled, too long" on macOS
xargs -I on macOS stopped with command line cannot be assembled, too long, though the command was nowhere near the system's limit. Each argument it builds from {} may only reach 255 bytes. Use -S, or pass the line as a separate argument. Real output from macOS.
4 min read
Wednesday, November 4, 2026
1 of 91 posts
How to Connect a .NET C# Web API to a MySQL Database — Part 3: Read and Write MySQL Data with EF Core
Read and write MySQL data from a .NET C# Web API with EF Core 10 and Oracle's provider: insert a row and get its new ID, read rows with LINQ, update only the columns that changed, delete safely, turn MySQL errors into clear HTTP answers, page and search a list, stop two people overwriting each other, and read the real SQL behind every call.
71 min read