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
88cc3915
Commit
88cc3915
authored
Mar 16, 2010
by
Sergey Vojtovich
Browse files
Options
Browse Files
Download
Plain Diff
Merge fix for BUG47444 to mysql-5.1-bugteam.
parents
6eff1091
5522afe1
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
43 additions
and
10 deletions
+43
-10
include/mysql/plugin.h
include/mysql/plugin.h
+3
-3
mysql-test/r/myisam.result
mysql-test/r/myisam.result
+19
-0
mysql-test/t/myisam.test
mysql-test/t/myisam.test
+14
-0
storage/myisam/sort.c
storage/myisam/sort.c
+7
-7
No files found.
include/mysql/plugin.h
View file @
88cc3915
...
@@ -396,12 +396,12 @@ struct st_mysql_plugin
...
@@ -396,12 +396,12 @@ struct st_mysql_plugin
int
type
;
/* the plugin type (a MYSQL_XXX_PLUGIN value) */
int
type
;
/* the plugin type (a MYSQL_XXX_PLUGIN value) */
void
*
info
;
/* pointer to type-specific plugin descriptor */
void
*
info
;
/* pointer to type-specific plugin descriptor */
const
char
*
name
;
/* plugin name */
const
char
*
name
;
/* plugin name */
const
char
*
author
;
/* plugin author (for
SHOW PLUGINS)
*/
const
char
*
author
;
/* plugin author (for
I_S.PLUGINS)
*/
const
char
*
descr
;
/* general descriptive text (for
SHOW PLUGINS )
*/
const
char
*
descr
;
/* general descriptive text (for
I_S.PLUGINS)
*/
int
license
;
/* the plugin license (PLUGIN_LICENSE_XXX) */
int
license
;
/* the plugin license (PLUGIN_LICENSE_XXX) */
int
(
*
init
)(
void
*
);
/* the function to invoke when plugin is loaded */
int
(
*
init
)(
void
*
);
/* the function to invoke when plugin is loaded */
int
(
*
deinit
)(
void
*
);
/* the function to invoke when plugin is unloaded */
int
(
*
deinit
)(
void
*
);
/* the function to invoke when plugin is unloaded */
unsigned
int
version
;
/* plugin version (for
SHOW PLUGINS)
*/
unsigned
int
version
;
/* plugin version (for
I_S.PLUGINS)
*/
struct
st_mysql_show_var
*
status_vars
;
struct
st_mysql_show_var
*
status_vars
;
struct
st_mysql_sys_var
**
system_vars
;
struct
st_mysql_sys_var
**
system_vars
;
void
*
__reserved1
;
/* reserved for dependency checking */
void
*
__reserved1
;
/* reserved for dependency checking */
...
...
mysql-test/r/myisam.result
View file @
88cc3915
...
@@ -2389,4 +2389,23 @@ SELECT * FROM t1, t1 AS a1 WHERE t1.a=1 AND a1.a=1;
...
@@ -2389,4 +2389,23 @@ SELECT * FROM t1, t1 AS a1 WHERE t1.a=1 AND a1.a=1;
a a
a a
1 1
1 1
DROP TABLE t1;
DROP TABLE t1;
#
# BUG#47444 - --myisam_repair_threads>1can result in all index
#
cardinalities=1
#
SET myisam_repair_threads=2;
SET myisam_sort_buffer_size=4096;
CREATE TABLE t1(a CHAR(255), KEY(a), KEY(a), KEY(a));
INSERT INTO t1 VALUES (0),(1),(2),(3),(4),(5),(6),(7),(8),(9),(0),(1),(2),(3);
REPAIR TABLE t1;
Table Op Msg_type Msg_text
test.t1 repair status OK
SELECT CARDINALITY FROM INFORMATION_SCHEMA.STATISTICS WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t1';
CARDINALITY
14
14
14
DROP TABLE t1;
SET myisam_sort_buffer_size=@@global.myisam_sort_buffer_size;
SET myisam_repair_threads=@@global.myisam_repair_threads;
End of 5.1 tests
End of 5.1 tests
mysql-test/t/myisam.test
View file @
88cc3915
...
@@ -1631,4 +1631,18 @@ INSERT INTO t1 VALUES('1');
...
@@ -1631,4 +1631,18 @@ INSERT INTO t1 VALUES('1');
SELECT
*
FROM
t1
,
t1
AS
a1
WHERE
t1
.
a
=
1
AND
a1
.
a
=
1
;
SELECT
*
FROM
t1
,
t1
AS
a1
WHERE
t1
.
a
=
1
AND
a1
.
a
=
1
;
DROP
TABLE
t1
;
DROP
TABLE
t1
;
--
echo
#
--
echo
# BUG#47444 - --myisam_repair_threads>1can result in all index
--
echo
# cardinalities=1
--
echo
#
SET
myisam_repair_threads
=
2
;
SET
myisam_sort_buffer_size
=
4096
;
CREATE
TABLE
t1
(
a
CHAR
(
255
),
KEY
(
a
),
KEY
(
a
),
KEY
(
a
));
INSERT
INTO
t1
VALUES
(
0
),(
1
),(
2
),(
3
),(
4
),(
5
),(
6
),(
7
),(
8
),(
9
),(
0
),(
1
),(
2
),(
3
);
REPAIR
TABLE
t1
;
SELECT
CARDINALITY
FROM
INFORMATION_SCHEMA
.
STATISTICS
WHERE
TABLE_SCHEMA
=
'test'
AND
TABLE_NAME
=
't1'
;
DROP
TABLE
t1
;
SET
myisam_sort_buffer_size
=@@
global
.
myisam_sort_buffer_size
;
SET
myisam_repair_threads
=@@
global
.
myisam_repair_threads
;
--
echo
End
of
5.1
tests
--
echo
End
of
5.1
tests
storage/myisam/sort.c
View file @
88cc3915
...
@@ -506,7 +506,7 @@ int thr_write_keys(MI_SORT_PARAM *sort_param)
...
@@ -506,7 +506,7 @@ int thr_write_keys(MI_SORT_PARAM *sort_param)
for
(
i
=
0
,
sinfo
=
sort_param
;
for
(
i
=
0
,
sinfo
=
sort_param
;
i
<
sort_info
->
total_keys
;
i
<
sort_info
->
total_keys
;
i
++
,
rec_per_key_part
+=
sinfo
->
keyinfo
->
keysegs
,
sinfo
++
)
i
++
,
sinfo
++
)
{
{
if
(
!
sinfo
->
sort_keys
)
if
(
!
sinfo
->
sort_keys
)
{
{
...
@@ -529,11 +529,6 @@ int thr_write_keys(MI_SORT_PARAM *sort_param)
...
@@ -529,11 +529,6 @@ int thr_write_keys(MI_SORT_PARAM *sort_param)
flush_ft_buf
(
sinfo
)
||
flush_pending_blocks
(
sinfo
))
flush_ft_buf
(
sinfo
)
||
flush_pending_blocks
(
sinfo
))
got_error
=
1
;
got_error
=
1
;
}
}
if
(
!
got_error
&&
param
->
testflag
&
T_STATISTICS
)
update_key_parts
(
sinfo
->
keyinfo
,
rec_per_key_part
,
sinfo
->
unique
,
param
->
stats_method
==
MI_STATS_METHOD_IGNORE_NULLS
?
sinfo
->
notnull
:
NULL
,
(
ulonglong
)
info
->
state
->
records
);
}
}
my_free
((
uchar
*
)
sinfo
->
sort_keys
,
MYF
(
0
));
my_free
((
uchar
*
)
sinfo
->
sort_keys
,
MYF
(
0
));
my_free
(
mi_get_rec_buff_ptr
(
info
,
sinfo
->
rec_buff
),
my_free
(
mi_get_rec_buff_ptr
(
info
,
sinfo
->
rec_buff
),
...
@@ -547,7 +542,7 @@ int thr_write_keys(MI_SORT_PARAM *sort_param)
...
@@ -547,7 +542,7 @@ int thr_write_keys(MI_SORT_PARAM *sort_param)
delete_dynamic
(
&
sinfo
->
buffpek
),
delete_dynamic
(
&
sinfo
->
buffpek
),
close_cached_file
(
&
sinfo
->
tempfile
),
close_cached_file
(
&
sinfo
->
tempfile
),
close_cached_file
(
&
sinfo
->
tempfile_for_exceptions
),
close_cached_file
(
&
sinfo
->
tempfile_for_exceptions
),
sinfo
++
)
rec_per_key_part
+=
sinfo
->
keyinfo
->
keysegs
,
sinfo
++
)
{
{
if
(
got_error
)
if
(
got_error
)
continue
;
continue
;
...
@@ -639,6 +634,11 @@ int thr_write_keys(MI_SORT_PARAM *sort_param)
...
@@ -639,6 +634,11 @@ int thr_write_keys(MI_SORT_PARAM *sort_param)
got_error
=
1
;
got_error
=
1
;
}
}
}
}
if
(
!
got_error
&&
param
->
testflag
&
T_STATISTICS
)
update_key_parts
(
sinfo
->
keyinfo
,
rec_per_key_part
,
sinfo
->
unique
,
param
->
stats_method
==
MI_STATS_METHOD_IGNORE_NULLS
?
sinfo
->
notnull
:
NULL
,
(
ulonglong
)
info
->
state
->
records
);
}
}
my_free
((
uchar
*
)
mergebuf
,
MYF
(
MY_ALLOW_ZERO_PTR
));
my_free
((
uchar
*
)
mergebuf
,
MYF
(
MY_ALLOW_ZERO_PTR
));
DBUG_RETURN
(
got_error
);
DBUG_RETURN
(
got_error
);
...
...
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