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
01b3cb2f
Commit
01b3cb2f
authored
Jun 30, 2022
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cleanup: whitespace, etc
parent
93049e3d
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
43 additions
and
58 deletions
+43
-58
mysql-test/main/alter_table_online_debug.result
mysql-test/main/alter_table_online_debug.result
+2
-6
mysql-test/main/alter_table_online_debug.test
mysql-test/main/alter_table_online_debug.test
+2
-6
sql/log_event.h
sql/log_event.h
+3
-4
sql/log_event_server.cc
sql/log_event_server.cc
+6
-9
sql/rpl_record.cc
sql/rpl_record.cc
+28
-31
sql/wsrep_mysqld.cc
sql/wsrep_mysqld.cc
+2
-2
No files found.
mysql-test/main/alter_table_online_debug.result
View file @
01b3cb2f
...
...
@@ -28,9 +28,8 @@ insert t1 values (5), (5);
connection con2;
set debug_sync= 'now WAIT_FOR ended';
connection default;
set session lock_wait_timeout=1;
set debug_sync= 'alter_table_copy_end SIGNAL ended WAIT_FOR end';
alter table t1 add unique (a), algorithm= copy, lock= none;
alter table t1
nowait
add unique (a), algorithm= copy, lock= none;
connection con2;
start transaction;
insert into t1 values (123), (456), (789);
...
...
@@ -51,7 +50,6 @@ a
select variable_value-@otd from information_schema.session_status where variable_name='Opened_table_definitions';
variable_value-@otd
1
set session lock_wait_timeout=default;
# long transaction and add column
create or replace table t1 (a int);
insert t1 values (5);
...
...
@@ -59,8 +57,7 @@ connection con2;
set debug_sync= 'now WAIT_FOR ended';
connection default;
set debug_sync= 'alter_table_copy_end SIGNAL ended WAIT_FOR end';
set session lock_wait_timeout=1;
alter table t1 add b int NULL, algorithm= copy, lock= none;
alter table t1 nowait add b int NULL, algorithm= copy, lock= none;
connection con2;
start transaction;
insert into t1 values (123), (456), (789);
...
...
@@ -70,7 +67,6 @@ ERROR HY000: Lock wait timeout exceeded; try restarting transaction
select * from t1;
a
5
set session lock_wait_timeout=default;
connection con2;
rollback;
connection default;
...
...
mysql-test/main/alter_table_online_debug.test
View file @
01b3cb2f
...
...
@@ -43,11 +43,10 @@ insert t1 values (5), (5);
set
debug_sync
=
'now WAIT_FOR ended'
;
--
connection
default
set
session
lock_wait_timeout
=
1
;
set
debug_sync
=
'alter_table_copy_end SIGNAL ended WAIT_FOR end'
;
--
send
alter
table
t1
add
unique
(
a
),
algorithm
=
copy
,
lock
=
none
;
alter
table
t1
nowait
add
unique
(
a
),
algorithm
=
copy
,
lock
=
none
;
--
connection
con2
--
reap
...
...
@@ -64,7 +63,6 @@ commit;
select
variable_value
into
@
otd
from
information_schema
.
session_status
where
variable_name
=
'Opened_table_definitions'
;
select
*
from
t1
;
select
variable_value
-@
otd
from
information_schema
.
session_status
where
variable_name
=
'Opened_table_definitions'
;
set
session
lock_wait_timeout
=
default
;
--
echo
# long transaction and add column
create
or
replace
table
t1
(
a
int
);
...
...
@@ -76,9 +74,8 @@ set debug_sync= 'now WAIT_FOR ended';
--
connection
default
set
debug_sync
=
'alter_table_copy_end SIGNAL ended WAIT_FOR end'
;
set
session
lock_wait_timeout
=
1
;
--
send
alter
table
t1
add
b
int
NULL
,
algorithm
=
copy
,
lock
=
none
;
alter
table
t1
nowait
add
b
int
NULL
,
algorithm
=
copy
,
lock
=
none
;
--
connection
con2
--
reap
...
...
@@ -90,7 +87,6 @@ set debug_sync= 'now SIGNAL end';
--
error
ER_LOCK_WAIT_TIMEOUT
--
reap
select
*
from
t1
;
set
session
lock_wait_timeout
=
default
;
--
connection
con2
rollback
;
--
connection
default
...
...
sql/log_event.h
View file @
01b3cb2f
...
...
@@ -4823,8 +4823,7 @@ class Rows_log_event : public Log_event
return
::
unpack_row
(
rgi
,
m_table
,
m_width
,
m_curr_row
,
&
m_cols
,
&
m_curr_row_end
,
&
m_master_reclength
,
m_rows_end
);
}
bool
process_triggers
(
trg_event_type
event
,
trg_action_time_type
time_type
,
bool
process_triggers
(
trg_event_type
event
,
trg_action_time_type
time_type
,
bool
old_row_is_record1
);
/**
...
...
sql/log_event_server.cc
View file @
01b3cb2f
...
...
@@ -7270,7 +7270,8 @@ int Rows_log_event::find_row(rpl_group_info *rgi)
{
DBUG_ENTER
(
"Rows_log_event::find_row"
);
DBUG_ASSERT
(
m_table
&&
m_table
->
in_use
!=
NULL
);
DBUG_ASSERT
(
m_table
);
DBUG_ASSERT
(
m_table
->
in_use
!=
NULL
);
TABLE
*
table
=
m_table
;
int
error
=
0
;
...
...
@@ -7327,7 +7328,6 @@ int Rows_log_event::find_row(rpl_group_info *rgi)
table->s->reclength) == 0);
*/
int
error
;
DBUG_PRINT
(
"info"
,(
"locating record using primary key (position)"
));
error
=
table
->
file
->
ha_rnd_pos_by_record
(
table
->
record
[
0
]);
...
...
@@ -7389,10 +7389,9 @@ int Rows_log_event::find_row(rpl_group_info *rgi)
table
->
record
[
0
][
table
->
s
->
null_bytes
-
1
]
|=
256U
-
(
1U
<<
table
->
s
->
last_null_bit_pos
);
if
(
unlikely
((
error
=
table
->
file
->
ha_index_read_map
(
table
->
record
[
0
],
m_key
,
HA_WHOLE_KEY
,
HA_READ_KEY_EXACT
))))
error
=
table
->
file
->
ha_index_read_map
(
table
->
record
[
0
],
m_key
,
HA_WHOLE_KEY
,
HA_READ_KEY_EXACT
);
if
(
unlikely
(
error
))
{
DBUG_PRINT
(
"info"
,(
"no record matching the key found in the table"
));
if
(
error
==
HA_ERR_KEY_NOT_FOUND
)
...
...
@@ -7498,9 +7497,7 @@ int Rows_log_event::find_row(rpl_group_info *rgi)
/* Continue until we find the right record or have made a full loop */
do
{
error
=
table
->
file
->
ha_rnd_next
(
table
->
record
[
0
]);
if
(
unlikely
(
error
))
if
(
unlikely
((
error
=
table
->
file
->
ha_rnd_next
(
table
->
record
[
0
]))))
DBUG_PRINT
(
"info"
,
(
"error: %s"
,
HA_ERR
(
error
)));
switch
(
error
)
{
...
...
sql/rpl_record.cc
View file @
01b3cb2f
...
...
@@ -144,7 +144,33 @@ pack_row(TABLE *table, MY_BITMAP const* cols,
#endif
#if !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION)
static
int
fill_extra_persistent_columns
(
TABLE
*
table
,
int
master_cols
);
/**
Fills @c table->record[0] with computed values of extra persistent column
which are present on slave but not on master.
@param table Table whose record[0] buffer is prepared.
@param master_cols No of columns on master
@returns 0 on success
*/
static
int
fill_extra_persistent_columns
(
TABLE
*
table
,
int
master_cols
)
{
int
error
=
0
;
if
(
!
table
->
vfield
)
return
0
;
for
(
Field
**
vfield_ptr
=
table
->
vfield
;
*
vfield_ptr
;
++
vfield_ptr
)
{
Field
*
vfield
=
*
vfield_ptr
;
if
(
vfield
->
field_index
>=
master_cols
&&
(
vfield
->
stored_in_db
()
||
(
vfield
->
flags
&
(
PART_KEY_FLAG
|
PART_INDIRECT_KEY_FLAG
))))
{
bitmap_set_bit
(
table
->
write_set
,
vfield
->
field_index
);
error
=
vfield
->
vcol_info
->
expr
->
save_in_field
(
vfield
,
0
);
}
}
return
error
;
}
/**
Unpack a row into @c table->record[0].
...
...
@@ -190,9 +216,7 @@ static int fill_extra_persistent_columns(TABLE *table, int master_cols);
@retval HA_ERR_CORRUPT_EVENT
Found error when trying to unpack fields.
*/
int
unpack_row
(
rpl_group_info
*
rgi
,
TABLE
*
table
,
uint
const
colcnt
,
int
unpack_row
(
rpl_group_info
*
rgi
,
TABLE
*
table
,
uint
const
colcnt
,
uchar
const
*
const
row_data
,
MY_BITMAP
const
*
cols
,
uchar
const
**
const
current_row_end
,
ulong
*
const
master_reclength
,
uchar
const
*
const
row_end
)
...
...
@@ -497,31 +521,4 @@ int prepare_record(TABLE *const table, const uint skip, const bool check)
DBUG_RETURN
(
0
);
}
/**
Fills @c table->record[0] with computed values of extra persistent column
which are present on slave but not on master.
@param table Table whose record[0] buffer is prepared.
@param master_cols No of columns on master
@returns 0 on success
*/
static
int
fill_extra_persistent_columns
(
TABLE
*
table
,
int
master_cols
)
{
int
error
=
0
;
Field
**
vfield_ptr
,
*
vfield
;
if
(
!
table
->
vfield
)
return
0
;
for
(
vfield_ptr
=
table
->
vfield
;
*
vfield_ptr
;
++
vfield_ptr
)
{
vfield
=
*
vfield_ptr
;
if
(
vfield
->
field_index
>=
master_cols
&&
(
vfield
->
stored_in_db
()
||
(
vfield
->
flags
&
(
PART_KEY_FLAG
|
PART_INDIRECT_KEY_FLAG
))))
{
bitmap_set_bit
(
table
->
write_set
,
vfield
->
field_index
);
error
=
vfield
->
vcol_info
->
expr
->
save_in_field
(
vfield
,
0
);
}
}
return
error
;
}
#endif // HAVE_REPLICATION
sql/wsrep_mysqld.cc
View file @
01b3cb2f
...
...
@@ -3463,8 +3463,8 @@ int wsrep_ignored_error_code(Log_event* ev, int error)
const
THD
*
thd
=
ev
->
thd
;
DBUG_ASSERT
(
error
);
DBUG_ASSERT
(
wsrep_thd_is_applying
(
thd
)
&&
!
wsrep_thd_is_local_toi
(
thd
));
DBUG_ASSERT
(
wsrep_thd_is_applying
(
thd
)
);
DBUG_ASSERT
(
!
wsrep_thd_is_local_toi
(
thd
));
if
((
wsrep_ignore_apply_errors
&
WSREP_IGNORE_ERRORS_ON_RECONCILING_DML
))
{
...
...
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