#201 (in 2.6.0) Proper handling of comments in SQL file upload

closed-accepted
Parsing (8)
1
2004-09-27
2004-06-02
Anonymous
No

From the MySQL documentation, it is possible to follow
the '--' comment mark with any control character (not
just space). This is not currently handled properly by
the SQL parser.
Also empty comment lines extend to the next line...
This patch fixes these problems (for version 2.5.5)

Discussion

  • Marc Delisle

    Marc Delisle - 2004-06-03

    Logged In: YES
    user_id=210714

    2.5.5 is not the current version. Please produce a patch
    based on the latest snapshot for 2.6.0, at
    http://www.phpmyadmin.net/cvs

     
  • Marc Delisle

    Marc Delisle - 2004-06-03
    • priority: 5 --> 1
    • assigned_to: nobody --> lem9
    • status: open --> open-out-of-date
     
  • Michal Čihař

    Michal Čihař - 2004-06-03

    Logged In: YES
    user_id=192186

    Correct check for "control character" according to mysq
    sources is:

    (char & 32) != 0

     
  • Michal Čihař

    Michal Čihař - 2004-06-03
    • assigned_to: lem9 --> nobody
    • priority: 1 --> 5
    • status: open-out-of-date --> open
     
  • Michal Čihař

    Michal Čihař - 2004-06-03

    Logged In: YES
    user_id=192186

    Sorry, I was wrong ... its just value of char flag.

     
  • Michal Čihař

    Michal Čihař - 2004-06-03
    • assigned_to: nobody --> nijel
     
  • Michal Čihař

    Michal Čihař - 2004-06-03

    Logged In: YES
    user_id=192186

    So <= ' ' seems to be correct.

     
  • Michal Čihař

    Michal Čihař - 2004-06-03
    • assigned_to: nijel --> lem9
    • priority: 5 --> 1
    • status: open --> open-out-of-date
     
  • Michal Čihař

    Michal Čihař - 2004-06-03

    Logged In: YES
    user_id=192186

    Marc, sorry for deleting your changes, tracker didn't catch
    conflict :-(

     
  • Marc Delisle

    Marc Delisle - 2004-06-03

    Logged In: YES
    user_id=210714

    No problem Michal. Does the patch have any value for 2.6.0?

     
  • Michal Čihař

    Michal Čihař - 2004-06-03

    Logged In: YES
    user_id=192186

    Yes, we do not handle such situation.

    Our current code does not parse:

    select 1 --1

    I guess that this change should help this and we can then
    remove my hack for treating two -- not followed by space as
    problematic.

     
  • Michal Čihař

    Michal Čihař - 2004-06-03

    Logged In: YES
    user_id=192186

    I can update the patch ... however why do we remove comments
    in read_dump.lib.php?

     
  • Michal Čihař

    Michal Čihař - 2004-06-03

    Logged In: YES
    user_id=192186

    Here is patch against current cvs, can you please review it?
    It removes comment dropping from read_dump.lib.php and
    improves comment handling in parser.

     
  • Michal Čihař

    Michal Čihař - 2004-06-04
    • milestone: 284146 -->
    • assigned_to: lem9 --> nijel
    • summary: Proper handling of comments in SQL file upload --> (in 2.6.0) Proper handling of comments in SQL file upload
    • status: open-out-of-date --> open-accepted
     
  • Michal Čihař

    Michal Čihař - 2004-06-04

    Logged In: YES
    user_id=192186

    After some tests, commiting to cvs.

     
  • Alexander M. Turek

    • status: open-accepted --> closed-accepted
     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks