[Commits] c9e76fe: MDEV-9118 ANALYZE TABLE for Engine independent status fetchs blob/text columns without use

OleksandrByelkin sanja at mariadb.com
Wed Dec 16 20:33:42 EET 2015


revision-id: c9e76fec68476b7987cc6ce0a0a74d9d492854e0 (mariadb-10.1.9-20-gc9e76fe)
parent(s): 953d5680a3c050273a8f29253f7386984679f92b
committer: Oleksandr Byelkin
timestamp: 2015-12-16 19:33:41 +0100
message:

MDEV-9118 ANALYZE TABLE for Engine independent status fetchs blob/text columns without use

Do not include BLOB fields by default.

---
 mysql-test/r/statistics.result |  2 --
 sql/sql_admin.cc               | 13 +++++++++----
 2 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/mysql-test/r/statistics.result b/mysql-test/r/statistics.result
index bd6a084..76c0cf4 100644
--- a/mysql-test/r/statistics.result
+++ b/mysql-test/r/statistics.result
@@ -1225,7 +1225,6 @@ test	t1	c	aaaa	dddddddd	0.1250	6.6571	7.0000	0	NULL	NULL
 test	t1	d	1989-03-12	1999-07-23	0.1500	3.0000	8.5000	0	NULL	NULL
 test	t1	e	0.01	0.112	0.2250	8.0000	6.2000	0	NULL	NULL
 test	t1	f	1	5	0.2000	1.0000	6.4000	0	NULL	NULL
-test	t1	b	NULL	NULL	0.2000	17.1250	NULL	NULL	NULL	NULL
 SELECT * FROM mysql.index_stats;
 db_name	table_name	index_name	prefix_arity	avg_frequency
 test	t1	idx2	1	7.0000
@@ -1276,7 +1275,6 @@ test	t1	c	aaaa	dddddddd	0.1250	6.6571	7.0000	0	NULL	NULL
 test	t1	d	1989-03-12	1999-07-23	0.1500	3.0000	8.5000	0	NULL	NULL
 test	t1	e	0.01	0.112	0.2250	8.0000	6.2000	0	NULL	NULL
 test	t1	f	1	5	0.2000	1.0000	6.4000	0	NULL	NULL
-test	t1	b	NULL	NULL	0.2000	17.1250	NULL	NULL	NULL	NULL
 SELECT * FROM mysql.index_stats;
 db_name	table_name	index_name	prefix_arity	avg_frequency
 test	t1	PRIMARY	1	1.0000
diff --git a/sql/sql_admin.cc b/sql/sql_admin.cc
index 0787aa9..b2f1da9 100644
--- a/sql/sql_admin.cc
+++ b/sql/sql_admin.cc
@@ -692,10 +692,15 @@ static bool mysql_admin_table(THD* thd, TABLE_LIST* tables,
       }
 
       if (!lex->column_list)
-      { 
-        uint fields= 0;
-        for ( ; *field_ptr; field_ptr++, fields++) ;         
-        bitmap_set_prefix(tab->read_set, fields);
+      {
+        bitmap_clear_all(tab->read_set);
+        for (uint fields= 0; *field_ptr; field_ptr++, fields++)
+        {
+          enum enum_field_types type= (*field_ptr)->type();
+          if (type < MYSQL_TYPE_MEDIUM_BLOB ||
+              type > MYSQL_TYPE_BLOB)
+            bitmap_set_bit(tab->read_set, fields);
+        }
       }
       else
       {


More information about the commits mailing list