<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div><br class=""><blockquote type="cite" class=""><div class=""><blockquote type="cite" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><blockquote type="cite" class="">+<br class="">+-- Collation is set in space format and also in position() -<br class="">+-- for both arguments. Arguments have different explicit<br class="">+-- collations thus an error is expected.<br class="">+<br class="">+test:do_catchsql_test(<br class="">+    "position-1.75",<br class="">+    [[<br class="">+        CREATE TABLE test1 (s1 VARCHAR(5) PRIMARY KEY COLLATE "unicode_ci");<br class="">+        INSERT INTO test1 VALUES('à');<br class="">+        SELECT POSITION('a' COLLATE "unicode_ci", s1 COLLATE "unicode") FROM test1;<br class="">+    ]], {<br class="">+        1, "Illegal mix of collations"<br class="">+    }<br class="">+)<br class="">+<br class="">+test:do_catchsql_test(<br class="">+    "position-1.76",<br class="">+    [[<br class="">+        DROP TABLE test1;<br class="">+        CREATE TABLE test1 (s1 VARCHAR(5) PRIMARY KEY COLLATE "unicode_ci");<br class="">+        INSERT INTO test1 VALUES('qwèrty');<br class="">+        SELECT POSITION('er' COLLATE "unicode_ci", s1 COLLATE "unicode") FROM test1;<br class="">+        DROP TABLE test1;<br class="">+    ]], {<br class="">+        1, "Illegal mix of collations"<br class="">+    }<br class="">+)<br class="">+<br class="">+test:do_catchsql_test(<br class="">+    "position-1.77",<br class="">+    [[<br class="">+        DROP TABLE test1;<br class="">+        CREATE TABLE test1 (s1 VARCHAR(5) PRIMARY KEY COLLATE "unicode_ci");<br class="">+        INSERT INTO test1 VALUES('qwèrtÿ');<br class="">+        SELECT POSITION('Y' COLLATE "unicode_ci", s1 COLLATE "unicode") FROM test1;<br class="">+    ]], {<br class="">+        1, "Illegal mix of collations"<br class="">+    }<br class="">+)<br class=""></blockquote><br class="">Add test cases on: explicitly set incompatible collations,<br class="">explicitly set compatible collations.<br class=""><br class=""><br class=""></blockquote><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">Don’t we already have such tests? From the end of position.test.lua:</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">-- Collation is set in space format and also in position() -</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">-- for both arguments. Arguments have the same collations.</span><br class=""></div></blockquote><br class=""></div><div>Oh, I meant ‘implicitly set’. Still can’t find such tests.</div><br class=""></body></html>