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
84b0ac67
Commit
84b0ac67
authored
Apr 29, 2016
by
Daniel Black
Committed by
Sergei Golubchik
Apr 29, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Whitespace fix for mysql_checksum_table function
parent
1ba90cea
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
26 deletions
+26
-26
sql/sql_table.cc
sql/sql_table.cc
+26
-26
No files found.
sql/sql_table.cc
View file @
84b0ac67
...
...
@@ -9744,23 +9744,23 @@ bool mysql_checksum_table(THD *thd, TABLE_LIST *tables,
if
(
!
(
check_opt
->
flags
&
T_EXTEND
)
&&
(((
t
->
file
->
ha_table_flags
()
&
HA_HAS_OLD_CHECKSUM
)
&&
thd
->
variables
.
old_mode
)
||
((
t
->
file
->
ha_table_flags
()
&
HA_HAS_NEW_CHECKSUM
)
&&
!
thd
->
variables
.
old_mode
)))
protocol
->
store
((
ulonglong
)
t
->
file
->
checksum
());
protocol
->
store
((
ulonglong
)
t
->
file
->
checksum
());
else
if
(
check_opt
->
flags
&
T_QUICK
)
protocol
->
store_null
();
protocol
->
store_null
();
else
{
/* calculating table's checksum */
ha_checksum
crc
=
0
;
/* calculating table's checksum */
ha_checksum
crc
=
0
;
uchar
null_mask
=
256
-
(
1
<<
t
->
s
->
last_null_bit_pos
);
t
->
use_all_columns
();
if
(
t
->
file
->
ha_rnd_init
(
1
))
protocol
->
store_null
();
else
{
for
(;;)
{
if
(
t
->
file
->
ha_rnd_init
(
1
))
protocol
->
store_null
();
else
{
for
(;;)
{
if
(
thd
->
killed
)
{
/*
...
...
@@ -9771,7 +9771,7 @@ bool mysql_checksum_table(THD *thd, TABLE_LIST *tables,
thd
->
protocol
->
remove_last_row
();
goto
err
;
}
ha_checksum
row_crc
=
0
;
ha_checksum
row_crc
=
0
;
int
error
=
t
->
file
->
ha_rnd_next
(
t
->
record
[
0
]);
if
(
unlikely
(
error
))
{
...
...
@@ -9779,21 +9779,21 @@ bool mysql_checksum_table(THD *thd, TABLE_LIST *tables,
continue
;
break
;
}
if
(
t
->
s
->
null_bytes
)
if
(
t
->
s
->
null_bytes
)
{
/* fix undefined null bits */
t
->
record
[
0
][
t
->
s
->
null_bytes
-
1
]
|=
null_mask
;
if
(
!
(
t
->
s
->
db_create_options
&
HA_OPTION_PACK_RECORD
))
t
->
record
[
0
][
0
]
|=
1
;
row_crc
=
my_checksum
(
row_crc
,
t
->
record
[
0
],
t
->
s
->
null_bytes
);
row_crc
=
my_checksum
(
row_crc
,
t
->
record
[
0
],
t
->
s
->
null_bytes
);
}
uchar
*
checksum_start
=
NULL
;
size_t
checksum_length
=
0
;
for
(
uint
i
=
0
;
i
<
t
->
s
->
fields
;
i
++
)
{
Field
*
f
=
t
->
field
[
i
];
uchar
*
checksum_start
=
NULL
;
size_t
checksum_length
=
0
;
for
(
uint
i
=
0
;
i
<
t
->
s
->
fields
;
i
++
)
{
Field
*
f
=
t
->
field
[
i
];
if
(
!
thd
->
variables
.
old_mode
&&
f
->
is_real_null
(
0
))
continue
;
...
...
@@ -9840,16 +9840,16 @@ bool mysql_checksum_table(THD *thd, TABLE_LIST *tables,
checksum_length
=
f
->
pack_length
();
}
break
;
}
}
if
(
checksum_start
)
row_crc
=
my_checksum
(
row_crc
,
checksum_start
,
checksum_length
);
}
}
if
(
checksum_start
)
row_crc
=
my_checksum
(
row_crc
,
checksum_start
,
checksum_length
);
crc
+=
row_crc
;
}
protocol
->
store
((
ulonglong
)
crc
);
crc
+=
row_crc
;
}
protocol
->
store
((
ulonglong
)
crc
);
t
->
file
->
ha_rnd_end
();
}
}
}
trans_rollback_stmt
(
thd
);
close_thread_tables
(
thd
);
...
...
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