[MCOL-1084] table_usage() stored procedure show zero total usage when there are no dict columns Created: 2017-12-06  Updated: 2020-08-25  Resolved: 2018-03-21

Status: Closed
Project: MariaDB ColumnStore
Component/s: MDB Plugin
Affects Version/s: None
Fix Version/s: 1.1.4

Type: Bug Priority: Major
Reporter: Andrew Hutchings (Inactive) Assignee: Daniel Lee (Inactive)
Resolution: Fixed Votes: 1
Labels: None

Issue Links:
Duplicate
is duplicated by MCOL-1269 table_usage procedure output is not c... Closed
Sprint: 2018-05, 2018-06

 Description   

If a table doesn't have a dictionary column then table_usage('SCHEMA', NULL); returns 0 TOTAL_USAGE for the table.



 Comments   
Comment by Andrew Hutchings (Inactive) [ 2018-02-24 ]

For QA:

create a table in test with just INTs and add some data. Run columnstore_info.table_usage('test', NULL);

before fix this will show 0 in total_usage. After it will show the same amount as data_disk_usage.

Comment by Daniel Lee (Inactive) [ 2018-03-21 ]

Build verified: 1.1.4-1 source

/root/columnstore/mariadb-columnstore-server
commit 3b5242143b394423dbdf96d888410a3c33f9ff97
Merge: b7d93b7 23900e6
Author: benthompson15 <ben.thompson@mariadb.com>
Date: Wed Mar 7 10:39:40 2018 -0600

Merge pull request #104 from mariadb-corporation/davidhilldallas-patch-3

update version

/root/columnstore/mariadb-columnstore-server/mariadb-columnstore-engine
commit 4e167285c6665c9aa0e204eac2de0add61709be4
Merge: 819c69c b800fc7
Author: benthompson15 <ben.thompson@mariadb.com>
Date: Wed Mar 14 13:25:21 2018 -0500

Merge pull request #427 from mariadb-corporation/MCOL-1225

Mcol 1225 - fix mysql/lib library path

Reproduced reported issue in 1.1.3-2

MariaDB [mytest]> desc t1;
---------------------------------+

Field Type Null Key Default Extra

---------------------------------+

c1 int(11) YES   NULL  
c2 int(11) YES   NULL  
c3 int(11) YES   NULL  

---------------------------------+

MariaDB [mytest]> select * from t1;
--------------

c1 c2 c3

--------------

1 1 1
1 1 2
1 1 3

--------------
3 rows in set (0.06 sec)

MariaDB [mytest]> call columnstore_info.table_usage("mytest",NULL);
-----------------------------------------------------------------

TABLE_SCHEMA TABLE_NAME DATA_DISK_USAGE DICT_DISK_USAGE TOTAL_USAGE

-----------------------------------------------------------------

mytest orders 392.07 MB 132.02 MB 524.09 MB
mytest t1 3.02 MB 0 Bytes 0 Bytes

-----------------------------------------------------------------

1.1.4-1

MariaDB [mytest]> call columnstore_info.table_usage("mytest",NULL);
-----------------------------------------------------------------

TABLE_SCHEMA TABLE_NAME DATA_DISK_USAGE DICT_DISK_USAGE TOTAL_USAGE

-----------------------------------------------------------------

mytest orders 784.14 MB 136.05 MB 920.19 MB
mytest t1 3.02 MB 0 Bytes 3.02 MB

-----------------------------------------------------------------

Generated at Thu Feb 08 02:26:04 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.