[MDEV-29075] Changing explicit_defaults_for_timestamp within stored procedure works inconsistently Created: 2022-07-09 Updated: 2022-08-02 Resolved: 2022-08-02 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Stored routines, Variables |
| Affects Version/s: | N/A |
| Fix Version/s: | 10.5.17, 10.6.9, 10.7.5, 10.8.4, 10.9.2 |
| Type: | Bug | Priority: | Critical |
| Reporter: | Elena Stepanova | Assignee: | Sergei Golubchik |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | upstream | ||
| Issue Links: |
|
||||||||||||||||
| Description |
|
So, the procedures do change the variable value, but within the procedure it doesn't work the same way as outside. If it's changed within the procedure from ON to OFF, then there seems to be no effect at all, the table is still created with TIMESTAMP NULL DEFAULT NULL. If it's changed from OFF to ON, there is a partial effect, the column is created as NOT NULL, but without default/on update. MySQL 8.0 behaves in a similar way, only it adds default zero date in the second case, which isn't what one would expect either. |
| Comments |
| Comment by Sergei Golubchik [ 2022-07-23 ] |
|
bar, please, take a look at commits https://github.com/MariaDB/server/commit/5a362d486b30 and https://github.com/MariaDB/server/commit/7b8304045272 |
| Comment by Alexander Barkov [ 2022-07-29 ] |
|
replied by email |