Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
0ac51325
Commit
0ac51325
authored
Dec 08, 2022
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-29227 deprecate explicit_defaults_for_timestamp=0
parent
760d1490
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
30 additions
and
1 deletion
+30
-1
mysql-test/main/type_timestamp.result
mysql-test/main/type_timestamp.result
+2
-0
mysql-test/suite/rpl/r/rpl_old_master_29078.result
mysql-test/suite/rpl/r/rpl_old_master_29078.result
+2
-0
mysql-test/suite/rpl/r/rpl_parallel_29322.result
mysql-test/suite/rpl/r/rpl_parallel_29322.result
+4
-0
mysql-test/suite/rpl/r/rpl_timestamp.result
mysql-test/suite/rpl/r/rpl_timestamp.result
+2
-0
mysql-test/suite/sys_vars/inc/explicit_defaults_for_timestamp.inc
...st/suite/sys_vars/inc/explicit_defaults_for_timestamp.inc
+2
-0
mysql-test/suite/sys_vars/r/explicit_defaults_for_timestamp_off.result
...ite/sys_vars/r/explicit_defaults_for_timestamp_off.result
+4
-0
mysql-test/suite/sys_vars/r/explicit_defaults_for_timestamp_on.result
...uite/sys_vars/r/explicit_defaults_for_timestamp_on.result
+2
-0
sql/sys_vars.cc
sql/sys_vars.cc
+12
-1
No files found.
mysql-test/main/type_timestamp.result
View file @
0ac51325
...
...
@@ -1326,6 +1326,8 @@ SET timestamp=DEFAULT;
# MDEV-29225 make explicit_defaults_for_timestamps SESSION variable
#
set explicit_defaults_for_timestamp=OFF;
Warnings:
Warning 1681 'explicit_defaults_for_timestamp=0' is deprecated and will be removed in a future release
create table t1 (f1 timestamp, f2 timestamp);
show create table t1;
Table Create Table
...
...
mysql-test/suite/rpl/r/rpl_old_master_29078.result
View file @
0ac51325
...
...
@@ -48,6 +48,8 @@ ROLLBACK /* added by mysqlbinlog */;
/*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=0*/;
connection slave;
set global explicit_defaults_for_timestamp=0;
Warnings:
Warning 1681 'explicit_defaults_for_timestamp=0' is deprecated and will be removed in a future release
include/reset_slave.inc
include/start_slave.inc
show create table t1;
...
...
mysql-test/suite/rpl/r/rpl_parallel_29322.result
View file @
0ac51325
...
...
@@ -10,6 +10,8 @@ set @@session.explicit_defaults_for_timestamp = 1;
connection slave;
set @sav.explicit_defaults_for_timestamp = @@global.explicit_defaults_for_timestamp;
set global explicit_defaults_for_timestamp = 0;
Warnings:
Warning 1681 'explicit_defaults_for_timestamp=0' is deprecated and will be removed in a future release
set @sav.slave_parallel_workers = @@global.slave_parallel_workers;
include/stop_slave.inc
set @@global.slave_parallel_workers = 1;
...
...
@@ -105,6 +107,8 @@ connection slave;
# B. alternate the master and slave vars' values to (0,1)
connection master;
set @@session.explicit_defaults_for_timestamp = 0;
Warnings:
Warning 1681 'explicit_defaults_for_timestamp=0' is deprecated and will be removed in a future release
connection slave;
set @@global.explicit_defaults_for_timestamp = 1;
connection slave;
...
...
mysql-test/suite/rpl/r/rpl_timestamp.result
View file @
0ac51325
...
...
@@ -2,6 +2,8 @@ include/master-slave.inc
[connection master]
set timestamp=1656940000;
set explicit_defaults_for_timestamp=!@@explicit_defaults_for_timestamp;
Warnings:
Warning 1681 'explicit_defaults_for_timestamp=0' is deprecated and will be removed in a future release
connection master;
create table t1 (f1 timestamp, f2 timestamp);
show create table t1;
...
...
mysql-test/suite/sys_vars/inc/explicit_defaults_for_timestamp.inc
View file @
0ac51325
...
...
@@ -105,7 +105,9 @@ SET timestamp=DEFAULT;
--
echo
#
--
echo
# MDEV-29075 Changing explicit_defaults_for_timestamp within stored procedure works inconsistently
--
echo
#
--
disable_warnings
set
statement
explicit_defaults_for_timestamp
=
1
-@@
explicit_defaults_for_timestamp
for
create
table
t1
(
ts
timestamp
);
--
enable_warnings
show
create
table
t1
;
drop
table
t1
;
...
...
mysql-test/suite/sys_vars/r/explicit_defaults_for_timestamp_off.result
View file @
0ac51325
set @@explicit_defaults_for_timestamp=0;
Warnings:
Warning 1681 'explicit_defaults_for_timestamp=0' is deprecated and will be removed in a future release
CREATE TABLE t1 (a TIMESTAMP);
SHOW CREATE TABLE t1;
Table Create Table
...
...
@@ -224,6 +226,8 @@ t1 CREATE TABLE `t1` (
`a` timestamp NULL DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
set explicit_defaults_for_timestamp=1-@@explicit_defaults_for_timestamp;
Warnings:
Warning 1681 'explicit_defaults_for_timestamp=0' is deprecated and will be removed in a future release
execute stmt;
show create table t1;
Table Create Table
...
...
mysql-test/suite/sys_vars/r/explicit_defaults_for_timestamp_on.result
View file @
0ac51325
...
...
@@ -233,6 +233,8 @@ t1 CREATE TABLE `t1` (
`a` timestamp NULL DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
set explicit_defaults_for_timestamp=1-@@explicit_defaults_for_timestamp;
Warnings:
Warning 1681 'explicit_defaults_for_timestamp=0' is deprecated and will be removed in a future release
execute stmt;
show create table t1;
Table Create Table
...
...
sql/sys_vars.cc
View file @
0ac51325
...
...
@@ -723,13 +723,24 @@ Sys_binlog_direct(
CMD_LINE
(
OPT_ARG
),
DEFAULT
(
FALSE
),
NO_MUTEX_GUARD
,
NOT_IN_BINLOG
,
ON_CHECK
(
binlog_direct_check
));
static
bool
deprecated_explicit_defaults_for_timestamp
(
sys_var
*
self
,
THD
*
thd
,
set_var
*
var
)
{
if
(
var
->
value
&&
var
->
save_result
.
ulonglong_value
==
0
)
push_warning_printf
(
thd
,
Sql_condition
::
WARN_LEVEL_WARN
,
ER_WARN_DEPRECATED_SYNTAX_NO_REPLACEMENT
,
ER_THD
(
thd
,
ER_WARN_DEPRECATED_SYNTAX_NO_REPLACEMENT
),
"explicit_defaults_for_timestamp=0"
);
// since 11.0.0
return
false
;
}
static
Sys_var_bit
Sys_explicit_defaults_for_timestamp
(
"explicit_defaults_for_timestamp"
,
"This option causes CREATE TABLE to create all TIMESTAMP columns "
"as NULL with DEFAULT NULL attribute, Without this option, "
"TIMESTAMP columns are NOT NULL and have implicit DEFAULT clauses."
,
SESSION_VAR
(
option_bits
),
CMD_LINE
(
OPT_ARG
),
OPTION_EXPLICIT_DEF_TIMESTAMP
,
DEFAULT
(
TRUE
),
NO_MUTEX_GUARD
,
IN_BINLOG
);
OPTION_EXPLICIT_DEF_TIMESTAMP
,
DEFAULT
(
TRUE
),
NO_MUTEX_GUARD
,
IN_BINLOG
,
ON_CHECK
(
deprecated_explicit_defaults_for_timestamp
));
static
Sys_var_ulonglong
Sys_bulk_insert_buff_size
(
"bulk_insert_buffer_size"
,
"Size of tree cache used in bulk "
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment