summaryrefslogtreecommitdiff
path: root/plugin/type_inet/mysql-test/type_inet/type_inet4_mix_datetime.test
blob: 06495e70fef9d8998a47bd0ee26e7fff4ea3c7a9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
--echo #
--echo # Start of 10.10 tests
--echo #

--echo #
--echo # MDEV-23287 The INET4 data type
--echo #

#
# The DATETIME data type has loose control on the incoming data,
# so values like '0.0.0.0' do not fail when get inserted to a DATETIME field.
# Using '99.99.99.99' to make sure the month part is out of the range
# to guarantee the failure.

CREATE TABLE t1 (target INET4 DEFAULT '99.99.99.99', source DATETIME DEFAULT '2001-01-01 10:20:30');
--source include/type_mix_incompatible.inc
DROP TABLE t1;

CREATE TABLE t1 (target DATETIME DEFAULT '2001-01-01 10:20:30', source INET4 DEFAULT '99.99.99.99');
--source include/type_mix_incompatible.inc
DROP TABLE t1;

--echo #
--echo # End of 10.10 tests
--echo #