Commit 5a330d4c authored by Sergei Golubchik's avatar Sergei Golubchik

MDEV-26794 MariaBackup does not recognize added providers upon prepare of incremental backup

* Change InnoDB message text to mention compression.
* make "not loaded compression provider" warning to be issued
  also when current_thd == 0.
parent 2be68046
...@@ -6,7 +6,7 @@ call mtr.add_suppression("InnoDB: Plugin initialization aborted"); ...@@ -6,7 +6,7 @@ call mtr.add_suppression("InnoDB: Plugin initialization aborted");
call mtr.add_suppression("Plugin 'InnoDB' init function returned error"); call mtr.add_suppression("Plugin 'InnoDB' init function returned error");
call mtr.add_suppression("Plugin 'InnoDB' registration as a STORAGE ENGINE failed"); call mtr.add_suppression("Plugin 'InnoDB' registration as a STORAGE ENGINE failed");
call mtr.add_suppression("InnoDB: Database page corruption on disk or a failed read of file '.*test.t1\\.ibd' page"); call mtr.add_suppression("InnoDB: Database page corruption on disk or a failed read of file '.*test.t1\\.ibd' page");
call mtr.add_suppression("InnoDB: Failed to read page [123] from file '.*test.t1\\.ibd': Table is encrypted but decrypt failed"); call mtr.add_suppression("InnoDB: Failed to read page [123] from file '.*test.t1\\.ibd': Table is compressed or encrypted but uncompress or decrypt failed");
call mtr.add_suppression("InnoDB: The page \\[page id: space=\\d+, page number=3\\] in file '.*test.t1\\.ibd' cannot be decrypted"); call mtr.add_suppression("InnoDB: The page \\[page id: space=\\d+, page number=3\\] in file '.*test.t1\\.ibd' cannot be decrypted");
call mtr.add_suppression("InnoDB: Table in tablespace \\d+ encrypted. However key management plugin or used key_version \\d+ is not found or used encryption algorithm or method does not match. Can't continue opening the table."); call mtr.add_suppression("InnoDB: Table in tablespace \\d+ encrypted. However key management plugin or used key_version \\d+ is not found or used encryption algorithm or method does not match. Can't continue opening the table.");
--enable_query_log --enable_query_log
......
call mtr.add_suppression("Background Page read failed to read or decrypt"); call mtr.add_suppression("Background Page read failed to read, uncompress, or decrypt");
call mtr.add_suppression("InnoDB: Failed to read page \\d+ from file './test/t1.ibd': Table is encrypted but decrypt failed"); call mtr.add_suppression("Table is compressed or encrypted but uncompress or decrypt failed");
# #
# Testing mariabackup with bzip2 compression # Testing mariabackup with bzip2 compression
# #
......
let $alg = $MTR_COMBINATIONS; let $alg = $MTR_COMBINATIONS;
call mtr.add_suppression("Background Page read failed to read or decrypt"); call mtr.add_suppression("Background Page read failed to read, uncompress, or decrypt");
call mtr.add_suppression("InnoDB: Failed to read page \\d+ from file './test/t1.ibd': Table is encrypted but decrypt failed"); call mtr.add_suppression("Table is compressed or encrypted but uncompress or decrypt failed");
if (`select count(*) = 0 from information_schema.plugins where plugin_name = 'provider_$alg' and plugin_status='active'`) if (`select count(*) = 0 from information_schema.plugins where plugin_name = 'provider_$alg' and plugin_status='active'`)
{ {
......
...@@ -8,8 +8,8 @@ ...@@ -8,8 +8,8 @@
call mtr.add_suppression("MariaDB tried to use the .+ compression, but its provider plugin is not loaded"); call mtr.add_suppression("MariaDB tried to use the .+ compression, but its provider plugin is not loaded");
-set global innodb_compression_algorithm = bzip2; -set global innodb_compression_algorithm = bzip2;
+set global innodb_compression_algorithm = lz4; +set global innodb_compression_algorithm = lz4;
call mtr.add_suppression("InnoDB: Background Page read failed to read or decrypt \\[page id: space=\\d+, page number=\\d+\\]"); call mtr.add_suppression("Background Page read failed to read, uncompress, or decrypt");
call mtr.add_suppression("InnoDB: Failed to read page \\d+ from file './test/t1.ibd': Table is encrypted but decrypt failed"); call mtr.add_suppression("Table is compressed or encrypted but uncompress or decrypt failed");
call mtr.add_suppression("InnoDB: Table `test`.`t1` is compressed with (\\w+) \\(\\d\\), which is not currently loaded. Please load the '\\1' provider plugin to open the table."); call mtr.add_suppression("InnoDB: Table `test`.`t1` is compressed with (\\w+) \\(\\d\\), which is not currently loaded. Please load the '\\1' provider plugin to open the table.");
create table t1 (a int, b text ) engine = innodb page_compressed = 1; create table t1 (a int, b text ) engine = innodb page_compressed = 1;
@@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
......
...@@ -8,8 +8,8 @@ ...@@ -8,8 +8,8 @@
call mtr.add_suppression("MariaDB tried to use the .+ compression, but its provider plugin is not loaded"); call mtr.add_suppression("MariaDB tried to use the .+ compression, but its provider plugin is not loaded");
-set global innodb_compression_algorithm = bzip2; -set global innodb_compression_algorithm = bzip2;
+set global innodb_compression_algorithm = lzma; +set global innodb_compression_algorithm = lzma;
call mtr.add_suppression("InnoDB: Background Page read failed to read or decrypt \\[page id: space=\\d+, page number=\\d+\\]"); call mtr.add_suppression("Background Page read failed to read, uncompress, or decrypt");
call mtr.add_suppression("InnoDB: Failed to read page \\d+ from file './test/t1.ibd': Table is encrypted but decrypt failed"); call mtr.add_suppression("Table is compressed or encrypted but uncompress or decrypt failed");
call mtr.add_suppression("InnoDB: Table `test`.`t1` is compressed with (\\w+) \\(\\d\\), which is not currently loaded. Please load the '\\1' provider plugin to open the table."); call mtr.add_suppression("InnoDB: Table `test`.`t1` is compressed with (\\w+) \\(\\d\\), which is not currently loaded. Please load the '\\1' provider plugin to open the table.");
create table t1 (a int, b text ) engine = innodb page_compressed = 1; create table t1 (a int, b text ) engine = innodb page_compressed = 1;
@@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
......
...@@ -8,8 +8,8 @@ ...@@ -8,8 +8,8 @@
call mtr.add_suppression("MariaDB tried to use the .+ compression, but its provider plugin is not loaded"); call mtr.add_suppression("MariaDB tried to use the .+ compression, but its provider plugin is not loaded");
-set global innodb_compression_algorithm = bzip2; -set global innodb_compression_algorithm = bzip2;
+set global innodb_compression_algorithm = lzo; +set global innodb_compression_algorithm = lzo;
call mtr.add_suppression("InnoDB: Background Page read failed to read or decrypt \\[page id: space=\\d+, page number=\\d+\\]"); call mtr.add_suppression("Background Page read failed to read, uncompress, or decrypt");
call mtr.add_suppression("InnoDB: Failed to read page \\d+ from file './test/t1.ibd': Table is encrypted but decrypt failed"); call mtr.add_suppression("Table is compressed or encrypted but uncompress or decrypt failed");
call mtr.add_suppression("InnoDB: Table `test`.`t1` is compressed with (\\w+) \\(\\d\\), which is not currently loaded. Please load the '\\1' provider plugin to open the table."); call mtr.add_suppression("InnoDB: Table `test`.`t1` is compressed with (\\w+) \\(\\d\\), which is not currently loaded. Please load the '\\1' provider plugin to open the table.");
create table t1 (a int, b text ) engine = innodb page_compressed = 1; create table t1 (a int, b text ) engine = innodb page_compressed = 1;
@@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
......
...@@ -8,8 +8,8 @@ ...@@ -8,8 +8,8 @@
call mtr.add_suppression("MariaDB tried to use the .+ compression, but its provider plugin is not loaded"); call mtr.add_suppression("MariaDB tried to use the .+ compression, but its provider plugin is not loaded");
-set global innodb_compression_algorithm = bzip2; -set global innodb_compression_algorithm = bzip2;
+set global innodb_compression_algorithm = snappy; +set global innodb_compression_algorithm = snappy;
call mtr.add_suppression("InnoDB: Background Page read failed to read or decrypt \\[page id: space=\\d+, page number=\\d+\\]"); call mtr.add_suppression("Background Page read failed to read, uncompress, or decrypt");
call mtr.add_suppression("InnoDB: Failed to read page \\d+ from file './test/t1.ibd': Table is encrypted but decrypt failed"); call mtr.add_suppression("Table is compressed or encrypted but uncompress or decrypt failed");
call mtr.add_suppression("InnoDB: Table `test`.`t1` is compressed with (\\w+) \\(\\d\\), which is not currently loaded. Please load the '\\1' provider plugin to open the table."); call mtr.add_suppression("InnoDB: Table `test`.`t1` is compressed with (\\w+) \\(\\d\\), which is not currently loaded. Please load the '\\1' provider plugin to open the table.");
create table t1 (a int, b text ) engine = innodb page_compressed = 1; create table t1 (a int, b text ) engine = innodb page_compressed = 1;
@@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
......
...@@ -7,8 +7,8 @@ ...@@ -7,8 +7,8 @@
# #
call mtr.add_suppression("MariaDB tried to use the .+ compression, but its provider plugin is not loaded"); call mtr.add_suppression("MariaDB tried to use the .+ compression, but its provider plugin is not loaded");
-set global innodb_compression_algorithm = bzip2; -set global innodb_compression_algorithm = bzip2;
-call mtr.add_suppression("InnoDB: Background Page read failed to read or decrypt \\[page id: space=\\d+, page number=\\d+\\]"); -call mtr.add_suppression("Background Page read failed to read, uncompress, or decrypt");
-call mtr.add_suppression("InnoDB: Failed to read page \\d+ from file './test/t1.ibd': Table is encrypted but decrypt failed"); -call mtr.add_suppression("Table is compressed or encrypted but uncompress or decrypt failed");
-call mtr.add_suppression("InnoDB: Table `test`.`t1` is compressed with (\\w+), which is not currently loaded. Please load the \\1 provider plugin to open the table"); -call mtr.add_suppression("InnoDB: Table `test`.`t1` is compressed with (\\w+), which is not currently loaded. Please load the \\1 provider plugin to open the table");
-create table t1 (a int, b text ) engine = innodb page_compressed = 1; -create table t1 (a int, b text ) engine = innodb page_compressed = 1;
+create table t1 (a int, b text COMMENT 'FLAGS "COLUMN_SCALAR|COMPRESS_LZ4"') engine = mroonga charset = utf8; +create table t1 (a int, b text COMMENT 'FLAGS "COLUMN_SCALAR|COMPRESS_LZ4"') engine = mroonga charset = utf8;
......
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
# #
call mtr.add_suppression("MariaDB tried to use the .+ compression, but its provider plugin is not loaded"); call mtr.add_suppression("MariaDB tried to use the .+ compression, but its provider plugin is not loaded");
set global innodb_compression_algorithm = bzip2; set global innodb_compression_algorithm = bzip2;
call mtr.add_suppression("InnoDB: Background Page read failed to read or decrypt \\[page id: space=\\d+, page number=\\d+\\]"); call mtr.add_suppression("Background Page read failed to read, uncompress, or decrypt");
call mtr.add_suppression("InnoDB: Failed to read page \\d+ from file './test/t1.ibd': Table is encrypted but decrypt failed"); call mtr.add_suppression("Table is compressed or encrypted but uncompress or decrypt failed");
call mtr.add_suppression("InnoDB: Table `test`.`t1` is compressed with (\\w+), which is not currently loaded. Please load the \\1 provider plugin to open the table"); call mtr.add_suppression("InnoDB: Table `test`.`t1` is compressed with (\\w+), which is not currently loaded. Please load the \\1 provider plugin to open the table");
create table t1 (a int, b text ) engine = innodb page_compressed = 1; create table t1 (a int, b text ) engine = innodb page_compressed = 1;
insert t1 (a, b) values (0, repeat("abc", 100)); insert t1 (a, b) values (0, repeat("abc", 100));
......
...@@ -19,8 +19,8 @@ call mtr.add_suppression("MariaDB tried to use the .+ compression, but its provi ...@@ -19,8 +19,8 @@ call mtr.add_suppression("MariaDB tried to use the .+ compression, but its provi
if ($engine == "innodb") { if ($engine == "innodb") {
eval set global innodb_compression_algorithm = $alg; eval set global innodb_compression_algorithm = $alg;
let $table_params = page_compressed = 1; let $table_params = page_compressed = 1;
call mtr.add_suppression("InnoDB: Background Page read failed to read or decrypt \\[page id: space=\\d+, page number=\\d+\\]"); call mtr.add_suppression("Background Page read failed to read, uncompress, or decrypt");
call mtr.add_suppression("InnoDB: Failed to read page \\d+ from file './test/t1.ibd': Table is encrypted but decrypt failed"); call mtr.add_suppression("Table is compressed or encrypted but uncompress or decrypt failed");
call mtr.add_suppression("InnoDB: Table `test`.`t1` is compressed with (\\w+), which is not currently loaded. Please load the \\1 provider plugin to open the table"); call mtr.add_suppression("InnoDB: Table `test`.`t1` is compressed with (\\w+), which is not currently loaded. Please load the \\1 provider plugin to open the table");
} }
if ($engine == "mroonga") { if ($engine == "mroonga") {
......
...@@ -249,10 +249,10 @@ struct sql_service_st sql_service_handler= ...@@ -249,10 +249,10 @@ struct sql_service_st sql_service_handler=
#define DEFINE_warning_function(name, ret) { \ #define DEFINE_warning_function(name, ret) { \
static query_id_t last_query_id= -1; \ static query_id_t last_query_id= -1; \
THD *thd= current_thd; \ THD *thd= current_thd; \
if(thd && thd->query_id != last_query_id) \ if((thd ? thd->query_id : 0) != last_query_id) \
{ \ { \
my_error(ER_PROVIDER_NOT_LOADED, MYF(ME_ERROR_LOG|ME_WARNING), name); \ my_error(ER_PROVIDER_NOT_LOADED, MYF(ME_ERROR_LOG|ME_WARNING), name); \
last_query_id= thd->query_id; \ last_query_id= thd ? thd->query_id : 0; \
} \ } \
return ret; \ return ret; \
} }
......
...@@ -514,7 +514,7 @@ void buf_read_page_background(fil_space_t *space, const page_id_t page_id, ...@@ -514,7 +514,7 @@ void buf_read_page_background(fil_space_t *space, const page_id_t page_id,
case DB_DECRYPTION_FAILED: case DB_DECRYPTION_FAILED:
ib::error() ib::error()
<< "Background Page read failed to " << "Background Page read failed to "
"read or decrypt " << page_id; "read, uncompress, or decrypt " << page_id;
break; break;
default: default:
ib::fatal() << "Error " << err << " in background read of " ib::fatal() << "Error " << err << " in background read of "
......
...@@ -447,7 +447,7 @@ ut_strerr( ...@@ -447,7 +447,7 @@ ut_strerr(
case DB_FTS_TOO_MANY_WORDS_IN_PHRASE: case DB_FTS_TOO_MANY_WORDS_IN_PHRASE:
return("Too many words in a FTS phrase or proximity search"); return("Too many words in a FTS phrase or proximity search");
case DB_DECRYPTION_FAILED: case DB_DECRYPTION_FAILED:
return("Table is encrypted but decrypt failed."); return("Table is compressed or encrypted but uncompress or decrypt failed.");
case DB_IO_PARTIAL_FAILED: case DB_IO_PARTIAL_FAILED:
return("Partial IO failed"); return("Partial IO failed");
case DB_FORCED_ABORT: case DB_FORCED_ABORT:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment