This is an automated email from the ASF dual-hosted git repository.
zclll pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new cdda689c03a [Fix](p0) Remove dependency on pre-existing doris_test
database in binary digest test (#58291)
cdda689c03a is described below
commit cdda689c03ab1051474bd98a544a7fc4a2f799f6
Author: linrrarity <[email protected]>
AuthorDate: Fri Nov 28 15:50:17 2025 +0800
[Fix](p0) Remove dependency on pre-existing doris_test database in binary
digest test (#58291)
Related PR: https://github.com/apache/doris/pull/56497
Problem Summary:
The test `test_binary_for_digest` was failing when running Regression
External tests because it depended on a pre-existing `doris_test`
database in the external MySQL instance. This database is only created
during query_p0 test suite execution, which will cause error:
```text
Exception in
query_p0/sql_functions/encryption_digest/test_binary_for_digest.groovy(line 51):
connect("root", "123456",
"jdbc:mysql://${externalEnvIp}:${mysql_port}/doris_test?useSSL=false") {
try_sql """DROP TABLE IF EXISTS ${test_table}"""
sql """CREATE TABLE ${test_table} (
id int,
vb varbinary(100),
vc VARCHAR(100)
)"""
sql """INSERT INTO ${test_table} VALUES
^^^^^^^^^^^^^^^^^^^^^^^^^^ERROR LINE^^^^^^^^^^^^^^^^^^^^^^^^^^
(1, 'hello world', 'hello world'),
(2, 'test data', 'test data'),
(3, 'hash test', 'hash test'),
(4, '', ''),
(5, 'special chars: !@#%', 'special chars: !@#%')"""
}
sql """switch ${catalog_name}"""
sql """use ${ex_db_name}"""
Exception:
java.sql.SQLSyntaxErrorException: Table 'doris_test.binary_test' doesn't
exist
```
Now creates `binary_for_digest_test` database at test startup instead of
relying on `doris_test`.
---
.../encryption_digest/test_binary_for_digest.groovy | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git
a/regression-test/suites/query_p0/sql_functions/encryption_digest/test_binary_for_digest.groovy
b/regression-test/suites/query_p0/sql_functions/encryption_digest/test_binary_for_digest.groovy
index f76463ca174..24a252e895d 100644
---
a/regression-test/suites/query_p0/sql_functions/encryption_digest/test_binary_for_digest.groovy
+++
b/regression-test/suites/query_p0/sql_functions/encryption_digest/test_binary_for_digest.groovy
@@ -24,7 +24,7 @@ suite("test_binary_for_digest",
"p0,external,mysql,external_docker,external_dock
if (enabled != null && enabled.equalsIgnoreCase("true")) {
String catalog_name = "mysql_varbinary_hash_catalog";
- String ex_db_name = "doris_test";
+ String ex_db_name = "binary_for_digest_test";
String mysql_port = context.config.otherConfigs.get("mysql_57_port");
String test_table = "binary_test_digiest_function_table";
@@ -40,9 +40,11 @@ suite("test_binary_for_digest",
"p0,external,mysql,external_docker,external_dock
"enable.mapping.varbinary" = "true"
);"""
- connect("root", "123456",
"jdbc:mysql://${externalEnvIp}:${mysql_port}/doris_test?useSSL=false") {
- try_sql """DROP TABLE IF EXISTS ${test_table}"""
-
+ connect("root", "123456",
"jdbc:mysql://${externalEnvIp}:${mysql_port}?useSSL=false") {
+ try_sql """DROP DATABASE IF EXISTS ${ex_db_name}"""
+ sql """CREATE DATABASE ${ex_db_name}"""
+ sql """USE ${ex_db_name}"""
+
sql """CREATE TABLE ${test_table} (
id int,
vb varbinary(100),
@@ -138,8 +140,8 @@ suite("test_binary_for_digest",
"p0,external,mysql,external_docker,external_dock
"Variadic xxHash64 should work with mixed VarBinary and
VARCHAR arguments for row ${variadic_xxhash64_result[i][0]}")
}
- connect("root", "123456",
"jdbc:mysql://${externalEnvIp}:${mysql_port}/doris_test?useSSL=false") {
- try_sql """DROP TABLE IF EXISTS ${test_table}"""
+ connect("root", "123456",
"jdbc:mysql://${externalEnvIp}:${mysql_port}?useSSL=false") {
+ try_sql """DROP DATABASE IF EXISTS ${ex_db_name}"""
}
sql """drop catalog if exists ${catalog_name}"""
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]