summaryrefslogtreecommitdiffstats
path: root/mysql-test/include/weight_string_euro.inc
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 18:07:14 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 18:07:14 +0000
commita175314c3e5827eb193872241446f2f8f5c9d33c (patch)
treecd3d60ca99ae00829c52a6ca79150a5b6e62528b /mysql-test/include/weight_string_euro.inc
parentInitial commit. (diff)
downloadmariadb-10.5-a175314c3e5827eb193872241446f2f8f5c9d33c.tar.xz
mariadb-10.5-a175314c3e5827eb193872241446f2f8f5c9d33c.zip
Adding upstream version 1:10.5.12.upstream/1%10.5.12upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'mysql-test/include/weight_string_euro.inc')
-rw-r--r--mysql-test/include/weight_string_euro.inc30
1 files changed, 30 insertions, 0 deletions
diff --git a/mysql-test/include/weight_string_euro.inc b/mysql-test/include/weight_string_euro.inc
new file mode 100644
index 00000000..e888bdc3
--- /dev/null
+++ b/mysql-test/include/weight_string_euro.inc
@@ -0,0 +1,30 @@
+select @@collation_connection;
+select hex(weight_string(cast(_latin1 0x80 as char)));
+select hex(weight_string(cast(_latin1 0x808080 as char)));
+select hex(weight_string(cast(_latin1 0x808080 as char) as char(2)));
+select hex(weight_string(cast(_latin1 0x808080 as char) as char(3)));
+select hex(weight_string(cast(_latin1 0x808080 as char) as char(5)));
+
+# Read 2 characters from the source string (the last character is not used).
+select hex(weight_string(cast(_latin1 0x808080 as char), 1, 2, 0xC0));
+select hex(weight_string(cast(_latin1 0x808080 as char), 2, 2, 0xC0));
+select hex(weight_string(cast(_latin1 0x808080 as char), 3, 2, 0xC0));
+select hex(weight_string(cast(_latin1 0x808080 as char), 4, 2, 0xC0));
+select hex(weight_string(cast(_latin1 0x808080 as char), 5, 2, 0xC0));
+select hex(weight_string(cast(_latin1 0x808080 as char),25, 2, 0xC0));
+
+# Read 3 characters from the source string (the entire string is used).
+select hex(weight_string(cast(_latin1 0x808080 as char), 1, 3, 0xC0));
+select hex(weight_string(cast(_latin1 0x808080 as char), 2, 3, 0xC0));
+select hex(weight_string(cast(_latin1 0x808080 as char), 3, 3, 0xC0));
+select hex(weight_string(cast(_latin1 0x808080 as char), 4, 3, 0xC0));
+select hex(weight_string(cast(_latin1 0x808080 as char), 5, 3, 0xC0));
+select hex(weight_string(cast(_latin1 0x808080 as char),25, 3, 0xC0));
+
+# Read 4 characters from the source string (extra space is added)
+select hex(weight_string(cast(_latin1 0x808080 as char), 1, 4, 0xC0));
+select hex(weight_string(cast(_latin1 0x808080 as char), 2, 4, 0xC0));
+select hex(weight_string(cast(_latin1 0x808080 as char), 3, 4, 0xC0));
+select hex(weight_string(cast(_latin1 0x808080 as char), 4, 4, 0xC0));
+select hex(weight_string(cast(_latin1 0x808080 as char), 5, 4, 0xC0));
+select hex(weight_string(cast(_latin1 0x808080 as char),25, 4, 0xC0));