Repository navigation
Fix MySQL :copyfrom into mixed-case tables; ArgumentError for unknown isolation:; doc gaps - #57
Merged
devin-ai-integration[bot] merged 2 commits intoNov 4, 2026
Conversation
… with ArgumentError; document Steep timeout, Struct member names and the SQLite slice limit Co-Authored-By: Doron Eli Rachman <doron050@gmail.com>
Contributor
Author
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
…uotes Co-Authored-By: Doron Eli Rachman <doron050@gmail.com>
devin-ai-integration
Bot
deleted the
devin/1793759282-mysql-copyfrom-case
branch
November 4, 2026 02:44
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
MySQL
:copyfrominto a table whose name has uppercase letters failed. sqlc lowercases MySQL identifiers, so forINSERT INTO `MixedCaseCopies` …the generatedLOAD DATAnamed`mixedcasecopies`. On Linux MySQL, with the defaultlower_case_table_names=0, table names are case-sensitive, so the call raisedMysql2::Error: Table '…mixedcasecopies' doesn't exist. Other queries on the same table already worked, because they use the SQL text as written.:copyfromgets its table and column names from a new driver hook,copy_target. The default indrivers/base.rbquotes sqlc's names, as before.drivers/mysql2.rboverrides it to take the target table (optionallyschema.table) and the column list as theINSERTwrites them, quoted or unquoted. It falls back to the old behavior if the text cannot be matched.INSERTnamed"""MixedCaseCopies""".drivers/sqlite3.rboverridescopy_targetto strip the quotes from sqlc's names ("…",`…`,[…]) and then quote each name once.test_copyfrom_keeps_the_case_of_table_and_column_namesuses a newMixedCaseCopiestable in the example schemas of all three engines. The MySQL test covers both backtick-quoted names and unquoted names in a different column order. Onmainthe MySQL test fails with the error above, and the SQLite test fails withno such tablewhen the code is generated with sqlc 1.27.Smaller items from the same pre-release check:
isolation:values (pg,mysql2) now raiseArgumentError("unknown isolation level: …")before a connection is checked out. Before, they raisedKeyErrorfromISOLATION_LEVELS.fetch. SQLite'smode:already raisedArgumentError. The existing isolation E2E tests now expectArgumentError; onmainthey fail withKeyError.library "timeout"for code generated with arubyVersionbelow 3.3.Structrows (rubyVersionbelow 3.2) rename more members thanDatarows, for examplecount→count_.sqlc.slice.LOAD DATAkeeps the table and column names as written.lib/sqlc_gen_ruby/code.rb: removed a duplicated range in a character class, whichruby -wwarned about.examples/,test/golden,test/fixtures/*.binandsteep_expectations.yml.docs/Coverage.mdlists the new test.Checklist
examples/is regenerated (rake sqlc_generate_process) and committedrake test, andrake end2end_*when the generated code changes)rake rubocop) and Steep-clean (rake steep)bug,enhancement,documentation, orbreaking) so the release notes are grouped correctly