Results 56 comments of SSebo

@MichaelScofield I found `prepare` statement is not work for `msql-srv` crate. `fn on_prepare(&mut self, _query: &str, info: StatementMetaWriter) -> io::Result` is not called back when execute `PREPARE stmt1 FROM 'SELECT...

@MichaelScofield Thanks a lot! I use `sqlx` to successfully trigger `on_prepare` callback . It looks like `mysql-client` will always treat it as `COM_QUERY` even if it is prepare statement, and...

> @SSebo prepare stmt in mysql could be executed in mysql-cli like [this](https://dev.mysql.com/doc/refman/8.0/en/sql-prepared-statements.html) the prepare statement `PREPARE stmt1 FROM 'SELECT SQRT(POW(?,2) + POW(?,2)) AS hypotenuse';` I used to execute is...

> ping @SSebo , any updates? @MichaelScofield Sorry for delay, I'll pick it up this week.

@sunng87 Got it. I'll do the MySQL binary protocol [prepared statements](https://dev.mysql.com/doc/dev/mysql-server/latest/page_protocol_command_phase_ps.html) - [x] [COM_STMT_PREPARE](https://dev.mysql.com/doc/dev/mysql-server/latest/page_protocol_com_stmt_prepare.html) MysqlShim::on_prepare - [x] [COM_STMT_EXECUTE](https://dev.mysql.com/doc/dev/mysql-server/latest/page_protocol_com_stmt_execute.html) MysqlShim::on_execute - [x] [COM_STMT_CLOSE](https://dev.mysql.com/doc/dev/mysql-server/latest/page_protocol_com_stmt_close.html) MysqlShim::on_close

It takes me lots of times to figure out how to infer the placeholder types in prepared sql which used in ' COM_STMT_PREPARE_OK'. Infer prepared statement parameter types supported by...

@sunng87 @MichaelScofield I'm working on the type infer version of prepare. Should statement be saved or plain query string? Since `do_statement_query` is removed. there is no way to execute statement....

@sunng87 https://docs.pingcap.com/tidb/v5.4/sql-prepared-plan-cache this feature is very similar to your idea.

@sunng87 Should TLS acceptor be added in following location? https://github.com/GreptimeTeam/greptimedb/blob/e823cde6ff7b1cbed33093306204e894c0523d01/src/servers/src/mysql/server.rs#L89 https://github.com/GreptimeTeam/greptimedb/blob/e823cde6ff7b1cbed33093306204e894c0523d01/src/servers/src/postgres/server.rs#L91

For MySQL, looks like there is one [issue](https://github.com/datafuselabs/opensrv/issues/6 ) about this. I will try to port https://github.com/jonhoo/msql-srv/issues/23 implementation to opensrv-mysql.