Open AnyhowStep opened 3 years ago
There are probably a dozen other similar cases unrelated to multi-line/execution comments that you've forgotten.
db-fiddle is convenient. This does not make db-fiddle results correct.
Another good example,
SELECT 1, 1
Db-fiddle result, | 1 |
---|---|
1 |
MySQL result, | 1 | 1 |
---|---|---|
1 | 1 |
DB-fiddle seems to merge duplicate columns.
SELECT 1, 2 AS `1`;
Db-fiddle result, | 1 |
---|---|
2 |
MySQL result, | 1 | 1 |
---|---|---|
1 | 2 |
db-fiddle is good for testing widely-used features.
It is terrible for testing esoteric stuff. It is an abstraction for querying multiple types of DBs.
More than once, you've been bitten by using db-fiddle when you have a perfectly running local instance of MySQL...
For example,
The above is valid on db-fiddle, querying their MySQL DB.
It is definitely invalid on MySQL.
This suggests db-fiddle does some pre-processing which strips multi-line comments. And, indeed, they do. They completely ignore execution comments/hidden commands.