1
0
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:
bell@sanja.is.com.ua
2003-10-16 15:54:47 +03:00
parent ddf4d1e529
commit a7bdd19707
18 changed files with 735 additions and 181 deletions

View File

@@ -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;
}