From e62b57e4d003891574ba81d29377fc23f449f004 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Sat, 23 Sep 2017 20:34:53 +0300 Subject: [PATCH] Relax a too strict debug assertion --- storage/innobase/include/dict0dict.ic | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/storage/innobase/include/dict0dict.ic b/storage/innobase/include/dict0dict.ic index 2ed64b09397..f04f8faa686 100644 --- a/storage/innobase/include/dict0dict.ic +++ b/storage/innobase/include/dict0dict.ic @@ -396,7 +396,9 @@ dict_table_get_n_user_cols( const dict_table_t* table) /*!< in: table */ { ut_ad(table->magic_n == DICT_TABLE_MAGIC_N); - ut_ad(table->n_cols > DATA_N_SYS_COLS); + /* n_cols counts stored columns only. A table may contain + virtual columns and no user-specified stored columns at all. */ + ut_ad(table->n_cols >= DATA_N_SYS_COLS); return(table->n_cols - DATA_N_SYS_COLS); }