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
a1d1f1eb
Commit
a1d1f1eb
authored
Feb 12, 2009
by
Sergey Vojtovich
Browse files
Options
Browse Files
Download
Plain Diff
Merge 5.1-bugteam (local) -> 5.1-bugteam.
parents
8006c5cd
0acdf23f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
1 deletion
+34
-1
mysql-test/r/merge.result
mysql-test/r/merge.result
+19
-0
mysql-test/t/merge.test
mysql-test/t/merge.test
+13
-0
storage/myisammrg/myrg_open.c
storage/myisammrg/myrg_open.c
+2
-1
No files found.
mysql-test/r/merge.result
View file @
a1d1f1eb
...
...
@@ -2041,4 +2041,23 @@ EXPLAIN SELECT COUNT(*) FROM t4;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Select tables optimized away
DROP TABLE t1, t2, t3, t4;
CREATE TABLE t1(a INT, KEY(a));
INSERT INTO t1 VALUES(0),(1),(2),(3),(4);
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
test.t1 analyze status OK
CREATE TABLE m1(a INT, KEY(a)) ENGINE=MERGE UNION=(t1);
SELECT CARDINALITY FROM INFORMATION_SCHEMA.STATISTICS WHERE TABLE_SCHEMA='test' AND TABLE_NAME='m1';
CARDINALITY
5
SELECT CARDINALITY FROM INFORMATION_SCHEMA.STATISTICS WHERE TABLE_SCHEMA='test' AND TABLE_NAME='m1';
CARDINALITY
5
SELECT CARDINALITY FROM INFORMATION_SCHEMA.STATISTICS WHERE TABLE_SCHEMA='test' AND TABLE_NAME='m1';
CARDINALITY
5
SELECT CARDINALITY FROM INFORMATION_SCHEMA.STATISTICS WHERE TABLE_SCHEMA='test' AND TABLE_NAME='m1';
CARDINALITY
5
DROP TABLE t1, m1;
End of 5.1 tests
mysql-test/t/merge.test
View file @
a1d1f1eb
...
...
@@ -1435,4 +1435,17 @@ EXPLAIN SELECT COUNT(*) FROM t1;
EXPLAIN
SELECT
COUNT
(
*
)
FROM
t4
;
DROP
TABLE
t1
,
t2
,
t3
,
t4
;
#
# BUG#39185 - Cardinality for merge tables calculated incorrectly.
#
CREATE
TABLE
t1
(
a
INT
,
KEY
(
a
));
INSERT
INTO
t1
VALUES
(
0
),(
1
),(
2
),(
3
),(
4
);
ANALYZE
TABLE
t1
;
CREATE
TABLE
m1
(
a
INT
,
KEY
(
a
))
ENGINE
=
MERGE
UNION
=
(
t1
);
SELECT
CARDINALITY
FROM
INFORMATION_SCHEMA
.
STATISTICS
WHERE
TABLE_SCHEMA
=
'test'
AND
TABLE_NAME
=
'm1'
;
SELECT
CARDINALITY
FROM
INFORMATION_SCHEMA
.
STATISTICS
WHERE
TABLE_SCHEMA
=
'test'
AND
TABLE_NAME
=
'm1'
;
SELECT
CARDINALITY
FROM
INFORMATION_SCHEMA
.
STATISTICS
WHERE
TABLE_SCHEMA
=
'test'
AND
TABLE_NAME
=
'm1'
;
SELECT
CARDINALITY
FROM
INFORMATION_SCHEMA
.
STATISTICS
WHERE
TABLE_SCHEMA
=
'test'
AND
TABLE_NAME
=
'm1'
;
DROP
TABLE
t1
,
m1
;
--
echo
End
of
5.1
tests
storage/myisammrg/myrg_open.c
View file @
a1d1f1eb
...
...
@@ -428,10 +428,11 @@ int myrg_attach_children(MYRG_INFO *m_info, int handle_locking,
if
(
!
m_info
->
rec_per_key_part
)
{
if
(
!
(
m_info
->
rec_per_key_part
=
(
ulong
*
)
my_malloc
(
key_parts
*
sizeof
(
long
),
MYF
(
MY_WME
|
MY_ZEROFILL
))))
my_malloc
(
key_parts
*
sizeof
(
long
),
MYF
(
MY_WME
))))
goto
err
;
/* purecov: inspected */
errpos
=
1
;
}
bzero
((
char
*
)
m_info
->
rec_per_key_part
,
key_parts
*
sizeof
(
long
));
}
/* Add MyISAM table 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