Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
2aab7f2d
Commit
2aab7f2d
authored
Oct 11, 2022
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-26597 post-fix: cannot add new error messages in 10.4
followup for
e8acec89
parent
d0c4526e
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
15 additions
and
31 deletions
+15
-31
mysql-test/suite/galera/r/MDEV-26597.result
mysql-test/suite/galera/r/MDEV-26597.result
+1
-1
mysql-test/suite/galera/t/MDEV-26597.test
mysql-test/suite/galera/t/MDEV-26597.test
+1
-1
mysql-test/suite/galera/t/galera_repl_max_ws_size.test
mysql-test/suite/galera/t/galera_repl_max_ws_size.test
+1
-1
mysql-test/suite/galera/t/galera_var_max_ws_size.test
mysql-test/suite/galera/t/galera_var_max_ws_size.test
+1
-1
sql/share/errmsg-utf8.txt
sql/share/errmsg-utf8.txt
+0
-2
sql/wsrep_mysqld.cc
sql/wsrep_mysqld.cc
+1
-1
sql/wsrep_thd.h
sql/wsrep_thd.h
+10
-24
No files found.
mysql-test/suite/galera/r/MDEV-26597.result
View file @
2aab7f2d
...
@@ -11,7 +11,7 @@ CREATE TABLE t1 ( pk int primary key) ENGINE=INNODB;
...
@@ -11,7 +11,7 @@ CREATE TABLE t1 ( pk int primary key) ENGINE=INNODB;
ERROR HY000: Maximum writeset size exceeded
ERROR HY000: Maximum writeset size exceeded
SHOW WARNINGS;
SHOW WARNINGS;
Level Code Message
Level Code Message
Error
4160
Maximum writeset size exceeded
Error
1105
Maximum writeset size exceeded
connection node_2;
connection node_2;
SET SESSION wsrep_sync_wait = 0;
SET SESSION wsrep_sync_wait = 0;
Killing server ...
Killing server ...
...
...
mysql-test/suite/galera/t/MDEV-26597.test
View file @
2aab7f2d
...
@@ -10,7 +10,7 @@ CREATE TABLE t3 (c1 INTEGER NOT NULL PRIMARY KEY, c2 FLOAT(3,2));
...
@@ -10,7 +10,7 @@ CREATE TABLE t3 (c1 INTEGER NOT NULL PRIMARY KEY, c2 FLOAT(3,2));
SET
GLOBAL
wsrep_provider_options
=
'repl.max_ws_size=512'
;
SET
GLOBAL
wsrep_provider_options
=
'repl.max_ws_size=512'
;
SET
@@
autocommit
=
0
;
SET
@@
autocommit
=
0
;
INSERT
INTO
t3
VALUES
(
1000
,
0.00
),(
1001
,
0.25
),(
1002
,
0.50
),(
1003
,
0.75
),(
1008
,
1.00
),(
1009
,
1.25
),(
1010
,
1.50
),(
1011
,
1.75
);
INSERT
INTO
t3
VALUES
(
1000
,
0.00
),(
1001
,
0.25
),(
1002
,
0.50
),(
1003
,
0.75
),(
1008
,
1.00
),(
1009
,
1.25
),(
1010
,
1.50
),(
1011
,
1.75
);
--
error
ER_
TOO_BIG_WRITESET
--
error
ER_
UNKNOWN_ERROR
CREATE
TABLE
t1
(
pk
int
primary
key
)
ENGINE
=
INNODB
;
CREATE
TABLE
t1
(
pk
int
primary
key
)
ENGINE
=
INNODB
;
SHOW
WARNINGS
;
SHOW
WARNINGS
;
...
...
mysql-test/suite/galera/t/galera_repl_max_ws_size.test
View file @
2aab7f2d
...
@@ -12,7 +12,7 @@ CREATE TABLE t1 (f1 VARCHAR(512)) ENGINE=InnoDB;
...
@@ -12,7 +12,7 @@ CREATE TABLE t1 (f1 VARCHAR(512)) ENGINE=InnoDB;
SET
GLOBAL
wsrep_provider_options
=
'repl.max_ws_size=512'
;
SET
GLOBAL
wsrep_provider_options
=
'repl.max_ws_size=512'
;
--
error
ER_
TOO_BIG_WRITESET
--
error
ER_
UNKNOWN_ERROR
INSERT
INTO
t1
VALUES
(
REPEAT
(
'a'
,
512
));
INSERT
INTO
t1
VALUES
(
REPEAT
(
'a'
,
512
));
SELECT
COUNT
(
*
)
=
0
FROM
t1
;
SELECT
COUNT
(
*
)
=
0
FROM
t1
;
...
...
mysql-test/suite/galera/t/galera_var_max_ws_size.test
View file @
2aab7f2d
...
@@ -12,7 +12,7 @@ CREATE TABLE t1 (f1 INTEGER AUTO_INCREMENT PRIMARY KEY, f2 VARCHAR(1024)) Engine
...
@@ -12,7 +12,7 @@ CREATE TABLE t1 (f1 INTEGER AUTO_INCREMENT PRIMARY KEY, f2 VARCHAR(1024)) Engine
--
let
$wsrep_max_ws_size_orig
=
`SELECT @@wsrep_max_ws_size`
--
let
$wsrep_max_ws_size_orig
=
`SELECT @@wsrep_max_ws_size`
SET
GLOBAL
wsrep_max_ws_size
=
1024
;
SET
GLOBAL
wsrep_max_ws_size
=
1024
;
--
error
ER_
TOO_BIG_WRITESET
--
error
ER_
UNKNOWN_ERROR
INSERT
INTO
t1
VALUES
(
DEFAULT
,
REPEAT
(
'X'
,
1024
));
INSERT
INTO
t1
VALUES
(
DEFAULT
,
REPEAT
(
'X'
,
1024
));
SELECT
COUNT
(
*
)
=
0
FROM
t1
;
SELECT
COUNT
(
*
)
=
0
FROM
t1
;
...
...
sql/share/errmsg-utf8.txt
View file @
2aab7f2d
...
@@ -9090,5 +9090,3 @@ ER_PERIOD_CONSTRAINT_DROP
...
@@ -9090,5 +9090,3 @@ ER_PERIOD_CONSTRAINT_DROP
ER_TOO_LONG_KEYPART 42000 S1009
ER_TOO_LONG_KEYPART 42000 S1009
chi "指定的索引部分太长;最大索引部分长度为 %u 个字节"
chi "指定的索引部分太长;最大索引部分长度为 %u 个字节"
eng "Specified key part was too long; max key part length is %u bytes"
eng "Specified key part was too long; max key part length is %u bytes"
ER_TOO_BIG_WRITESET
eng "Maximum writeset size exceeded"
sql/wsrep_mysqld.cc
View file @
2aab7f2d
...
@@ -2154,7 +2154,7 @@ static int wsrep_TOI_begin(THD *thd, const char *db, const char *table,
...
@@ -2154,7 +2154,7 @@ static int wsrep_TOI_begin(THD *thd, const char *db, const char *table,
ret
,
ret
,
(
thd
->
db
.
str
?
thd
->
db
.
str
:
"(null)"
),
(
thd
->
db
.
str
?
thd
->
db
.
str
:
"(null)"
),
wsrep_thd_query
(
thd
));
wsrep_thd_query
(
thd
));
my_error
(
ER_
TOO_BIG_WRITESET
,
MYF
(
0
)
);
my_error
(
ER_
UNKNOWN_ERROR
,
MYF
(
0
),
"Maximum writeset size exceeded"
);
break
;
break
;
case
wsrep
:
:
e_deadlock_error
:
case
wsrep
:
:
e_deadlock_error
:
WSREP_WARN
(
"TO isolation failed for: %d, schema: %s, sql: %s. "
WSREP_WARN
(
"TO isolation failed for: %d, schema: %s, sql: %s. "
...
...
sql/wsrep_thd.h
View file @
2aab7f2d
...
@@ -182,7 +182,7 @@ void wsrep_reset_threadvars(THD *);
...
@@ -182,7 +182,7 @@ void wsrep_reset_threadvars(THD *);
so don't override those by default
so don't override those by default
*/
*/
static
inline
void
wsrep_override_error
(
THD
*
thd
,
uint
error
)
static
inline
void
wsrep_override_error
(
THD
*
thd
,
uint
error
,
const
char
*
format
=
0
,
...
)
{
{
DBUG_ASSERT
(
error
!=
ER_ERROR_DURING_COMMIT
);
DBUG_ASSERT
(
error
!=
ER_ERROR_DURING_COMMIT
);
Diagnostics_area
*
da
=
thd
->
get_stmt_da
();
Diagnostics_area
*
da
=
thd
->
get_stmt_da
();
...
@@ -195,25 +195,11 @@ static inline void wsrep_override_error(THD *thd, uint error)
...
@@ -195,25 +195,11 @@ static inline void wsrep_override_error(THD *thd, uint error)
da
->
sql_errno
()
!=
ER_LOCK_DEADLOCK
))
da
->
sql_errno
()
!=
ER_LOCK_DEADLOCK
))
{
{
da
->
reset_diagnostics_area
();
da
->
reset_diagnostics_area
();
my_error
(
error
,
MYF
(
0
));
va_list
args
;
}
va_start
(
args
,
format
);
}
if
(
!
format
)
format
=
ER_THD
(
thd
,
error
);
my_printv_error
(
error
,
format
,
MYF
(
0
),
args
);
/**
va_end
(
args
);
Override error with additional wsrep status.
*/
static
inline
void
wsrep_override_error
(
THD
*
thd
,
uint
error
,
enum
wsrep
::
provider
::
status
status
)
{
Diagnostics_area
*
da
=
thd
->
get_stmt_da
();
if
(
da
->
is_ok
()
||
!
da
->
is_set
()
||
(
da
->
is_error
()
&&
da
->
sql_errno
()
!=
error
&&
da
->
sql_errno
()
!=
ER_LOCK_DEADLOCK
))
{
da
->
reset_diagnostics_area
();
my_error
(
error
,
MYF
(
0
),
status
);
}
}
}
}
...
@@ -226,9 +212,9 @@ static inline void wsrep_override_error(THD* thd,
...
@@ -226,9 +212,9 @@ static inline void wsrep_override_error(THD* thd,
{
{
case
wsrep
:
:
e_error_during_commit
:
case
wsrep
:
:
e_error_during_commit
:
if
(
status
==
wsrep
::
provider
::
error_size_exceeded
)
if
(
status
==
wsrep
::
provider
::
error_size_exceeded
)
wsrep_override_error
(
thd
,
ER_
TOO_BIG_WRITESET
);
wsrep_override_error
(
thd
,
ER_
UNKNOWN_ERROR
,
"Maximum writeset size exceeded"
);
else
else
wsrep_override_error
(
thd
,
ER_ERROR_DURING_COMMIT
,
status
);
wsrep_override_error
(
thd
,
ER_ERROR_DURING_COMMIT
,
0
,
status
);
break
;
break
;
case
wsrep
:
:
e_deadlock_error
:
case
wsrep
:
:
e_deadlock_error
:
wsrep_override_error
(
thd
,
ER_LOCK_DEADLOCK
);
wsrep_override_error
(
thd
,
ER_LOCK_DEADLOCK
);
...
@@ -237,11 +223,11 @@ static inline void wsrep_override_error(THD* thd,
...
@@ -237,11 +223,11 @@ static inline void wsrep_override_error(THD* thd,
wsrep_override_error
(
thd
,
ER_QUERY_INTERRUPTED
);
wsrep_override_error
(
thd
,
ER_QUERY_INTERRUPTED
);
break
;
break
;
case
wsrep
:
:
e_size_exceeded_error
:
case
wsrep
:
:
e_size_exceeded_error
:
wsrep_override_error
(
thd
,
ER_
TOO_BIG_WRITESET
);
wsrep_override_error
(
thd
,
ER_
UNKNOWN_ERROR
,
"Maximum writeset size exceeded"
);
break
;
break
;
case
wsrep
:
:
e_append_fragment_error
:
case
wsrep
:
:
e_append_fragment_error
:
/* TODO: Figure out better error number */
/* TODO: Figure out better error number */
wsrep_override_error
(
thd
,
ER_ERROR_DURING_COMMIT
,
status
);
wsrep_override_error
(
thd
,
ER_ERROR_DURING_COMMIT
,
0
,
status
);
break
;
break
;
case
wsrep
:
:
e_not_supported_error
:
case
wsrep
:
:
e_not_supported_error
:
wsrep_override_error
(
thd
,
ER_NOT_SUPPORTED_YET
);
wsrep_override_error
(
thd
,
ER_NOT_SUPPORTED_YET
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment