sfa-siard / SiardGui

SIARD Suite - SiardGui
Other
17 stars 3 forks source link

Upload errors .siard -->mySQL: in case of "_" in table names and empty spaces in foreign key names. #32

Open ibbenz opened 2 years ago

ibbenz commented 2 years ago

Error 1: If a foreign key name contains an empty space (like "orders order" instead of "ordersorder", then the following error occurs. java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Details FOREIGN KEY(OrderID) REFERENCES "simpledb"."orders"(OrderID)' at line 1

see e.g. line 326 and 337 in metadata.xml

OrdersOrder Details [0_1-3_Northwind_simple_2022_07_10_V01.zip](https://github.com/sfa-siard/SiardGui/files/9279139/0_1-3_Northwind_simple_2022_07_10_V01.zip) **Error 2:** **If a tablename contains a "_" then the table is not "dropped" from the Siard Suite cache, when a table with the same name is uploades.** Archive upload failed ( java.sql.SQLSyntaxErrorException: Table 'job_history' already exists)! Partial upload may have to be deleted manually. see in attached example metadata.xml, line 238: JOB_HISTORYtable3 ![TableName_with_Subline](https://user-images.githubusercontent.com/58251561/183351413-890f52cb-30b3-4e56-b96e-0ff5985042e5.png) [0_4-6_oe_Northwind_complex.zip](https://github.com/sfa-siard/SiardGui/files/9279176/0_4-6_oe_Northwind_complex.zip)
walkerjan commented 2 years ago

Thanks a lot for reporting this issue.

We shall investigate it and consider respective measures to be taken.