diff options
Diffstat (limited to 'storage/maria/ma_info.c')
-rw-r--r-- | storage/maria/ma_info.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/storage/maria/ma_info.c b/storage/maria/ma_info.c index 1189594fd2b..01ae4f56efd 100644 --- a/storage/maria/ma_info.c +++ b/storage/maria/ma_info.c @@ -11,7 +11,7 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA */ + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA */ /* Return useful base information for an open table */ @@ -56,7 +56,11 @@ int maria_status(MARIA_HA *info, register MARIA_INFO *x, uint flag) } if (flag & HA_STATUS_VARIABLE) { - x->records = info->state->records; + /* If table is locked, give versioned number otherwise last commited */ + if (info->lock_type == F_UNLCK) + x->records = share->state.state.records; + else + x->records = info->state->records; x->deleted = share->state.state.del; x->delete_length = share->state.state.empty; x->data_file_length = share->state.state.data_file_length; |