Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Won't Fix
-
None
-
None
-
MariaDB 10.4 running on Windows 10 using heidisql 11
Description
Sir,
Steps to reproduce the problem in Heidisql
1. Create a new table
2. Add a field say name char(50) not null
3. Add a field say timex timestamp no null. (Do not set any default value)
4. Click Save.
Now go and view the create code for the table.
It will be
CREATE TABLE `test_null` (
`name` CHAR(50) NOT NULL COLLATE 'latin1_swedish_ci',
`timex` TIMESTAMP NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
)
COLLATE='latin1_swedish_ci'
ENGINE=InnoDB
;
I can alter the table and remove the ON UPDATE value but I have been unable to remove both default and on update values
While creating table these were not added and have caused an issue. It was damn difficult locating the issue.
If default value in case of not null columns is a compulsion then how is there no default value for the char(50) field. I cannot add a row with a null value in the char() field.
I agree with this behaviour.
But adding a default value automatically is what I consider as a bug