View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0006885||VALENTINA STUDIO||Tool - SQL Editor||public||2014-07-03 10:48||2019-09-28 08:04|
|Reporter||loenk2x||Assigned To||Igor Nikitin|
|Platform||INTEL||OS||Mac OS||OS Version||10.9|
|Target Version||9.6.x||Fixed in Version||9.6.x|
|Summary||0006885: Executing truncate/create in SQL editor not working|
I have several queries loaded in the SQL editor, like this:
SET FOREIGN_KEY_CHECKS = 0;
TRUNCATE TABLE table1;
TRUNCATE TABLE table2;
TRUNCATE TABLE table3;
SET FOREIGN_KEY_CHECKS = 1;
Engine is InnoDB. Executing the queries did not resulting in any errors. But the tables were not truncated at all.
The same when i tried to create tables using the SQL editor. While executing select queries went just fine.
|Tags||No tags attached.|
|Working with DB:||mySQL Server|
|Version of your DB|
|Can you check if this not works in newest 5.5.8 ?|
|Yes, this is still not working in 5.5.8. I tried to load SQL dump to a specific opened database, and executed the queries. The tables were nowhere to be found. The database was still empty when the execution finished. I tried several times. No luck.|
ok, funny thing just happened. I removed comments like this in the SQL dump:
-- Table structure for `exp_accessories`
The tables were created after I removed these. But the queries **below** that comment lines were still not executed.
Can you attach your SQL file, please?
What app have you used to create it?
These comment lines contain specific line ending - CR (without LF).
The problem is that MySQL server doesn't handle it for some reason,
so everything after '-- ' is treated as a comment.
SQL Editor executes queries 'as is' without any modification or parsing.
That's actually weird. Because I can import the SQL log file using mysql CLI without any hitch. That's in the same machine.
About CR without LF, i thought that's common for *NIX systems, including Mac OS X?
a) may be CLI do some job converting that end lines?
b) CR yes linux + macosx
c) may be studio take file with CR, but says to mySQL server something else? e.g. win encoding?
- I tried to type the queries by hand, with the comment lines block as well, and studio executed it very well.
- And then I tried to copy and paste the query directly from the dump with the comment lines block; queries after the comments block was not executed.
- And then I tried to replace the new line characters within the comment lines block. Execution was perfect; the tables were all created successfully.
I'm not sure about where I got the CR encoding problem. I don't use any windows environment, so that shouldn't be the cause.
According to http://en.wikipedia.org/wiki/Newline:
CR is from Mac OS up to 9, Unix uses LF, Windows uses CR+LF
Valentina Studio sends a query right in the same form as it was typed/inserted.
Confirmed it by checking the query logs of MySQL server.
So CR line ending is not recognized at all.
I've checked another application:
1) it splits query into separate statements;
2) replaces all individual CRs to LFs (except for CRs in the quoted strings).
so where from you get this DUMP file?
which app produce it? mySQL itself? Else?
Sounds like some old enough Carbon Mac App ?
|Currently used version of scintilla auto converts line endings on paste an external text (tested). Line endings are SC_EOL_LF for all platforms now.|
|2014-07-03 10:48||loenk2x||New Issue|
|2014-07-03 12:31||Ruslan Zasukhin||Assigned To||=> Sergey Pashkov|
|2014-07-03 12:31||Ruslan Zasukhin||Status||new => assigned|
|2014-07-03 12:33||Ruslan Zasukhin||Target Version||=> 5.6|
|2014-07-03 12:33||Ruslan Zasukhin||Note Added: 0007819|
|2014-07-09 04:21||loenk2x||Note Added: 0007824|
|2014-07-09 04:28||loenk2x||Note Added: 0007825|
|2014-07-09 06:44||Sergey Pashkov||Status||assigned => confirmed|
|2014-07-09 07:52||Sergey Pashkov||Note Added: 0007827|
|2014-07-09 10:07||Sergey Pashkov||Note Added: 0007828|
|2014-07-09 12:22||loenk2x||Note Added: 0007829|
|2014-07-09 12:26||Ruslan Zasukhin||Note Added: 0007830|
|2014-07-09 13:17||loenk2x||Note Added: 0007831|
|2014-07-09 13:46||Sergey Pashkov||Note Added: 0007832|
|2014-07-09 19:09||Ruslan Zasukhin||Note Added: 0007833|
|2018-09-25 09:58||Ruslan Zasukhin||Target Version||TODO_BUGS => 8.6.x|
|2019-09-28 08:04||Igor Nikitin||Assigned To||Sergey Pashkov => Igor Nikitin|
|2019-09-28 08:04||Igor Nikitin||Status||confirmed => resolved|
|2019-09-28 08:04||Igor Nikitin||Resolution||open => fixed|
|2019-09-28 08:04||Igor Nikitin||Fixed in Version||=> 9.6.x|
|2019-09-28 08:04||Igor Nikitin||Note Added: 0011001|