#925 Export SQL file extension: as .mysql, not .sql

invalid
nobody
5
2013-06-11
2006-06-11
No

Hello,

At the moment phpMyAdmin extensively supports mysql.
When a user exports their database through phpmyadmin,
the exported file (locahost.sql) ends in a .sql
extension. Furthermore, the mysql engine proceses
imported and exported files and files are generated to
comply with addtional mysql sql grammer rules (beyond
the original sql grammer specs).

Recommendation:
The localhost.sql file be renamed to localhost.mysql,
or localhost.mysql.sql (to imply that it confirms to
sql, but needs to maintain mysql syntax rules which at
the same time do conflict with sql conventions... see
example below)

Reasoning:
If you are editing the sql file in a text editor, you
must comply with mysql grammer specs if you want the
file to be compatable with other phpmyadmin mysql
installations.

To anyone reviewing the file localhost.sql in their
favourite text editor (vim, emacs, whatever), it would
more benefiticial to have mysql syntax highlighting
apply to the file rather than sql syntax highlighting.
Mysql language syntax deviates in at least one area
from SQL syntax:

I found this (edited for conciseness) on mysql's
website (note the part about 'must be followed by a
space'... if you don't do that, the file won't import
successfuly back into mysql):

Standard SQL uses '--' as a start-comment sequence.
MySQL Server 3.23.3 and up also supports a variant of
the '--' comment style. That is, the '--' start-comment
sequence must be followed by a space (or by a control
character such as a newline).
The space is required to prevent problems with
automatically generated SQL queries that use constructs
http://dev.mysql.com/doc/refman/5.0/en/ansi-diff-comments.html

Thoughts? This isn't a bug, per-se, but it prevents
bugs and can encourage more appropriate syntax
highlighting. I was importing back into phpmyadmin a
file I exported earlier, and made the mistake above
with comments. There, I learned that in this case,
mysql requires an update of sql specs.

-Krystian

Discussion

  • Marc Delisle

    Marc Delisle - 2006-06-11

    Logged In: YES
    user_id=210714

    A thought: did you notice that there is a choice of SQL
    compatibility mode in the export dialog?

     
  • Marc Delisle

    Marc Delisle - 2006-06-20
    • labels: 546627 --> Data Export
     
  • Marc Delisle

    Marc Delisle - 2006-06-20

    Logged In: YES
    user_id=210714

    Moving to feature requests. However I never saw a ".mysql"
    extension. Also, since we have a choice of SQL compatibility
    modes in the export dialog, there would be many more choices
    than just .sql and .mysql.

     
  • Michal Čihař

    Michal Čihař - 2006-06-21

    Logged In: YES
    user_id=192186

    I think that SQL extension is good enough and used widely
    even for MySQL data.

     
  • Michal Čihař

    Michal Čihař - 2006-06-21
    • status: open --> closed-rejected
     
  • Michal Čihař

    Michal Čihař - 2013-06-11
    • Status: closed-rejected --> invalid