Open doug65536 opened 10 years ago
You didn't indicate what kind of database you're using. The use of GO
suggests SQL Server, but MySQL is the only one for which AUTO_INCREMENT
is valid, so far as I know.
Why not link to the actual Fiddle that shows your problem?
Can I get a link when there is an error? On Jun 3, 2014 5:27 PM, "bladeoflight16" notifications@github.com wrote:
You didn't indicate what kind of database you're using. The use of GO suggests SQL Server, but MySQL is the only one for which AUTO_INCREMENT is valid, so far as I know.
Why not link to the actual Fiddle that shows your problem?
— Reply to this email directly or view it on GitHub https://github.com/jakefeasel/sqlfiddle/issues/67#issuecomment-45022942.
Hm. Well, I guess not if the error is in the schema. You can if it's in the query, though. Anyway, you still haven't said what database this is.
Reviewing my old bugs. Sorry I missed your request for information.
The bug persists (I just tried it today). This is what it says at the bottom:
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 'GO
CREATE FUNCTION test(a INT, b INT) RETURNS INT BEGIN
RETURN a + b' at line 5
...which I know is not valid. Here's the important bit: after causing that error, edit the sql and add a bunch of empty lines before line 5. Then try to build the schema again. The error message will not update, it will still say the error is on line 5 (the message will not change).
Delimiter set to GO:
Try building that schema. Try changing it (perhaps adding 10 or 20 blank lines after the create table, and building schema again. The error message will refer to a line that is now whitespace.
I know that the
THEN BEGIN
andEND
is wrong. The problem is, it is almost impossible to find errors in sqlfiddle when it gives you nonsense error lines.