[Commits] 67260fd: MDEV-15130 Assertion `table->s->null_bytes == 0' failed in ...

sachin sachin.setiya at mariadb.com
Thu Apr 19 20:27:39 EEST 2018


revision-id: 67260fd307423b04119bcb4ef1e0bc62fdff4969 (mariadb-10.3.6-22-g67260fd)
parent(s): cd8b8169b6f39450f10f1ba8a16ae68486bc0975
author: Sachin Setiya
committer: Sachin Setiya
timestamp: 2018-04-19 22:57:30 +0530
message:

MDEV-15130 Assertion `table->s->null_bytes == 0' failed in ...
table_setup_timers::read_row_values under 'test_completely_invisible'

Also solves:-
MDEV-15131 Assertion `false' failed in table_setup_actors::read_row_values
upon querying perfschema under 'test_pseudo_invisible'
MDEV-15137 Assertion `f->real_type() == MYSQL_TYPE_VARCHAR' failed in
PFS_engine_table::set_field_varchar_utf8 upon querying perfschema under
'test_completely_invisible'

Performance schema table are created on the fly , when there is query on
perf schema tables, and test_pseudo_invisible debug_dbug flag is on, then
when query calls mysql_prepare_create_table one invisible field is added ,
this crashes the server.

---
 mysql-test/main/invisible_field.result | 14 ++++++++++++++
 mysql-test/main/invisible_field.test   | 21 +++++++++++++++++++++
 storage/perfschema/ha_perfschema.cc    | 10 ++++++++++
 3 files changed, 45 insertions(+)

diff --git a/mysql-test/main/invisible_field.result b/mysql-test/main/invisible_field.result
index 5cea77f..8395789 100644
--- a/mysql-test/main/invisible_field.result
+++ b/mysql-test/main/invisible_field.result
@@ -556,3 +556,17 @@ INSERT INTO t1 (c,t) VALUES ('foo','2000-01-01 00:00:00');
 CREATE TRIGGER tr BEFORE INSERT ON t1 FOR EACH ROW SET @a= 1;
 INSERT INTO t1 SELECT * FROM t1;
 DROP TABLE t1;
+#MDEV-15130
+SET debug_dbug= "+d,test_completely_invisible";
+UPDATE performance_schema.setup_timers SET timer_name = 'CYCLE' WHERE name = 'wait';
+ERROR HY000: Internal error: Don't query performance_schema whentest_completely_invisible is on
+#MDEV-15131
+SET debug_dbug="+d,test_pseudo_invisible";
+SELECT * FROM performance_schema.setup_actors;
+ERROR HY000: Internal error: Don't query performance_schema whentest_pseudo_invisible is on
+#MDEV-15137
+CREATE TABLE t1 (i INT);
+SET debug_dbug= "+d,test_completely_invisible";
+SELECT * FROM performance_schema.events_stages_summary_by_account_by_event_name STRAIGHT_JOIN t1 ON ( i = SUM_TIMER_WAIT );
+ERROR HY000: Internal error: Don't query performance_schema whentest_pseudo_invisible is on
+DROP TABLE t1;
diff --git a/mysql-test/main/invisible_field.test b/mysql-test/main/invisible_field.test
index cfe89d7..53336b8 100644
--- a/mysql-test/main/invisible_field.test
+++ b/mysql-test/main/invisible_field.test
@@ -1,3 +1,5 @@
+--source include/have_perfschema.inc
+
 FLUSH STATUS;
 create table t1(abc int primary key, xyz int invisible);
 SHOW STATUS LIKE 'Feature_invisible_columns';
@@ -246,3 +248,22 @@ CREATE TRIGGER tr BEFORE INSERT ON t1 FOR EACH ROW SET @a= 1;
 INSERT INTO t1 SELECT * FROM t1;
 # Cleanup
 DROP TABLE t1;
+
+--echo #MDEV-15130
+SET debug_dbug= "+d,test_completely_invisible";
+--error ER_INTERNAL_ERROR
+UPDATE performance_schema.setup_timers SET timer_name = 'CYCLE' WHERE name = 'wait';
+
+--echo #MDEV-15131
+SET debug_dbug="+d,test_pseudo_invisible";
+--error ER_INTERNAL_ERROR
+SELECT * FROM performance_schema.setup_actors;
+
+--echo #MDEV-15137
+CREATE TABLE t1 (i INT);
+SET debug_dbug= "+d,test_completely_invisible";
+--error ER_INTERNAL_ERROR
+SELECT * FROM performance_schema.events_stages_summary_by_account_by_event_name STRAIGHT_JOIN t1 ON ( i = SUM_TIMER_WAIT );
+
+# Cleanup
+DROP TABLE t1;
diff --git a/storage/perfschema/ha_perfschema.cc b/storage/perfschema/ha_perfschema.cc
index e8e9581..d5846f2 100644
--- a/storage/perfschema/ha_perfschema.cc
+++ b/storage/perfschema/ha_perfschema.cc
@@ -64,6 +64,16 @@ static int pfs_discover_table(handlerton *hton, THD *thd, TABLE_SHARE *share)
 {
   const PFS_engine_table_share *pfs_share;
 
+  DBUG_EXECUTE_IF("test_pseudo_invisible", {
+         my_error(ER_INTERNAL_ERROR, MYF(0), "Don't query performance_schema when"
+                 "test_pseudo_invisible is on");
+         return 1;
+         });
+  DBUG_EXECUTE_IF("test_completely_invisible", {
+         my_error(ER_INTERNAL_ERROR, MYF(0), "Don't query performance_schema when"
+                 "test_completely_invisible is on");
+         return 1;
+         });
   if ((pfs_share= find_table_share(share->db.str, share->table_name.str)))
     return share->init_from_sql_statement_string(thd, false,
                                                  pfs_share->sql.str,


More information about the commits mailing list