summaryrefslogtreecommitdiff
path: root/plugin/type_inet/mysql-test/type_inet/type_inet4_partition.test
diff options
context:
space:
mode:
Diffstat (limited to 'plugin/type_inet/mysql-test/type_inet/type_inet4_partition.test')
-rw-r--r--plugin/type_inet/mysql-test/type_inet/type_inet4_partition.test41
1 files changed, 41 insertions, 0 deletions
diff --git a/plugin/type_inet/mysql-test/type_inet/type_inet4_partition.test b/plugin/type_inet/mysql-test/type_inet/type_inet4_partition.test
new file mode 100644
index 00000000000..6ca97c4740f
--- /dev/null
+++ b/plugin/type_inet/mysql-test/type_inet/type_inet4_partition.test
@@ -0,0 +1,41 @@
+--source include/have_partition.inc
+
+--echo #
+--echo # Start of 10.10 tests
+--echo #
+
+--echo #
+--echo # MDEV-23287 The INET4 data type
+--echo # MDEV-20831 Table partitioned by LIST/RANGE COLUMNS(inet6) can be created, but not inserted into
+--echo #
+
+SET NAMES utf8;
+
+--error ER_WRONG_TYPE_COLUMN_VALUE_ERROR
+CREATE TABLE t1 (a INET4)
+ PARTITION BY LIST COLUMNS(a)
+ (PARTITION p00 VALUES IN (10));
+
+--error ER_WRONG_TYPE_COLUMN_VALUE_ERROR
+CREATE TABLE t1 (a INET4)
+ PARTITION BY LIST COLUMNS(a)
+ (PARTITION p00 VALUES IN (TIME'10:20:30'));
+
+--error ER_TRUNCATED_WRONG_VALUE
+CREATE TABLE t1 (a INET4)
+ PARTITION BY LIST COLUMNS(a)
+ (PARTITION p00 VALUES IN ('€'));
+
+CREATE TABLE t1 (a INET4)
+ PARTITION BY LIST COLUMNS(a)
+ (PARTITION p00 VALUES IN ('0.0.0.0'),
+ PARTITION pFF VALUES IN (0xFFFFFFFF));
+INSERT INTO t1 VALUES ('0.0.0.0');
+INSERT INTO t1 VALUES ('255.255.255.255');
+SELECT * FROM t1 PARTITION (p00);
+SELECT * FROM t1 PARTITION (pFF);
+DROP TABLE t1;
+
+--echo #
+--echo # End of 10.10 tests
+--echo #