Skip to content

Conversation

@linrrzqqq
Copy link
Contributor

@linrrzqqq linrrzqqq commented Nov 24, 2025

What problem does this PR solve?

Issue Number: close #xxx

Related PR: #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:

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.

Release note

None

Check List (For Author)

  • Test

    • Regression test
    • Unit Test
    • Manual test (add detailed scripts or steps below)
    • No need to test or manual test. Explain why:
      • This is a refactor/code format and no logic has been changed.
      • Previous test can cover this change.
      • No code files have been changed.
      • Other reason
  • Behavior changed:

    • No.
    • Yes.
  • Does this need documentation?

    • No.
    • Yes.

Check List (For Reviewer who merge this PR)

  • Confirm the release note
  • Confirm test cases
  • Confirm document
  • Add branch pick label

@Thearas
Copy link
Contributor

Thearas commented Nov 24, 2025

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR.

Please clearly describe your PR:

  1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
  2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
  3. What features were added. Why was this function added?
  4. Which code was refactored and why was this part of the code refactored?
  5. Which functions were optimized and what is the difference before and after the optimization?

@linrrzqqq
Copy link
Contributor Author

run buildall

@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label Nov 25, 2025
@github-actions
Copy link
Contributor

PR approved by at least one committer and no changes requested.

@github-actions
Copy link
Contributor

PR approved by anyone and no changes requested.

Copy link
Contributor

@morningman morningman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@zclllyybb zclllyybb merged commit cdda689 into apache:master Nov 28, 2025
31 checks passed
github-actions bot pushed a commit that referenced this pull request Nov 28, 2025
…nary digest test (#58291)

Related PR: #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`.
@linrrzqqq linrrzqqq deleted the binary-p0-fix branch November 28, 2025 08:02
yiguolei pushed a commit that referenced this pull request Nov 28, 2025
…tabase in binary digest test #58291 (#58503)

Cherry-picked from #58291

Co-authored-by: linrrarity <linzhenqi@selectdb.com>
nagisa-kunhah pushed a commit to nagisa-kunhah/doris that referenced this pull request Dec 14, 2025
…nary digest test (apache#58291)

Related PR: apache#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`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by one committer. dev/4.0.2-merged reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants