mirror of
https://github.com/MariaDB/server.git
synced 2025-12-07 17:42:39 +03:00
subqueries made printable
new EXPLAIN parameter to show real query as it was interpreted (SCRUM) (WL#1274)
This commit is contained in:
@@ -1781,6 +1781,16 @@ mysql_execute_command(THD *thd)
|
||||
res= mysql_explain_union(thd, &thd->lex.unit, result);
|
||||
MYSQL_LOCK *save_lock= thd->lock;
|
||||
thd->lock= (MYSQL_LOCK *)0;
|
||||
if (lex->describe & DESCRIBE_EXTENDED)
|
||||
{
|
||||
char buff[1024];
|
||||
String str(buff,(uint32) sizeof(buff), system_charset_info);
|
||||
str.length(0);
|
||||
thd->lex.unit.print(&str);
|
||||
str.append('\0');
|
||||
push_warning(thd, MYSQL_ERROR::WARN_LEVEL_NOTE,
|
||||
ER_YES, str.ptr());
|
||||
}
|
||||
result->send_eof();
|
||||
thd->lock= save_lock;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user