Hi, Aleksey! On Sep 11, Aleksey Midenkov wrote: > On Mon, Sep 11, 2017 at 4:37 PM, Sergei Golubchik <s...@mariadb.org> wrote: > > Hi, Aleksey! > > > > On Sep 11, Aleksey Midenkov wrote: > >> In ha_innobase::info_low() there is following dirty hack: > >> > >> if (n_rows == 0 && !(flag & HA_STATUS_TIME)) { > >> n_rows++; > >> } > >> > >> It is very old (from 5.0 or earlier) and bug-prone. Because in > >> ha_innobase::open(): > >> > >> info(HA_STATUS_NO_LOCK | HA_STATUS_VARIABLE | HA_STATUS_CONST); > >> > >> every opened empty table will be non-empty! > > > > Is that a problem? > > Don't you find it at least misleading? ha_innobase::open() is > exclusive (process-wide) operation and it lies about non-empty table.
ha_innobase::open() is not the only place where the ::info() method is called. I'd say that it'd be correct to return n_rows == 0 if the table is locked. Regards, Sergei Chief Architect MariaDB 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