Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] MySQL protocol cannot obtain decimal precision when SSL is enabled #38065

Closed
2 of 3 tasks
cjj2010 opened this issue Jul 18, 2024 · 1 comment · Fixed by #38086
Closed
2 of 3 tasks

[Bug] MySQL protocol cannot obtain decimal precision when SSL is enabled #38065

cjj2010 opened this issue Jul 18, 2024 · 1 comment · Fixed by #38086

Comments

@cjj2010
Copy link
Contributor

cjj2010 commented Jul 18, 2024

Search before asking

  • I had searched in the issues and found no similar issues.

Version

2.1.0-2.1.4、master

What's Wrong?

MySQL protocol cannot obtain decimal precision when SSL is enabled
Steps to enable SSL,https://doris.apache.org/zh-CN/docs/admin-manual/auth/certificate
Using JDBC to query data of type decimalv3 (38, 10)
e.g

	   String url = "jdbc:mysql://192.168.83.177:33/demo?"
					+ "useSSL=true"
					+ "&requireSSL=true";

            String user = "root";
            String password = "123456";
            System.out.println("连接数据库");
            Connection conn = DriverManager.getConnection(url, user, password);
            System.out.println("连接正常!");
            PreparedStatement preparedStatement = conn.prepareStatement("select 603B91D1989D_06a2 from dwd_1813421496594669569 where 1 = 1");
            ResultSet rs= preparedStatement.executeQuery();
            ResultSetMetaData metaData =rs.getMetaData();
            int scale = metaData.getScale(1);
            System.out.println(scale);

Scale will return 0

What You Expected?

Return to normal accuracy

How to Reproduce?

No response

Anything Else?

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

@zy-kkk
Copy link
Member

zy-kkk commented Jul 18, 2024

Let me look at this question

@zy-kkk zy-kkk closed this as completed in 97ffcad Jul 19, 2024
zy-kkk added a commit to zy-kkk/doris that referenced this issue Jul 19, 2024
…shake (apache#38086)

Issue Number: close apache#38065

This PR introduces a fix to the SSL and CLIENT_LONG_FLAG handling in the
MySQL handshake process. It ensures that the flags are correctly set
according to the protocol requirements and resolves the issues related
to decimal data fetching when SSL is enabled.
yiguolei pushed a commit that referenced this issue Jul 19, 2024
…n MySQL Handshake (#38140)

pick(#38086)
Issue Number: close #38065

This PR introduces a fix to the SSL and CLIENT_LONG_FLAG handling in the
MySQL handshake process. It ensures that the flags are correctly set
according to the protocol requirements and resolves the issues related
to decimal data fetching when SSL is enabled.
dataroaring pushed a commit that referenced this issue Jul 22, 2024
…shake (#38086)

Issue Number: close #38065

This PR introduces a fix to the SSL and CLIENT_LONG_FLAG handling in the
MySQL handshake process. It ensures that the flags are correctly set
according to the protocol requirements and resolves the issues related
to decimal data fetching when SSL is enabled.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants