maria-developers team mailing list archive
-
maria-developers team
-
Mailing list archive
-
Message #08438
Re: ae2cb44: MDEV-7922 - ERROR 1939 (HY000): Engine PERFORMANCE_SCHEMA failed to discover
Hi Sergei,
On Tue, Apr 07, 2015 at 03:03:39PM +0200, Sergei Golubchik wrote:
> Hi, Sergey!
>
> On Apr 07, svoj@xxxxxxxxxxx wrote:
> > revision-id: ae2cb445ea2a51657f1d2581db77db2ecbf70bc1
> > parent(s): 7d9e94e2e6c32b906d1d8469e58bc04b8da1c121
> > committer: Sergey Vojtovich
> > branch nick: mariadb
> > timestamp: 2015-04-07 14:59:25 +0400
> > message:
> >
> > MDEV-7922 - ERROR 1939 (HY000): Engine PERFORMANCE_SCHEMA failed to discover
> > table
> >
> > Performance schema discovery fails if connection has no active database set.
> >
> > This happened due to restriction in SQL parser: table name with no database name
> > is ambiguous in such case.
> >
> > Now PFS discovery statements specify database name explicitely.
>
> No, I don't like this solution. This is an issue in discovery, there is
> nothing wrong with how P_S uses it.
>
> I'd rather fix it in TABLE_SHARE::init_from_sql_statement_string()
> by temporarily setting THD::db to this->db (which is a db where the
> table will be created).
Well, I don't like it either. I also thought about temporary substition of
THD::db. But it may be read by concurrent thread (at least SHOW PROCESSLIST
does it) and be source for race conditions. Not sure how much these races are
relevant though.
Thanks,
Sergey
Follow ups
References