-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
INTERNAL Error: Primary exception: Failed to cast MySQL boolean - expected 1 byte element but got element of size %s #75
Comments
I think here there is for sure an error in the formatting code within the throw in duckdb/duckdb_mysql, fixing that should make the error behave slightly better. This likely it's placed in the duckdb/duckdb_mysql repo |
Thanks for reporting! I agree the error message here could be better. Perhaps you can retry with the following settings? SET mysql_tinyint1_as_boolean=false;
SET mysql_bit1_as_boolean=false; |
You nailed it in one go with like no information, amazing! This solved my issue. I will read https://duckdb.org/docs/extensions/mysql more closely next time! |
I'll keep the issue open as I think the error message can definitely be improved here |
Fix #75: no longer throw when interpreting TINYINT(1) columns with non-0 or 1 values as booleans
What happens?
I am using the duckdb cli with the mysql extension to export a database from mysql to parquet. On export, I get the error:
The error directs me to file an issue. The mysql database I am exporting has 214 tables. The error does not provide any information about which table is responsible for this internal error so I am not sure how to create a minimal reproducible example of the issue or how to proceed.
To Reproduce
I would be happy to share the full sql dump from the mysql (it's only ~100 MB compressed) if that helps to debug, but I haven't been able to reduce this to a nice minimal reproducible example because duckdb's error message gives me zero information about which of the 214 tables the export hit this error.
OS:
ubuntu
DuckDB Version:
1.0.0
DuckDB Client:
duckdb cli client
Full Name:
Carl Boettiger
Affiliation:
UC Berkeley
What is the latest build you tested with? If possible, we recommend testing with the latest nightly build.
I have tested with a stable release
Did you include all relevant data sets for reproducing the issue?
No - Other reason (please specify in the issue body)
Did you include all code required to reproduce the issue?
Did you include all relevant configuration (e.g., CPU architecture, Python version, Linux distribution) to reproduce the issue?
The text was updated successfully, but these errors were encountered: