Menu

#1349 (ok 3.5) Null checkbox behavior

fixed
1
2014-08-21
2012-02-04
No

When you already have a not null column in a table click edit and uncheck the null checkbox.
You will get this error:
#1067 - Invalid default value for 'user'
The sql syntax that PHPMyAdmin is trying to use is:
ALTER TABLE `email` CHANGE `user` `user` VARCHAR( 255 ) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT NULL

It should be:
ALTER TABLE `email` CHANGE `user` `user` VARCHAR( 255 ) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL

It doesn't matter what kind of column it is. All the values are filled in. the problem is that it is using DEFAULT NULL at the end when you are removing NULL using the phpmyadmin interface.

Discussion

  • Marc Delisle

    Marc Delisle - 2012-02-12
    • assigned_to: nobody --> lem9
     
  • Marc Delisle

    Marc Delisle - 2012-02-12
    • milestone: 2260955 -->
    • labels: 509096 --> Data insertion/extraction/manipulation
     
  • Marc Delisle

    Marc Delisle - 2012-02-12

    The bug description is misleading, it should be "When you already have a null column...".

    The "Default NULL" clause was generated because you did not change the default value after unchecking the null checkbox.

    Moving to feature requests, to automate this change.

     
  • michael stokes

    michael stokes - 2012-02-12
    • summary: #1067 - Invalid default value for 'column' when altering tb --> When you already have a null column you can get this error
     
  • Marc Delisle

    Marc Delisle - 2012-02-12
    • assigned_to: lem9 --> nobody
     
  • Marc Delisle

    Marc Delisle - 2012-03-04
    • summary: When you already have a null column you can get this error --> Null checkbox behavior
     
  • Marc Delisle

    Marc Delisle - 2012-03-05
    • assigned_to: nobody --> lem9
     
  • Marc Delisle

    Marc Delisle - 2012-03-05
    • summary: Null checkbox behavior --> (ok 3.5) Null checkbox behavior
    • priority: 5 --> 1
    • status: open --> open-accepted
     
  • Marc Delisle

    Marc Delisle - 2012-03-05

    This requested feature was implemented in the repository and will be part of a future release; thanks for suggesting.

     
  • Marc Delisle

    Marc Delisle - 2012-04-07
    • status: open-accepted --> closed-accepted
     
  • Michal Čihař

    Michal Čihař - 2013-06-11
    • Status: closed-accepted --> fixed
     
MongoDB Logo MongoDB