mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
Ensure that fields declared with NOT NULL doesn't have DEFAULT values if not specified and if not timestamp or auto_increment
In original code, sometimes one got an automatic DEFAULT value in some cases, in other cases not. For example: create table t1 (a int primary key) - No default create table t2 (a int, primary key(a)) - DEFAULT 0 create table t1 SELECT .... - Default for all fields, even if they where defined as NOT NULL ALTER TABLE ... MODIFY could sometimes add an unexpected DEFAULT value. The patch is quite big because we had some many test cases that used CREATE ... SELECT or CREATE ... (...PRIMARY KEY(xxx)) which doesn't have an automatic DEFAULT anymore. Other things: - Removed warnings from InnoDB when waiting from semaphore (got this when testing things with --big)
This commit is contained in:
@@ -22,14 +22,14 @@ master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Query # # COMMIT
|
||||
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||
master-bin.000001 # Query # # use `test`; CREATE TABLE `t1` (
|
||||
`f1` int(1) NOT NULL DEFAULT '0'
|
||||
`f1` int(1) NOT NULL
|
||||
)
|
||||
master-bin.000001 # Table_map # # table_id: # (test.t1)
|
||||
master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Query # # COMMIT
|
||||
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||
master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE `t1` (
|
||||
`f1` int(1) NOT NULL DEFAULT '0'
|
||||
`f1` int(1) NOT NULL
|
||||
)
|
||||
master-bin.000001 # Table_map # # table_id: # (test.t1)
|
||||
master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
|
||||
@@ -55,14 +55,14 @@ slave-bin.000001 # Gtid # # GTID #-#-#
|
||||
slave-bin.000001 # Query # # use `test`; create table t1 (to_be_deleted int)
|
||||
slave-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||
slave-bin.000001 # Query # # use `test`; CREATE TABLE `t1` (
|
||||
`f1` int(1) NOT NULL DEFAULT '0'
|
||||
`f1` int(1) NOT NULL
|
||||
)
|
||||
slave-bin.000001 # Table_map # # table_id: # (test.t1)
|
||||
slave-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
|
||||
slave-bin.000001 # Query # # COMMIT
|
||||
slave-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||
slave-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE `t1` (
|
||||
`f1` int(1) NOT NULL DEFAULT '0'
|
||||
`f1` int(1) NOT NULL
|
||||
)
|
||||
slave-bin.000001 # Table_map # # table_id: # (test.t1)
|
||||
slave-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
|
||||
|
Reference in New Issue
Block a user