Conversation
| " (see INFO at the end)." ) | ||
| } | ||
| if( match( $0, /`[^`]+/ ) ){ | ||
| if( match( $0, /["`][^"`]+/ ) ){ |
There was a problem hiding this comment.
This can't be as it matches also `whatever" or "whatever` . A better option would be something like:
| if( match( $0, /["`][^"`]+/ ) ){ | |
| if( match( $0, /[`][^`]+/ ) || match( $0, /["][^"]/ ) ){ |
But the issue is, that generally supporting ANSI quotes for table names (i.e. double quotes) disables the use of double quotes for string literals which is not tested with this script and I believe it'll bring weird issues.
Could you please gather a test suite with ANSI quotes as well as a test suite without ANSI quotes, so that we can see where there are issues? I can't currently test the ANSI quotes functionality.
| /(CONSTRAINT|constraint) \".*\" (FOREIGN KEY|foreign key)/ ) ){ | ||
| print "," | ||
| } | ||
| } |
There was a problem hiding this comment.
This whole removal doesn't look correct to me. I can remember there was a reason I put it there but unfortunately at that time there was no policy of "unit tests for each commit" like now and I can't quickly find the reason.
Anyone with some spare time to find why this is needed?
Given the following DDL:
mysql2sqlite emits (1) a malformed CREATE INDEX statement, and (2) a line containing only a comma before the CONSTRAINT:
This patch addresses both of these issues.