-
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
Errors while trying to setup mysql replica #329
Comments
Hi @aszenz, The first error message appears to be related to issue #38; I'll investigate it shortly. The second error message seems to involve |
Sure: CREATE TABLE `messenger_messages` (
`id` bigint NOT NULL AUTO_INCREMENT,
`body` longtext NOT NULL,
`headers` longtext NOT NULL,
`queue_name` varchar(190) NOT NULL,
`created_at` datetime(6) NOT NULL,
`available_at` datetime(6) NOT NULL,
`delivered_at` datetime(6) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `IDX_75EA56E0FB7336F0` (`queue_name`),
KEY `IDX_75EA56E0E3BD61CE` (`available_at`),
KEY `IDX_75EA56E016BA31DB` (`delivered_at`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci This error also occurs for some other tables which use int as primary key auto_increment |
Thank you so much! I’ve addressed the issues with auto-increment columns and check constraints in PRs #333 and #335. The reported errors should now be resolved, though I’m not entirely certain. We would greatly appreciate it if you could try the latest Docker image again and let us know if you encounter any further issues. |
Thanks for the quick fix, just tried with the latest image, it now runs further than before but ends up with these errors: docker run \
--network qt_default \
-p 127.0.0.1:13306:3306 \
--env=SETUP_MODE=REPLICA \
--env=SOURCE_DSN="mysql://root@mysql2:3306/demo" \
apecloud/myduckserver:latest
For the first issue I found a related issue in duckdb: Second issue regarding csv error seems like column type auto-inference is wrong while loading the dump, maybe we can use A strange thing I noticed is that mysql db server has two db's ( |
Hi @aszenz, Apologies for the delayed reply—I've been traveling. I’ve addressed the "Binder Error: There are no UNIQUE/PRIMARY KEY Indexes that refer to this table" issue and added support for database/table replication filters in PR #336. I also tried to find a workaround for replicating your
This row contains a JSON field with a string: Fortunately, I’ve contributed a fix for this to DuckDB (duckdb/duckdb#14464), and it will be available in the upcoming DuckDB v1.2 release, scheduled for 2025-01-13. I’ve confirmed that the latest nightly build of DuckDB can read such fields correctly: ➜ duckdb-nightly
v1.1.4-dev3741 ab8c909857
Enter ".help" for usage hints.
Connected to a transient in-memory database.
Use ".open FILENAME" to reopen on a persistent database.
D .mode line
D from read_csv('testdata/issue329.tsv', header = false, columns = {'code': 'VARCHAR', 'domain': 'VARCHAR', 'translations': 'JSON'}, sep = '\t', escape = '\');
code = _ORDER_LOADINGDATE_RESTRICTION
domain = messages
translations = {"de": "Das Ladedatum darf nicht kleiner oder gleich dem eingeschränkten Ladedatensatz im Bildschirm \"Verschiedenes\" sein", "en": "Loading date cannot be less than or equal to the restricted loading date set in root data / date limitation screen", "es": "Loading Date cannot be less than or equal to the restricted loading date set in miscelaneous screen", "fr": "Loading Date cannot be less than or equal to the restricted loading date set in miscelaneous screen", "nl": "Laaddatum mag niet kleiner zijn dan of gelijk zijn aan de beperkte laadgegevensset in het scherm stamgegevens"} To work around this before the new release, I’ve implemented database and table replication filtering. You can now specify
Thank you for pointing this out! With the changes in PR #336, the database name specified in the DSN is now automatically added to the database filter. As a result, only data from this database (and any other databases explicitly specified via Let me know if you have any further questions or issues! |
Great work on fixing the previous issues so quickly, I now manage to get the central db replica up and running after ignoring translations table but for the demo db I get new errors:
The schema for this table CREATE TABLE `peildatum` (
`datum` date DEFAULT NULL,
`vanaf` date DEFAULT NULL,
`tot` date DEFAULT NULL,
`doel` enum('phprapporten','excelrapporten','opslagkosten') CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci It seems to fail here at the enum value Similar errors occur for other tables with enum columns. Note that the table |
Thank you so much for your continued testing and verification of our bug fixes! I'm glad to hear you were able to get the central db replica up and running after excluding the translations table. Regarding the new errors with the demo db, the issue appears to stem from the fact that duckdb does not accept We appreciate your detailed reports — they help us improve quickly! Let me know if you encounter anything else or need further assistance. |
Thanks for the update, I'm facing another enum related issue:
|
I have successfully reproduced and resolved the new ENUM issue in #350. Thank you for reporting it! |
Great work on the the project, I'm trying to replicate a mysql db, but got these errors:
The text was updated successfully, but these errors were encountered: