|
Mantis - Quercus
|
|||||
| Viewing Issue Advanced Details | |||||
|
|
|||||
| ID: | Category: | Severity: | Reproducibility: | Date Submitted: | Last Update: |
| 2609 | minor | always | 04-16-08 14:31 | 05-14-08 15:11 | |
|
|
|||||
| Reporter: | sgraf | Platform: | |||
| Assigned To: | ferg | OS: | |||
| Priority: | normal | OS Version: | |||
| Status: | closed | Product Version: | 3.1.5 | ||
| Product Build: | Resolution: | fixed | |||
| Projection: | none | ||||
| ETA: | none | Fixed in Version: | 3.2.0 | ||
|
|
|||||
| Summary: | 0002609: [MySQL] assigning empty value to datetime column silently fails | ||||
| Description: |
Assigning a empty value '' to a datetime colum will silently ignore the query. To reproduce: mysqli_query($db_link, "CREATE TABLE a (id int(10), dt datetime default NULL)"); mysqli_query($db_link, "INSERT INTO a VALUES(1, now()),(2, now()), (3, now())"); mysqli_query($db_link, "UPDATE a SET dt = '' WHERE id = 1"); // Query will be ignored, dt will remain at its original value. mysqli_query($db_link, "UPDATE a SET dt = NULL WHERE id = 2"); // This works as expected mysqli_query($db_link, "UPDATE a SET dt = '0000-00-00 00:00:00' WHERE id = 3"); // This works as excpected Expected result for the query "UPDATE a SET dt = ''" Updating with an empty value should set the datetime column to 0000-00-00 00:00:00. |
||||
| Steps To Reproduce: | |||||
| Additional Information: | |||||
| Relationships | |||||
| Attached Files: | |||||
| Notes | |||||
|
|
|||||
|
|
||||
|
|
|||||
|
|
||||