Hi, Oleksandr!
On Apr 20, Oleksandr Byelkin wrote:
Am 19.04.2018 um 11:31 schrieb Sergei Golubchik:
+# cat MYSQL_TMP_DIR/test_explain_meta.out.log
+# ------------------------------------
okay, altought I'd rather add prepare metadata output to mysqltest.
Like, either print prepare metadata on --enable_metadata or introduce a new
command --enable_prepare_metadata
This two functionality are independent. We have speciall "IFs" in the
code to return SQL level prepare in some other place and actually nobody
really care what SQL level prepare return (of course I can fix it also,
but main request came from JDBC).
No-no. I don't mean sql prepare. I mean this part of mysqltest.cc:
==============
if (do_stmt_prepare(cn, query, query_len))
{
handle_error(command, mysql_stmt_errno(stmt),
mysql_stmt_error(stmt), mysql_stmt_sqlstate(stmt), ds);
goto end;
}
+ if (display_metadata)
+ append_metadata(ds, fields, num_fields);
==============
then one will be able to run the test, say
--enable_metadata
EXPLAIN SELECT * FROM mysql.user;
--disable_metadata
and in --ps-protocol it'll show you metadata from prepared EXPLAIN.
May be --enable_metadata cannot be used for that and it'll need a new
command --enable_prepare_metadata (like we have --enable_prepare_warnings)