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] The StmtPrepare response does not comply with the specifications #46386

Open
3 tasks done
XLPE opened this issue Jan 3, 2025 · 2 comments
Open
3 tasks done

[Bug] The StmtPrepare response does not comply with the specifications #46386

XLPE opened this issue Jan 3, 2025 · 2 comments

Comments

@XLPE
Copy link
Contributor

XLPE commented Jan 3, 2025

Search before asking

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

Version

2.1.6+

What's Wrong?

When using the PHP client to connect to Doris and executing the following code, the client encounters an error: "Incorrect COM_STMT_PREPARE response size; received 10."
The code snippet that leads to the PHP issue is located at this specific line in the mysqlnd_wireprotocol.c file of the PHP source code.

$mysqli = new mysqli($servername, $username, $password, $dbname, $port);
$stmt = $mysqli->prepare("SELECT id FROM test_table WHERE id = ?");
$id = 1; 
$stmt->bind_param("i", $id); 

After reviewing the Doris source code, I found that the response packet from Doris does not adhere to the standard protocol, specifically lacking a warning_count field. For SQL clients version 5.0 and above, the response packet size is expected to be greater than 12 bytes.
Regarding this related GitHub issue (#45013), it is uncertain whether it is connected to the problem I am experiencing.

What You Expected?

function sendStmtPrepareOK should contain the following elements:

  1. The protocol includes a warning_count field.
  2. The METADATA information includes columns.

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

@ixzc
Copy link
Contributor

ixzc commented Jan 5, 2025

we will look into this and fix it later

@XLPE
Copy link
Contributor Author

XLPE commented Jan 6, 2025

@ixzc
You can assign this to me, and I will fix it.

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

No branches or pull requests

2 participants