summaryrefslogtreecommitdiffstats
path: root/mysql-test/include/weight_string_8EA1.inc
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 18:00:34 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 18:00:34 +0000
commit3f619478f796eddbba6e39502fe941b285dd97b1 (patch)
treee2c7b5777f728320e5b5542b6213fd3591ba51e2 /mysql-test/include/weight_string_8EA1.inc
parentInitial commit. (diff)
downloadmariadb-3f619478f796eddbba6e39502fe941b285dd97b1.tar.xz
mariadb-3f619478f796eddbba6e39502fe941b285dd97b1.zip
Adding upstream version 1:10.11.6.upstream/1%10.11.6upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'mysql-test/include/weight_string_8EA1.inc')
-rw-r--r--mysql-test/include/weight_string_8EA1.inc38
1 files changed, 38 insertions, 0 deletions
diff --git a/mysql-test/include/weight_string_8EA1.inc b/mysql-test/include/weight_string_8EA1.inc
new file mode 100644
index 00000000..95a50293
--- /dev/null
+++ b/mysql-test/include/weight_string_8EA1.inc
@@ -0,0 +1,38 @@
+#enable after fix MDEV-29290
+--disable_view_protocol
+select collation(cast(0xA1A1 as char));
+select hex(weight_string(cast(0x6141 as char)));
+select hex(weight_string(cast(0x8EA1 as char)));
+select hex(weight_string(cast(0x8EA1 as char) as char(1)));
+select hex(weight_string(cast(0x8EA18EA1 as char) as char(1)));
+select hex(weight_string(cast(0x8EA1 as char) as char(3)));
+select hex(weight_string(cast(0x8EA18EA1 as char) as char(3)));
+select hex(weight_string(cast(0x408EA1 as char) as char(3)));
+select hex(weight_string(cast(0x408EA18EA1 as char) as char(3)));
+select hex(weight_string(cast(0x408EA18EA18EA1 as char) as char(3)));
+select hex(weight_string(cast(0x40408EA18EA18EA1 as char) as char(3)));
+
+# Read 2 characters from the source string (the last character is not used)
+select hex(weight_string(cast(0x8EA18EA18EA1 as char), 1, 2, 0xC0));
+select hex(weight_string(cast(0x8EA18EA18EA1 as char), 2, 2, 0xC0));
+select hex(weight_string(cast(0x8EA18EA18EA1 as char), 3, 2, 0xC0));
+select hex(weight_string(cast(0x8EA18EA18EA1 as char), 4, 2, 0xC0));
+select hex(weight_string(cast(0x8EA18EA18EA1 as char), 5, 2, 0xC0));
+select hex(weight_string(cast(0x8EA18EA18EA1 as char),25, 2, 0xC0));
+
+# Read 3 characters from the source string (the entire string is used)
+select hex(weight_string(cast(0x8EA18EA18EA1 as char), 1, 3, 0xC0));
+select hex(weight_string(cast(0x8EA18EA18EA1 as char), 2, 3, 0xC0));
+select hex(weight_string(cast(0x8EA18EA18EA1 as char), 3, 3, 0xC0));
+select hex(weight_string(cast(0x8EA18EA18EA1 as char), 4, 3, 0xC0));
+select hex(weight_string(cast(0x8EA18EA18EA1 as char), 5, 3, 0xC0));
+select hex(weight_string(cast(0x8EA18EA18EA1 as char),25, 3, 0xC0));
+
+# Read 4 characters from the source string (extra space is added)
+select hex(weight_string(cast(0x8EA18EA18EA1 as char), 1, 4, 0xC0));
+select hex(weight_string(cast(0x8EA18EA18EA1 as char), 2, 4, 0xC0));
+select hex(weight_string(cast(0x8EA18EA18EA1 as char), 3, 4, 0xC0));
+select hex(weight_string(cast(0x8EA18EA18EA1 as char), 4, 4, 0xC0));
+select hex(weight_string(cast(0x8EA18EA18EA1 as char), 5, 4, 0xC0));
+select hex(weight_string(cast(0x8EA18EA18EA1 as char),25, 4, 0xC0));
+--enable_view_protocol