diff options
Diffstat (limited to 'innobase/row/row0sel.c')
-rw-r--r-- | innobase/row/row0sel.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/innobase/row/row0sel.c b/innobase/row/row0sel.c index 2215e3feff8..5a5da3ba59a 100644 --- a/innobase/row/row0sel.c +++ b/innobase/row/row0sel.c @@ -2773,6 +2773,18 @@ row_search_for_mysql( ut_a(0); } + if (trx->n_mysql_tables_in_use == 0) { + char err_buf[1000]; + + trx_print(err_buf, trx); + + fprintf(stderr, +"InnoDB: Error: MySQL is trying to perform a SELECT\n" +"InnoDB: but it has not locked any tables in ::external_lock()!\n%s\n", + err_buf); + ut_a(0); + } + /* printf("Match mode %lu\n search tuple ", match_mode); dtuple_print(search_tuple); @@ -3072,6 +3084,18 @@ shortcut_fails_too_big_rec: if (!prebuilt->sql_stat_start) { /* No need to set an intention lock or assign a read view */ + if (trx->read_view == NULL + && prebuilt->select_lock_type == LOCK_NONE) { + char err_buf[1000]; + + trx_print(err_buf, trx); + + fprintf(stderr, +"InnoDB: Error: MySQL is trying to perform a consistent read\n" +"InnoDB: but the read view is not assigned!\n%s\n", err_buf); + + ut_a(0); + } } else if (prebuilt->select_lock_type == LOCK_NONE) { /* This is a consistent read */ /* Assign a read view for the query */ |