Skip to main content

November 2026

Every post published in November 2026, newest first. Pick a day to jump straight to it.

Posts
1,091
Topics
89
Reading time
124 h
Active days
16

Posts 871–900 of 1,091 · November 4–5, 2026

Page 30 of 37

Thursday, November 5, 2026

18 of 124 posts

  1. Fixed: "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.

  2. Fixed: 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.

  3. Fixed: 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.

  4. Fixed: 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. Fixed: "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.

  6. Fixed: "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.

  7. Fixed: "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.

  8. Fixed: "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.

  9. Fixed: "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.

  10. Fixed: "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.

  11. Fixed: "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.

  12. Fixed: "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.

  13. Fixed: "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.

  14. Fixed: "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.

  15. Fixed: "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.

  16. Fixed: 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.

  17. Fixed: "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.

  18. Fixed: "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.

Wednesday, November 4, 2026

12 of 91 posts

  1. 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.

  2. What UseAffectedRows Does in a MySQL Connection String for .NET C#

    UseAffectedRows decides whether MySQL reports rows changed or rows found. With Oracle's MySql.Data it's off by default, and turning it on makes EF Core throw DbUpdateConcurrencyException when an UPDATE writes the same values. Measured both ways on .NET 10 and MySQL 9.7.

  3. How to Add Summaries and Tags to an OpenAPI Document in a Minimal API

    Make a generated OpenAPI document readable: WithTags groups endpoints, WithSummary and WithDescription explain them, and ProducesProblem and ProducesValidationProblem list the errors TypedResults can't. Real JSON from a .NET 10 minimal API, shown in Scalar.

  4. How to Log with the LoggerMessage Source Generator in .NET C#

    Replace logger.LogInformation with a [LoggerMessage] partial method: an event ID, a level and a message template in one place, and generated code behind it that the CA1848 rule asks for. Real log output from a .NET 10 minimal API, including a static class's logger.

  5. Why You Should Not Return EF Core Entities from a Web API

    Binding and returning EF Core entities looks like less code, until a client picks its own primary key, a navigation property crashes the JSON, and a renamed column breaks every app. All three shown with real requests against .NET 10 and MySQL, and the small records that prevent them.

  6. How to Set Different Log Levels per Environment in appsettings.json

    See every SQL statement on your machine and none in Production, with one setting in appsettings.json and another in appsettings.Development.json. Real logs from a .NET 10 C# Web API in both environments, how the most specific category wins, and how to change a level for one run.

  7. How to Use TimeProvider Instead of DateTime.UtcNow in .NET C#

    Ask for the time through TimeProvider instead of calling DateTime.UtcNow, so code that depends on the clock can run with any time you choose. Register it in ASP.NET Core, use GetUtcNow, and swap in a fixed clock, with a one-file program you can run.

  8. How to Use Route Constraints in ASP.NET Core Minimal APIs

    What {id:int} does in an ASP.NET Core minimal API, tested with real requests: when a constraint answers 404, when a plain parameter answers 400, and min, guid and regex constraints. Plus why Microsoft says not to use constraints for input validation.

  9. How to Bind Query String Parameters with AsParameters in a Minimal API

    Replace a long list of minimal API parameters with one record. AsParameters fills it from the query string and services, with defaults and validation. Includes the [property:] detail you need on ASP.NET Core 10 to keep the OpenAPI document working.

  10. How to Write a Custom Validation Attribute in .NET C#

    Write your own data annotation in .NET C#: a Money attribute that allows only amounts a decimal(12,2) column can store exactly. Inherit ValidationAttribute, override IsValid, set the message, and use it on a request record. Real 400 responses from a .NET 10 minimal API.

  11. How to Validate Minimal API Requests in .NET 10 C# with AddValidation

    .NET 10 adds built-in validation to minimal APIs. Register AddValidation, put data annotations on your request records, and bad requests get a 400 before your handler runs, including items inside lists. Real responses before and after, on a .NET 10 API with MySQL.

  12. How to Return Problem Details Errors in ASP.NET Core

    Give every error from an ASP.NET Core API the same JSON shape: AddProblemDetails, UseExceptionHandler and UseStatusCodePages, before and after with real responses from .NET 10, plus your own errors with TypedResults.Problem. No stack traces reach the client.