Skip to content

Commit 4b35d42

Browse files
committed
Bug #28289789 FORMAT OF INNODB ERROR MESSAGES TO BE CORRECTED
Issue: Error messages from InnoDB are in following format : <ERROR PREFIX> [ERROR] [MY-012676] [InnoDB] InnoDB: <ERROR MESSAGE TEXT> There is an extra 'InnoDB:' prefix before the actual message text. Fix: Correct error message format should be as follow : <ERROR PREFIX> [ERROR] [MY-012676] [InnoDB] <ERROR MESSAGE TEXT> RB : 20079 Reviewed by : Bin Su <[email protected]>
1 parent f15a86c commit 4b35d42

File tree

10 files changed

+16
-34
lines changed

10 files changed

+16
-34
lines changed

mysql-test/suite/innodb/t/sdi_fail.test

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
--echo #
66

77
--disable_query_log
8-
call mtr.add_suppression("InnoDB: sdi_delete failed: tablespace_id:");
9-
call mtr.add_suppression("InnoDB: Cannot save table statistics for table");
8+
call mtr.add_suppression("sdi_delete failed: tablespace_id:");
9+
call mtr.add_suppression("Cannot save table statistics for table");
1010
--enable_query_log
1111

1212
create table t1(c1 int primary key, c2 char(1), c3 int unsigned);

mysql-test/suite/innodb/t/tablespace_encrypt_1.test

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@
4444

4545
--disable_query_log
4646
call mtr.add_suppression("ibd can't be decrypted , please confirm the keyfile is match and keyring plugin is loaded.");
47-
call mtr.add_suppression("\\[Error\\] \\[[^]]*\\] \\[[^]]*\\] InnoDB: Encryption can't find master key, please check the keyring plugin is loaded.");
48-
call mtr.add_suppression("\\[ERROR\\] \\[[^]]*\\] \\[[^]]*\\] InnoDB: Check keyring plugin fail, please check the keyring plugin is loaded.");
47+
call mtr.add_suppression("\\[Error\\] \\[[^]]*\\] \\[[^]]*\\] Encryption can't find master key, please check the keyring plugin is loaded.");
48+
call mtr.add_suppression("\\[ERROR\\] \\[[^]]*\\] \\[[^]]*\\] Check keyring plugin fail, please check the keyring plugin is loaded.");
4949
--enable_query_log
5050

5151
--echo #########################################################################

mysql-test/suite/innodb/t/tablespace_encrypt_2.test

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323

2424
--disable_query_log
2525
call mtr.add_suppression("ibd can't be decrypted , please confirm the keyfile is match and keyring plugin is loaded.");
26-
call mtr.add_suppression("\\[Error\\] \\[[^]]*\\] \\[[^]]*\\] InnoDB: Encryption can't find master key, please check the keyring plugin is loaded.");
27-
call mtr.add_suppression("\\[ERROR\\] \\[[^]]*\\] \\[[^]]*\\] InnoDB: Check keyring plugin fail, please check the keyring plugin is loaded.");
26+
call mtr.add_suppression("\\[Error\\] \\[[^]]*\\] \\[[^]]*\\] Encryption can't find master key, please check the keyring plugin is loaded.");
27+
call mtr.add_suppression("\\[ERROR\\] \\[[^]]*\\] \\[[^]]*\\] Check keyring plugin fail, please check the keyring plugin is loaded.");
2828
--enable_query_log
2929

3030
--echo #########################################################################

mysql-test/suite/innodb/t/tablespace_encrypt_3.test

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010

1111
--disable_query_log
1212
call mtr.add_suppression("ibd can't be decrypted , please confirm the keyfile is match and keyring plugin is loaded.");
13-
call mtr.add_suppression("\\[Error\\] \\[[^]]*\\] \\[[^]]*\\] InnoDB: Encryption can't find master key, please check the keyring plugin is loaded.");
14-
call mtr.add_suppression("\\[ERROR\\] \\[[^]]*\\] \\[[^]]*\\] InnoDB: Check keyring plugin fail, please check the keyring plugin is loaded.");
13+
call mtr.add_suppression("\\[Error\\] \\[[^]]*\\] \\[[^]]*\\] Encryption can't find master key, please check the keyring plugin is loaded.");
14+
call mtr.add_suppression("\\[ERROR\\] \\[[^]]*\\] \\[[^]]*\\] Check keyring plugin fail, please check the keyring plugin is loaded.");
1515
--enable_query_log
1616

1717
--echo #########################################################################

mysql-test/suite/innodb/t/tablespace_encrypt_4.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
--disable_query_log
1212
call mtr.add_suppression("ibd can't be decrypted , please confirm the keyfile is match and keyring plugin is loaded.");
13-
call mtr.add_suppression("\\[Error\\] \\[[^]]*\\] InnoDB: Encryption can't find master key, please check the keyring plugin is loaded.");
13+
call mtr.add_suppression("\\[Error\\] \\[[^]]*\\] Encryption can't find master key, please check the keyring plugin is loaded.");
1414
--enable_query_log
1515

1616
--echo #########################################################################

mysql-test/suite/innodb/t/tablespace_encrypt_6.test

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
call mtr.add_suppression("ibd can't be decrypted , please confirm the keyfile is match and keyring plugin is loaded");
1919
call mtr.add_suppression("\\[ERROR\\].*Plugin keyring_file reported: 'keyring_file initialization failure.");
2020
call mtr.add_suppression("\\[ERROR\\].*Plugin keyring_file reported: 'File .*keyring' not found .*");
21-
call mtr.add_suppression("\\[ERROR\\] \\[[^]]*\\] \\[[^]]*\\] InnoDB: Encryption can't find master key, please check the keyring plugin is loaded.");
22-
call mtr.add_suppression("\\[ERROR\\] \\[[^]]*\\] \\[[^]]*\\] InnoDB: Check keyring plugin fail, please check the keyring plugin is loaded.");
21+
call mtr.add_suppression("\\[ERROR\\] \\[[^]]*\\] \\[[^]]*\\] Encryption can't find master key, please check the keyring plugin is loaded.");
22+
call mtr.add_suppression("\\[ERROR\\] \\[[^]]*\\] \\[[^]]*\\] Check keyring plugin fail, please check the keyring plugin is loaded.");
2323
-- enable_query_log
2424

2525
--echo #########################################################################

mysql-test/suite/innodb/t/tablespace_encrypt_7.test

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717

1818
--disable_query_log
1919
call mtr.add_suppression("ibd can't be decrypted , please confirm the keyfile is match and keyring plugin is loaded.");
20-
call mtr.add_suppression("\\[Error\\] \\[[^]]*\\] \\[[^]]*\\] InnoDB: Encryption can't find master key, please check the keyring plugin is loaded.");
21-
call mtr.add_suppression("\\[ERROR\\] \\[[^]]*\\] \\[[^]]*\\] InnoDB: Check keyring plugin fail, please check the keyring plugin is loaded.");
20+
call mtr.add_suppression("\\[Error\\] \\[[^]]*\\] \\[[^]]*\\] Encryption can't find master key, please check the keyring plugin is loaded.");
21+
call mtr.add_suppression("\\[ERROR\\] \\[[^]]*\\] \\[[^]]*\\] Check keyring plugin fail, please check the keyring plugin is loaded.");
2222
--enable_query_log
2323

2424
--echo #########################################################################

mysql-test/suite/innodb/t/tablespace_encrypt_9.test

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515

1616
--disable_query_log
1717
call mtr.add_suppression("ibd can't be decrypted , please confirm the keyfile is match and keyring plugin is loaded.");
18-
call mtr.add_suppression("\\[Error\\] \\[[^]]*\\] \\[[^]]*\\] InnoDB: Encryption can't find master key, please check the keyring plugin is loaded.");
19-
call mtr.add_suppression("\\[ERROR\\] \\[[^]]*\\] \\[[^]]*\\] InnoDB: Check keyring plugin fail, please check the keyring plugin is loaded.");
18+
call mtr.add_suppression("\\[Error\\] \\[[^]]*\\] \\[[^]]*\\] Encryption can't find master key, please check the keyring plugin is loaded.");
19+
call mtr.add_suppression("\\[ERROR\\] \\[[^]]*\\] \\[[^]]*\\] Check keyring plugin fail, please check the keyring plugin is loaded.");
2020
--enable_query_log
2121

2222
--echo #########################################################################

storage/innobase/include/ut0ut.h

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -421,14 +421,6 @@ class logger {
421421

422422
protected:
423423
#ifndef UNIV_NO_ERR_MSGS
424-
/** String prefix for all log messages. */
425-
#if defined(__SUNPRO_CC)
426-
static const char *PREFIX;
427-
#else
428-
/** String prefix for all log messages. */
429-
static constexpr const char *PREFIX = "InnoDB: ";
430-
#endif /* __SUNPRO_CC */
431-
432424
/** Format an error message.
433425
@param[in] err Error code from errmsg-*.txt.
434426
@param[in] args Variable length argument list */
@@ -465,7 +457,6 @@ class logger {
465457
snprintf(buf, sizeof(buf), str);
466458
*/
467459

468-
m_oss << PREFIX;
469460
m_oss << msg(err, "");
470461
}
471462

@@ -476,15 +467,12 @@ class logger {
476467
template <class... Args>
477468
explicit logger(loglevel level, int err, Args &&... args)
478469
: m_err(err), m_level(level) {
479-
m_oss << PREFIX;
480470
m_oss << msg(err, std::forward<Args>(args)...);
481471
}
482472

483473
/** Constructor
484474
@param[in] level Log error level */
485-
explicit logger(loglevel level) : m_err(ER_IB_MSG_0), m_level(level) {
486-
m_oss << PREFIX;
487-
}
475+
explicit logger(loglevel level) : m_err(ER_IB_MSG_0), m_level(level) {}
488476

489477
#endif /* !UNIV_NO_ERR_MSGS */
490478
};

storage/innobase/ut/ut0ut.cc

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,6 @@ this program; if not, write to the Free Software Foundation, Inc.,
5858
#include "mysql/components/services/log_builtins.h"
5959
#include "sql/derror.h"
6060

61-
#ifndef UNIV_NO_ERR_MSGS
62-
#if defined(__SUNPRO_CC)
63-
const char *ib::logger::PREFIX = "InnoDB: ";
64-
#endif /* __SUNPRO_CC */
65-
#endif /* !UNIV_NO_ERR_MSGS */
66-
6761
#ifdef _WIN32
6862
using time_fn = VOID(WINAPI *)(_Out_ LPFILETIME);
6963
static time_fn ut_get_system_time_as_file_time = GetSystemTimeAsFileTime;

0 commit comments

Comments
 (0)