Hi, Oleksandr, On Oct 19, Oleksandr Byelkin wrote: > On Wed, Oct 19, 2022 at 5:09 PM Sergei Golubchik <s...@mariadb.org> wrote: > > On Oct 19, Oleksandr Byelkin wrote: > > > > > > if (share->view_def->parse((uchar *) &share->tabledef_version, NULL, > > > view_timestamp_parameters, 1, > > > &file_parser_dummy_hook)) > > > + { > > > + // safety if the definition file is brocken > > > + share->tabledef_version.length= 0; > > > > when can view_def->parse() fail? _Only_ if the definition is invalid? > > Can it succeed for one TABLE and fail for another, both of the same > > TABLE_SHARE? > > Also if there is no memory. > > If for the other table there will be more memory or file has changed > it can succeed.
My point is that if it is possible that two different threads would get different results from share->view_def->parse(), then you cannot update the shared share->tabledef_version.length without a lock. And you cannot read it without a lock. So if it is possible that two different threads would get different results from share->view_def->parse(), then it's best not to update share->tabledef_version.length here and only do it in open_table_def(). Regards, Sergei VP of MariaDB Server Engineering and secur...@mariadb.org _______________________________________________ Mailing list: https://launchpad.net/~maria-developers Post to : maria-developers@lists.launchpad.net Unsubscribe : https://launchpad.net/~maria-developers More help : https://help.launchpad.net/ListHelp