diff options
Diffstat (limited to 'storage/innobase/handler')
-rw-r--r-- | storage/innobase/handler/ha_innodb.cc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc index 4b7c5b1246a..8a8d9698ac1 100644 --- a/storage/innobase/handler/ha_innodb.cc +++ b/storage/innobase/handler/ha_innodb.cc @@ -507,6 +507,18 @@ thd_has_edited_nontrans_tables( return((ibool) thd_non_transactional_update((THD*) thd)); } +/********************************************************************** +Returns true if the thread is executing a SELECT statement. */ +extern "C" +ibool +thd_is_select( +/*==========*/ + /* out: true if thd is executing SELECT */ + const void* thd) /* in: thread handle (THD*) */ +{ + return(thd_sql_command((const THD*) thd) == SQLCOM_SELECT); +} + /************************************************************************ Obtain the InnoDB transaction of a MySQL thread. */ inline |