Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/phpmyadmin/phpmyadmin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Desportes <williamdes@wdes.fr>2021-04-19 20:06:29 +0300
committerWilliam Desportes <williamdes@wdes.fr>2021-04-19 20:06:36 +0300
commit6eac1dd56a82c0898e728bf54209083689bae07c (patch)
tree7b7b367a1aea89d66f5506d499d42afd466a17bb /test/classes
parent42f4464c07146901c5e3d4a63b82592144101fdd (diff)
parent94add64100bd923e2fc20b0a9e10fe94e98e39af (diff)
Merge #16824 - Fix #16777 - Non-UTF8 Primary Key fix
Signed-off-by: William Desportes <williamdes@wdes.fr>
Diffstat (limited to 'test/classes')
-rw-r--r--test/classes/UtilTest.php60
1 files changed, 60 insertions, 0 deletions
diff --git a/test/classes/UtilTest.php b/test/classes/UtilTest.php
index 949f3fa495..2e579b7017 100644
--- a/test/classes/UtilTest.php
+++ b/test/classes/UtilTest.php
@@ -208,6 +208,66 @@ class UtilTest extends AbstractTestCase
)
);
$this->assertSame(
+ ['= \'value\'', ''],
+ $this->callFunction(
+ null,
+ Util::class,
+ 'getConditionValue',
+ [
+ 'value',// row
+ ((object) [
+ 'numeric' => false,
+ 'type' => 'blob',
+ 'charsetnr' => 32,// armscii8_general_ci
+ ]),// field meta
+ '',// field flags
+ 0,// fields count
+ '',// condition key
+ '',// condition
+ ]
+ )
+ );
+ $this->assertSame(
+ ['= \'value\'', ''],
+ $this->callFunction(
+ null,
+ Util::class,
+ 'getConditionValue',
+ [
+ 'value',// row
+ ((object) [
+ 'numeric' => false,
+ 'type' => 'blob',
+ 'charsetnr' => 48,// latin1_general_ci
+ ]),// field meta
+ '',// field flags
+ 0,// fields count
+ '',// condition key
+ '',// condition
+ ]
+ )
+ );
+ $this->assertSame(
+ ['= CAST(0x76616c7565 AS BINARY)', ''],
+ $this->callFunction(
+ null,
+ Util::class,
+ 'getConditionValue',
+ [
+ 'value',// row
+ ((object) [
+ 'numeric' => false,
+ 'type' => 'blob',
+ 'charsetnr' => 63,// binary
+ ]),// field meta
+ '',// field flags
+ 0,// fields count
+ '',// condition key
+ '',// condition
+ ]
+ )
+ );
+ $this->assertSame(
['= CAST(0x76616c7565 AS BINARY)', ''],
$this->callFunction(
null,