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
4bb22b34
Commit
4bb22b34
authored
Sep 10, 2009
by
Sergey Vojtovich
Browse files
Options
Browse Files
Download
Plain Diff
Local merge.
parents
0d7ee91c
04ed3c9d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
2 deletions
+25
-2
mysql-test/r/archive.result
mysql-test/r/archive.result
+11
-0
mysql-test/t/archive.test
mysql-test/t/archive.test
+11
-0
storage/archive/ha_archive.cc
storage/archive/ha_archive.cc
+3
-2
No files found.
mysql-test/r/archive.result
View file @
4bb22b34
...
...
@@ -12695,3 +12695,14 @@ a b
1 NULL
2 NULL
DROP TABLE t1;
CREATE TABLE t1(a INT, b BLOB) ENGINE=archive;
SELECT DATA_LENGTH, AVG_ROW_LENGTH FROM
INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME='t1' AND TABLE_SCHEMA='test';
DATA_LENGTH AVG_ROW_LENGTH
8666 15
INSERT INTO t1 VALUES(1, 'sampleblob1'),(2, 'sampleblob2');
SELECT DATA_LENGTH, AVG_ROW_LENGTH FROM
INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME='t1' AND TABLE_SCHEMA='test';
DATA_LENGTH AVG_ROW_LENGTH
8700 4350
DROP TABLE t1;
mysql-test/t/archive.test
View file @
4bb22b34
...
...
@@ -1599,3 +1599,14 @@ INSERT INTO t1 VALUES (NULL, NULL),(NULL, NULL);
FLUSH
TABLE
t1
;
SELECT
*
FROM
t1
ORDER
BY
a
;
DROP
TABLE
t1
;
#
# BUG#29203 - archive tables have weird values in show table status
#
CREATE
TABLE
t1
(
a
INT
,
b
BLOB
)
ENGINE
=
archive
;
SELECT
DATA_LENGTH
,
AVG_ROW_LENGTH
FROM
INFORMATION_SCHEMA
.
TABLES
WHERE
TABLE_NAME
=
't1'
AND
TABLE_SCHEMA
=
'test'
;
INSERT
INTO
t1
VALUES
(
1
,
'sampleblob1'
),(
2
,
'sampleblob2'
);
SELECT
DATA_LENGTH
,
AVG_ROW_LENGTH
FROM
INFORMATION_SCHEMA
.
TABLES
WHERE
TABLE_NAME
=
't1'
AND
TABLE_SCHEMA
=
'test'
;
DROP
TABLE
t1
;
storage/archive/ha_archive.cc
View file @
4bb22b34
...
...
@@ -1472,11 +1472,12 @@ int ha_archive::info(uint flag)
VOID
(
my_stat
(
share
->
data_file_name
,
&
file_stat
,
MYF
(
MY_WME
)));
stats
.
mean_rec_length
=
table
->
s
->
reclength
+
buffer
.
alloced_length
();
stats
.
data_file_length
=
file_stat
.
st_size
;
stats
.
create_time
=
(
ulong
)
file_stat
.
st_ctime
;
stats
.
update_time
=
(
ulong
)
file_stat
.
st_mtime
;
stats
.
max_data_file_length
=
share
->
rows_recorded
*
stats
.
mean_rec_length
;
stats
.
mean_rec_length
=
stats
.
records
?
stats
.
data_file_length
/
stats
.
records
:
table
->
s
->
reclength
;
stats
.
max_data_file_length
=
MAX_FILE_SIZE
;
}
stats
.
delete_length
=
0
;
stats
.
index_file_length
=
0
;
...
...
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