I am creating backups of my DB using mysqldump. I also use this to create copies of my DB in my testing environment. I use "source mydbfile.sql;" when I want to import the backup and this worked fine for ages. However, recently I started getting:
ERROR 1064 (42000): 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 '/ or next budgetary period','c',2260),(10480,'Not at all','a',2261),(10481,'Some' at line 1
Query OK, 2236 rows affected (0.02 sec)
Records: 2236 Duplicates: 0 Warnings: 0
on some of the tables. My investigations lead me to conclude that this is because the "INSERT" query is too long, as if I split the "INSERT" query up into to several smaller queries it works fine. Is there a way to make mysqldump restrict the query lengths? I have tried using "--skip-extended-insert" but this creates a query for every row in the DB, which is hopelessly inefficient. I want to be able to port the DB's between Linux and Windows boxes, so switching to copying the binary files won't work. I could change to use "mysqldump --tab= ....." but that's not ideal either.... All I'm trying to find is a way for mysqldump to produce SQL that MySQL will process. It's already splitting tables into multiple lines already, so I don't understand why it doesn't do it a bit more often.....
ERROR 1064 (42000): 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 '/ or next budgetary period','c',2260),(10480,'Not at all','a',2261),(10481,'Some' at line 1
Query OK, 2236 rows affected (0.02 sec)
Records: 2236 Duplicates: 0 Warnings: 0
on some of the tables. My investigations lead me to conclude that this is because the "INSERT" query is too long, as if I split the "INSERT" query up into to several smaller queries it works fine. Is there a way to make mysqldump restrict the query lengths? I have tried using "--skip-extended-insert" but this creates a query for every row in the DB, which is hopelessly inefficient. I want to be able to port the DB's between Linux and Windows boxes, so switching to copying the binary files won't work. I could change to use "mysqldump --tab= ....." but that's not ideal either.... All I'm trying to find is a way for mysqldump to produce SQL that MySQL will process. It's already splitting tables into multiple lines already, so I don't understand why it doesn't do it a bit more often.....