Menu

#1578 (ok 4.4) Warn about reserved word only when a column is created

Next_release
fixed
None
Low
2015-04-20
2014-12-12
No

Does one really need to be reminded of this every time one views the structure page?

Discussion

  • Olaf van der Spek

    IMO it still doesn't make sense to warn every time the table is viewed. A warning might make sense when the field is created.

     
  • Marc Delisle

    Marc Delisle - 2014-12-14
    • summary: The column name 'left' is a MySQL reserved keyword. --> Warn about reserved word only when a column is created
    • status: wont-fix --> open
     
  • Smita Kumari

    Smita Kumari - 2015-01-04
    • assigned_to: Smita Kumari
     
  • Smita Kumari

    Smita Kumari - 2015-01-06

    Hi

    Just want to have some suggestions on the way we can show the warning messages:

    following are the ways in which a column is created withig PMA

    1. on table structure page add a new column : in this case we can show the notice message on table structure page after columns are added. Or before submitting th form we show a confirm dialog.

    2. on table structure page, change existing column : again show the notice on table structure page after column is chnaged (if changes column is reserved word)

    3. During create a table : It returns to db structure page. so on db structure page, is it fine to show a notice message about a column in last created table ? wont it look out of context ?
      what about before submiting create table form (on click of Save) we can pop a confirm message (if it has any reserved word column).

    4. On sql tab (sql query box) using various sql commands: In this case, we stay on same page if in case of create, alter queries. question is do we need to show the warning in this case also? we can have the warning above the sql query box or may be as popup warning message.

     
    • Marc Delisle

      Marc Delisle - 2015-01-06

      Smita,
      here are my views. For 1, 2 and 3, if you have an easy way to call the reserved word logic and show a confirm dialog when submitting the form, go for it.

      For 4, it would be more complex IMO to do, as you would have to use our parser. phpMyAdmin is a web interface and we hope that users prefer the UI way of changing the table structure. So I would skip the warning in this case.

       
  • Madhura Jayaratne

    For all 1, 2 and 3, the same interface is used for entering/modifying the column name. So showing a notice/popup (I prefer the former) should cover all the 3 cases.
    I agree with Marc that 4 is not worth the effort and the complexity it brings to the code.

     
    • Marc Delisle

      Marc Delisle - 2015-01-07

      Smita has implemented a confirm dialog and I prefer a dialog over a notice, because the user has a chance to change her mind before saving.

       
  • Smita Kumari

    Smita Kumari - 2015-01-07

    Hi Marc and Madhura,

    Thanks. yeah, I have shown confirm dialog for 1,2,3 if a column name is reserved keyword. skipping 4.

    Now the question is, so do we remove the configuration option cfg_ReservedWordDisableWarning or make this default to be true so that if anyone wants to see the warning later can set it to false ?

     

    Last edit: Smita Kumari 2015-01-07
    • Marc Delisle

      Marc Delisle - 2015-01-07

      Smita,
      the directive is used to disable the reserved words warnings, so the current value of false does not disable the warnings. I think it should stay like this.

       
      • Smita Kumari

        Smita Kumari - 2015-01-07

        Thanks marc. Here is the PR: https://github.com/phpmyadmin/phpmyadmin/pull/1453
        Please have a look if it'll work.

         

        Last edit: Smita Kumari 2015-01-07
        • Marc Delisle

          Marc Delisle - 2015-01-08

          Pull request accepted; implemented for 4.4.

           
  • Marc Delisle

    Marc Delisle - 2015-01-08
    • summary: Warn about reserved word only when a column is created --> (ok 4.4) Warn about reserved word only when a column is created
    • status: open --> resolved
    • Group: Needs_decision --> Next_release
    • Priority: 5 --> 1
     
  • Marc Delisle

    Marc Delisle - 2015-02-15
    • Priority: 1 --> Normal
     
  • Marc Delisle

    Marc Delisle - 2015-02-15
    • Priority: Normal --> Low
     
  • Marc Delisle

    Marc Delisle - 2015-04-20
    • Status: resolved --> fixed
     
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.