mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
MDEV-17124: mariadb 10.1.34, views and prepared statements: ERROR 1615 (HY000): Prepared statement needs to be re-prepared
The problem is that if table definition cache (TDC) is full of real tables which are in tables cache, view definition can not stay there so will be removed by its own underlying tables. In situation above old mechanism of detection matching definition in PS and current version always require reprepare and so prevent executing the PS. One work around is to increase TDC, other - improve version check for views/triggers (which is done here). Now in suspicious cases we check: - timestamp (microseconds) of the view to be sure that version really have changed; - time (microseconds) of creation of a trigger related to time (microseconds) of statement preparation.
This commit is contained in:
@ -1122,6 +1122,7 @@ public:
|
||||
|
||||
LEX_CSTRING name; /* name for named prepared statements */
|
||||
LEX *lex; // parse tree descriptor
|
||||
my_hrtime_t hr_prepare_time; // time of preparation in microseconds
|
||||
/*
|
||||
Points to the query associated with this statement. It's const, but
|
||||
we need to declare it char * because all table handlers are written
|
||||
|
Reference in New Issue
Block a user