Summary: | Importing table with reserved name make a sql error | ||
---|---|---|---|
Product: | [Applications] KEXI | Reporter: | Julien Tattevin <juluano> |
Component: | Migration/Import/Export | Assignee: | Jarosław Staniek <staniek> |
Status: | CLOSED FIXED | ||
Severity: | minor | CC: | adam |
Priority: | NOR | ||
Version First Reported In: | 2.3.1 (KOffice 2.3.1) | ||
Target Milestone: | --- | ||
Platform: | Ubuntu | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Julien Tattevin
2011-01-23 18:48:33 UTC
Do you have any more info, like, what is the source database (mysql/postgresql), and were you doing a full migration, or just a single table import? I was doing a full migration, from mysqld Ver 5mysqld Ver 5.1.37-1ubuntu5.4 for debian-linux-gnu on i486 ((Ubuntu)).1.37-1ubuntu5.4 for debian-linux-gnu on i486 ((Ubuntu)) to mysqld Ver 5.1.49-1ubuntu8.1 for debian-linux-gnu on x86_64 ((Ubuntu))mysqld Ver 5.1.49-1ubuntu8.1 for debian-linux-gnu on x86_64 ((Ubuntu)) And it cause an sql syntax error because of reserved name and kexi stop migration. could you attach a dump of the database so i can recreate it here and give it a go Yes, This file was creating the database i was trying to import. http://svn.eathena.ws/svn/ea/trunk/sql-files/main.sql Git commit b8e212ecf8bddfe56568ce9a6a02b983d4d1e0d3 by Adam Pigg. Pushed by piggz into branch 'master'. Properly escape SQL key words. BUG:264101 M +1 -1 kexi/kexidb/driver.cpp M +3 -2 kexi/kexiutils/utils.cpp M +1 -1 kexi/migration/mysql/mysqlmigrate.cpp M +1 -1 kexi/migration/pqxx/pqxxmigrate.cpp http://commits.kde.org/47e7010d/b8e212ecf8bddfe56568ce9a6a02b983d4d1e0d3 Unfortunately, the attached patch doesnt entirely fix your problem. It makes the migration much better, in that keywords should be properly escaped now, but some of the tables in your schema have composite keys which are unsupported in kexi. If you would like to open another bug/wish it would be great for tracking that. Ok, for tonight i can't test but i will try asap and tell you and i will also open an second wish for the composite keys. And thank you for answering quickly ! Ok, it work nice, not importing everything but this bug is resolved (Not sure to close it properly) |