Anonymous | Login | Signup for a new account | 12-17-2024 08:51 PST |
Main | My View | View Issues | Change Log | Docs |
Viewing Issue Simple Details [ Jump to Notes ] | [ View Advanced ] [ Issue History ] [ Print ] | ||||||||
ID | Category | Severity | Reproducibility | Date Submitted | Last Update | ||||
0002609 | [Quercus] | minor | always | 04-16-08 14:31 | 05-14-08 15:11 | ||||
Reporter | sgraf | View Status | public | ||||||
Assigned To | ferg | ||||||||
Priority | normal | Resolution | fixed | ||||||
Status | closed | Product Version | 3.1.5 | ||||||
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. |
||||||||
Additional Information | |||||||||
Attached Files | |||||||||
|
Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
33 total queries executed. 29 unique queries executed. |