summaryrefslogtreecommitdiff
path: root/sql/sql_show.cc
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2020-08-10 21:08:46 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2020-08-10 21:08:46 +0300
commiteae968f62d285de97ed607c87bc131cd863d5d03 (patch)
treeb86dacfaf9e1340161d3675204544a4db937eb05 /sql/sql_show.cc
parent101ddc5e2708e4e32f1aaa7a02fe85f0da95b73a (diff)
parentbafc5c1321a7dff5f2da292111bf98fed9d1658d (diff)
downloadmariadb-git-eae968f62d285de97ed607c87bc131cd863d5d03.tar.gz
Merge 10.3 into 10.4
Diffstat (limited to 'sql/sql_show.cc')
-rw-r--r--sql/sql_show.cc18
1 files changed, 12 insertions, 6 deletions
diff --git a/sql/sql_show.cc b/sql/sql_show.cc
index fd19b6064b5..2f8de331d30 100644
--- a/sql/sql_show.cc
+++ b/sql/sql_show.cc
@@ -4681,7 +4681,7 @@ fill_schema_table_by_open(THD *thd, MEM_ROOT *mem_root,
Again we don't do this for SHOW COLUMNS/KEYS because
of backward compatibility.
*/
- if (!is_show_fields_or_keys && result &&
+ if (!is_show_fields_or_keys && result && thd->is_error() &&
(thd->get_stmt_da()->sql_errno() == ER_NO_SUCH_TABLE ||
thd->get_stmt_da()->sql_errno() == ER_WRONG_OBJECT ||
thd->get_stmt_da()->sql_errno() == ER_NOT_SEQUENCE))
@@ -5973,15 +5973,21 @@ static int get_schema_column_record(THD *thd, TABLE_LIST *tables,
I.e. we are in SELECT FROM INFORMATION_SCHEMA.COLUMS
rather than in SHOW COLUMNS
*/
- push_warning(thd, Sql_condition::WARN_LEVEL_WARN,
- thd->get_stmt_da()->sql_errno(),
- thd->get_stmt_da()->message());
- thd->clear_error();
+ if (thd->is_error())
+ {
+ /*
+ The the query was aborted because examined rows exceeded limit.
+ Don't send the warning here. It is done later, in handle_select().
+ */
+ push_warning(thd, Sql_condition::WARN_LEVEL_WARN,
+ thd->get_stmt_da()->sql_errno(),
+ thd->get_stmt_da()->message());
+ thd->clear_error();
+ }
res= 0;
}
DBUG_RETURN(res);
}
-
show_table= tables->table;
count= 0;
ptr= show_table->field;