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
20782321
Commit
20782321
authored
Jun 29, 2007
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge synthia.local:/home/mydev/mysql-5.0-amain
into synthia.local:/home/mydev/mysql-5.0-axmrg
parents
30f5af6f
f5693a39
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
65 additions
and
17 deletions
+65
-17
mysql-test/r/archive-big.result
mysql-test/r/archive-big.result
+19
-0
mysql-test/r/archive.result
mysql-test/r/archive.result
+7
-0
mysql-test/t/archive-big.test
mysql-test/t/archive-big.test
+25
-0
mysql-test/t/archive.test
mysql-test/t/archive.test
+9
-0
sql/ha_archive.cc
sql/ha_archive.cc
+5
-17
No files found.
mysql-test/r/archive-big.result
0 → 100644
View file @
20782321
CREATE TABLE t1(a BLOB) ENGINE=ARCHIVE;
INSERT INTO t1 SELECT * FROM t1;
INSERT INTO t1 SELECT * FROM t1;
INSERT INTO t1 SELECT * FROM t1;
INSERT INTO t1 SELECT * FROM t1;
INSERT INTO t1 SELECT * FROM t1;
INSERT INTO t1 SELECT * FROM t1;
INSERT INTO t1 SELECT * FROM t1;
INSERT INTO t1 SELECT * FROM t1;
INSERT INTO t1 SELECT * FROM t1;
INSERT INTO t1 SELECT * FROM t1;
INSERT INTO t1 SELECT * FROM t1;
INSERT INTO t1 SELECT * FROM t1;
INSERT INTO t1 SELECT * FROM t1;
INSERT INTO t1 SELECT * FROM t1;
INSERT INTO t1 SELECT * FROM t1;
INSERT INTO t1 SELECT * FROM t1;
INSERT INTO t1 SELECT * FROM t1;
DROP TABLE t1;
mysql-test/r/archive.result
View file @
20782321
...
@@ -12364,3 +12364,10 @@ select * from t1;
...
@@ -12364,3 +12364,10 @@ select * from t1;
i
i
1
1
drop table t1;
drop table t1;
create table t1(a longblob) engine=archive;
insert into t1 set a='';
insert into t1 set a='a';
check table t1 extended;
Table Op Msg_type Msg_text
test.t1 check status OK
drop table t1;
mysql-test/t/archive-big.test
0 → 100644
View file @
20782321
This diff is collapsed.
Click to expand it.
mysql-test/t/archive.test
View file @
20782321
...
@@ -1374,3 +1374,12 @@ insert into t1 values (1);
...
@@ -1374,3 +1374,12 @@ insert into t1 values (1);
repair
table
t1
use_frm
;
repair
table
t1
use_frm
;
select
*
from
t1
;
select
*
from
t1
;
drop
table
t1
;
drop
table
t1
;
#
# BUG#29207 - archive table reported as corrupt by check table
#
create
table
t1
(
a
longblob
)
engine
=
archive
;
insert
into
t1
set
a
=
''
;
insert
into
t1
set
a
=
'a'
;
check
table
t1
extended
;
drop
table
t1
;
sql/ha_archive.cc
View file @
20782321
...
@@ -205,7 +205,7 @@ bool archive_db_init()
...
@@ -205,7 +205,7 @@ bool archive_db_init()
else
else
{
{
zoffset_size
=
2
<<
((
zlibCompileFlags
()
>>
6
)
&
3
);
zoffset_size
=
2
<<
((
zlibCompileFlags
()
>>
6
)
&
3
);
switch
(
sizeof
(
z_off_t
)
)
{
switch
(
zoffset_size
)
{
case
2
:
case
2
:
max_zfile_size
=
INT_MAX16
;
max_zfile_size
=
INT_MAX16
;
break
;
break
;
...
@@ -676,6 +676,7 @@ int ha_archive::real_write_row(byte *buf, gzFile writer)
...
@@ -676,6 +676,7 @@ int ha_archive::real_write_row(byte *buf, gzFile writer)
total_row_length
+=
((
Field_blob
*
)
table
->
field
[
*
ptr
])
->
get_length
();
total_row_length
+=
((
Field_blob
*
)
table
->
field
[
*
ptr
])
->
get_length
();
if
(
share
->
approx_file_size
>
max_zfile_size
-
total_row_length
)
if
(
share
->
approx_file_size
>
max_zfile_size
-
total_row_length
)
{
{
gzflush
(
writer
,
Z_SYNC_FLUSH
);
info
(
HA_STATUS_TIME
);
info
(
HA_STATUS_TIME
);
share
->
approx_file_size
=
(
ulong
)
data_file_length
;
share
->
approx_file_size
=
(
ulong
)
data_file_length
;
if
(
share
->
approx_file_size
>
max_zfile_size
-
total_row_length
)
if
(
share
->
approx_file_size
>
max_zfile_size
-
total_row_length
)
...
@@ -1204,7 +1205,6 @@ bool ha_archive::is_crashed() const
...
@@ -1204,7 +1205,6 @@ bool ha_archive::is_crashed() const
int
ha_archive
::
check
(
THD
*
thd
,
HA_CHECK_OPT
*
check_opt
)
int
ha_archive
::
check
(
THD
*
thd
,
HA_CHECK_OPT
*
check_opt
)
{
{
int
rc
=
0
;
int
rc
=
0
;
byte
*
buf
;
const
char
*
old_proc_info
=
thd
->
proc_info
;
const
char
*
old_proc_info
=
thd
->
proc_info
;
ha_rows
count
=
share
->
rows_recorded
;
ha_rows
count
=
share
->
rows_recorded
;
DBUG_ENTER
(
"ha_archive::check"
);
DBUG_ENTER
(
"ha_archive::check"
);
...
@@ -1213,25 +1213,13 @@ int ha_archive::check(THD* thd, HA_CHECK_OPT* check_opt)
...
@@ -1213,25 +1213,13 @@ int ha_archive::check(THD* thd, HA_CHECK_OPT* check_opt)
/* Flush any waiting data */
/* Flush any waiting data */
gzflush
(
share
->
archive_write
,
Z_SYNC_FLUSH
);
gzflush
(
share
->
archive_write
,
Z_SYNC_FLUSH
);
/*
First we create a buffer that we can use for reading rows, and can pass
to get_row().
*/
if
(
!
(
buf
=
(
byte
*
)
my_malloc
(
table
->
s
->
reclength
,
MYF
(
MY_WME
))))
rc
=
HA_ERR_OUT_OF_MEM
;
/*
/*
Now we will rewind the archive file so that we are positioned at the
Now we will rewind the archive file so that we are positioned at the
start of the file.
start of the file.
*/
*/
if
(
!
rc
)
read_data_header
(
archive
);
read_data_header
(
archive
);
while
(
!
(
rc
=
get_row
(
archive
,
table
->
record
[
0
])))
count
--
;
if
(
!
rc
)
while
(
!
(
rc
=
get_row
(
archive
,
buf
)))
count
--
;
my_free
((
char
*
)
buf
,
MYF
(
0
));
thd
->
proc_info
=
old_proc_info
;
thd
->
proc_info
=
old_proc_info
;
...
...
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