Menu

#4933 INSERT validation issues with MySQL functions

Latest_Git
fixed
None
Normal
2015-06-14
2015-05-29
No

Sometimes a MySQL function can take in data that isn't of the type the column is, for instance with INET_ATON(127.0.0.1). This function is designed to insert to an unsigned INT column, but the validation feature sees "127.0.0.1" and feels it's not valid to insert and gives me the "Please enter a valid number" error message.

Discussion

  • Madhura Jayaratne

    I think we should remove the validation in the presence of a function.

     
    • Madhura Jayaratne

      The same thing is done for input transformations.

       
  • Madhura Jayaratne

    • assigned_to: Madhura Jayaratne
     
  • Madhura Jayaratne

    • assigned_to: Madhura Jayaratne --> nobody
     
  • Marc Delisle

    Marc Delisle - 2015-06-07

    I agree with Madhura's suggestion.

     
  • Marc Delisle

    Marc Delisle - 2015-06-09

    Isaac,
    in the case you describe, I don't see "Please enter a valid number" but I do see the input field becoming red. Please confirm.

     
    • Isaac Bennetch

      Isaac Bennetch - 2015-06-10

      I'll attach a screen shot to make sure we're talking about the same thing.

       
  • Marc Delisle

    Marc Delisle - 2015-06-09
    • assigned_to: Marc Delisle
     
  • Marc Delisle

    Marc Delisle - 2015-06-10

    We are talking about the same thing. Is this generated by phpMyAdmin or by your browser? The only place I see this generated by phpMyAdmin is in checkFormElementInRange() from js/functions.js, but this should not be called when inserting data.

     
    • Isaac Bennetch

      Isaac Bennetch - 2015-06-13

      I've tried two different browsers and done some quick debugging and I'm pretty confident the message is generated by phpMyAdmin js/messages.php line 764, PMA_printJsValueForFormValidation('number', __('Please enter a valid number')); Of course there's more to the mystery than that, but that's as far as I got at the moment.

      I also do not believe checkFormElementInRange() is involved, but I'm not 100% positive of this.

       

      Last edit: Isaac Bennetch 2015-06-13
      • Marc Delisle

        Marc Delisle - 2015-06-13

        Ok, I was testing the 4.4.8 milestone.

         
        • Isaac Bennetch

          Isaac Bennetch - 2015-06-13

          Ah, quite right, my mistake for missing that.

           
  • Marc Delisle

    Marc Delisle - 2015-06-13
    • Group: 4.4.8 --> Latest_Git
     
  • Marc Delisle

    Marc Delisle - 2015-06-14
    • status: open --> fixed