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
5f118b26
Commit
5f118b26
authored
Sep 24, 2019
by
Alexander Barkov
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/5.5' into 10.1
parents
896974fc
67b0faa2
Changes
33
Hide whitespace changes
Inline
Side-by-side
Showing
33 changed files
with
257 additions
and
44 deletions
+257
-44
cmake/os/Linux.cmake
cmake/os/Linux.cmake
+2
-2
mysql-test/r/ctype_binary.result
mysql-test/r/ctype_binary.result
+1
-1
mysql-test/r/ctype_cp1251.result
mysql-test/r/ctype_cp1251.result
+1
-1
mysql-test/r/ctype_latin1.result
mysql-test/r/ctype_latin1.result
+1
-1
mysql-test/r/ctype_ucs.result
mysql-test/r/ctype_ucs.result
+1
-1
mysql-test/r/ctype_utf8.result
mysql-test/r/ctype_utf8.result
+1
-1
mysql-test/r/func_math.result
mysql-test/r/func_math.result
+58
-0
mysql-test/r/func_time.result
mysql-test/r/func_time.result
+1
-1
mysql-test/r/type_newdecimal.result
mysql-test/r/type_newdecimal.result
+64
-0
mysql-test/t/func_math.test
mysql-test/t/func_math.test
+38
-0
mysql-test/t/type_newdecimal.test
mysql-test/t/type_newdecimal.test
+43
-0
scripts/mysqld_safe.sh
scripts/mysqld_safe.sh
+4
-1
sql/item_func.cc
sql/item_func.cc
+8
-1
storage/myisam/NEWS
storage/myisam/NEWS
+2
-2
storage/myisam/ft_boolean_search.c
storage/myisam/ft_boolean_search.c
+1
-1
storage/myisam/ha_myisam.cc
storage/myisam/ha_myisam.cc
+2
-2
storage/myisam/mi_check.c
storage/myisam/mi_check.c
+5
-5
storage/myisam/mi_create.c
storage/myisam/mi_create.c
+1
-1
storage/myisam/mi_delete.c
storage/myisam/mi_delete.c
+1
-1
storage/myisam/mi_dynrec.c
storage/myisam/mi_dynrec.c
+2
-2
storage/myisam/mi_extra.c
storage/myisam/mi_extra.c
+2
-2
storage/myisam/mi_key.c
storage/myisam/mi_key.c
+1
-1
storage/myisam/mi_locking.c
storage/myisam/mi_locking.c
+1
-1
storage/myisam/mi_packrec.c
storage/myisam/mi_packrec.c
+1
-1
storage/myisam/mi_rfirst.c
storage/myisam/mi_rfirst.c
+1
-1
storage/myisam/mi_search.c
storage/myisam/mi_search.c
+1
-1
storage/myisam/mi_test_all.sh
storage/myisam/mi_test_all.sh
+2
-2
storage/myisam/myisamchk.c
storage/myisam/myisamchk.c
+1
-1
storage/myisam/myisamdef.h
storage/myisam/myisamdef.h
+1
-1
storage/myisam/myisamlog.c
storage/myisam/myisamlog.c
+1
-1
storage/myisam/myisampack.c
storage/myisam/myisampack.c
+2
-2
storage/myisam/sort.c
storage/myisam/sort.c
+1
-1
support-files/mysql-log-rotate.sh
support-files/mysql-log-rotate.sh
+5
-5
No files found.
cmake/os/Linux.cmake
View file @
5f118b26
...
...
@@ -26,9 +26,9 @@ SET(CMAKE_REQUIRED_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS} -D_GNU_SOURCE=1)
# Fix CMake (< 2.8) flags. -rdynamic exports too many symbols.
FOREACH
(
LANG C CXX
)
STRING
(
REPLACE
"-rdynamic"
""
STRING
(
REPLACE
"-rdynamic"
""
CMAKE_SHARED_LIBRARY_LINK_
${
LANG
}
_FLAGS
${
CMAKE_SHARED_LIBRARY_LINK_
${
LANG
}
_FLAGS
}
"
${
CMAKE_SHARED_LIBRARY_LINK_
${
LANG
}
_FLAGS
}
"
)
ENDFOREACH
()
...
...
mysql-test/r/ctype_binary.result
View file @
5f118b26
...
...
@@ -102,7 +102,7 @@ create table t1 as select concat(1 % 2) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c1` varbinary(
1
) DEFAULT NULL
`c1` varbinary(
2
) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(-1));
...
...
mysql-test/r/ctype_cp1251.result
View file @
5f118b26
...
...
@@ -496,7 +496,7 @@ create table t1 as select concat(1 % 2) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c1` varchar(
1
) CHARACTER SET cp1251 DEFAULT NULL
`c1` varchar(
2
) CHARACTER SET cp1251 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(-1));
...
...
mysql-test/r/ctype_latin1.result
View file @
5f118b26
...
...
@@ -790,7 +790,7 @@ create table t1 as select concat(1 % 2) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c1` varchar(
1
) DEFAULT NULL
`c1` varchar(
2
) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(-1));
...
...
mysql-test/r/ctype_ucs.result
View file @
5f118b26
...
...
@@ -1723,7 +1723,7 @@ create table t1 as select concat(1 % 2) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c1` varchar(
1
) CHARACTER SET ucs2 DEFAULT NULL
`c1` varchar(
2
) CHARACTER SET ucs2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(-1));
...
...
mysql-test/r/ctype_utf8.result
View file @
5f118b26
...
...
@@ -2565,7 +2565,7 @@ create table t1 as select concat(1 % 2) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c1` varchar(
1
) CHARACTER SET utf8 DEFAULT NULL
`c1` varchar(
2
) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(-1));
...
...
mysql-test/r/func_math.result
View file @
5f118b26
...
...
@@ -796,6 +796,64 @@ STDDEV_SAMP(ROUND('0', 309))
0
DROP TABLE t1;
#
# MDEV-20495 Assertion `precision > 0' failed in decimal_bin_size upon CREATE .. SELECT with zerofilled decimal
#
# Testing that dyadic arithmetic operations are symmetric
# for (+1) and (-1) and produce the same length in CONCAT(),
# because (+1) and (-1) have the same data type: signed int.
CREATE TABLE t1 AS SELECT
CONCAT(+1%2.0),
CONCAT(-1%2.0),
CONCAT(+1/2.0),
CONCAT(-1/2.0),
CONCAT(+1*2.0),
CONCAT(-1*2.0),
CONCAT(+1+2.0),
CONCAT(-1+2.0),
CONCAT(+1-2.0),
CONCAT(-1-2.0);
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`CONCAT(+1%2.0)` varchar(4) DEFAULT NULL,
`CONCAT(-1%2.0)` varchar(4) DEFAULT NULL,
`CONCAT(+1/2.0)` varchar(8) DEFAULT NULL,
`CONCAT(-1/2.0)` varchar(8) DEFAULT NULL,
`CONCAT(+1*2.0)` varchar(5) NOT NULL,
`CONCAT(-1*2.0)` varchar(5) NOT NULL,
`CONCAT(+1+2.0)` varchar(5) NOT NULL,
`CONCAT(-1+2.0)` varchar(5) NOT NULL,
`CONCAT(+1-2.0)` varchar(5) NOT NULL,
`CONCAT(-1-2.0)` varchar(5) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
CREATE TABLE t1 AS SELECT
CONCAT(+1%2),
CONCAT(-1%2),
CONCAT(+1/2),
CONCAT(-1/2),
CONCAT(+1*2),
CONCAT(-1*2),
CONCAT(+1+2),
CONCAT(-1+2),
CONCAT(+1-2),
CONCAT(-1-2);
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`CONCAT(+1%2)` varchar(2) DEFAULT NULL,
`CONCAT(-1%2)` varchar(2) DEFAULT NULL,
`CONCAT(+1/2)` varchar(7) DEFAULT NULL,
`CONCAT(-1/2)` varchar(7) DEFAULT NULL,
`CONCAT(+1*2)` varchar(3) NOT NULL,
`CONCAT(-1*2)` varchar(3) NOT NULL,
`CONCAT(+1+2)` varchar(3) NOT NULL,
`CONCAT(-1+2)` varchar(3) NOT NULL,
`CONCAT(+1-2)` varchar(3) NOT NULL,
`CONCAT(-1-2)` varchar(3) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
#
# End of 5.5 tests
#
#
...
...
mysql-test/r/func_time.result
View file @
5f118b26
...
...
@@ -2152,7 +2152,7 @@ Warning 1292 Truncated incorrect DECIMAL value: '2005-05-0410'
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
`f2` varchar(2
6
) DEFAULT NULL
`f2` varchar(2
8
) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SELECT * FROM t2;
f2
...
...
mysql-test/r/type_newdecimal.result
View file @
5f118b26
...
...
@@ -2040,6 +2040,70 @@ t1 CREATE TABLE `t1` (
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
#
# MDEV-20495 Assertion `precision > 0' failed in decimal_bin_size upon CREATE .. SELECT with zerofilled decimal
#
CREATE TABLE t1 (d DECIMAL(1,0) ZEROFILL);
CREATE TABLE t2 AS SELECT 0 MOD d AS f FROM t1;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
`f` decimal(1,0) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1, t2;
CREATE TABLE t1 (d DECIMAL(1,0) UNSIGNED);
CREATE TABLE t2 AS SELECT 0 MOD d AS f FROM t1;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
`f` decimal(1,0) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE IF EXISTS t1,t2;
CREATE TABLE t1 (d DECIMAL(1,0) ZEROFILL);
CREATE TABLE t2 AS SELECT CAST(0 AS UNSIGNED) MOD d AS f FROM t1;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
`f` decimal(1,0) unsigned DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1, t2;
CREATE TABLE t1 (d DECIMAL(1,0) UNSIGNED);
CREATE TABLE t2 AS SELECT CAST(0 AS UNSIGNED) MOD d AS f FROM t1;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
`f` decimal(1,0) unsigned DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1,t2;
#
# MDEV-20560 Assertion `precision > 0' failed in decimal_bin_size upon SELECT with MOD short unsigned decimal
#
CREATE TABLE t1 (a DECIMAL(1,0) UNSIGNED);
INSERT INTO t1 VALUES (1.0),(2.0);
SELECT DISTINCT 1 MOD a FROM t1;
1 MOD a
0
1
CREATE TABLE t2 AS SELECT DISTINCT 1 MOD a AS f FROM t1;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
`f` decimal(1,0) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1, t2;
CREATE TABLE t1 (a DECIMAL(1,0) UNSIGNED);
INSERT INTO t1 VALUES (1.0),(2.0);
SELECT DISTINCT 1 MOD a FROM t1;
1 MOD a
0
1
CREATE TABLE t2 AS SELECT DISTINCT CAST(1 AS UNSIGNED) MOD a AS f FROM t1;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
`f` decimal(1,0) unsigned DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1, t2;
#
# End of 5.5 tests
#
#
...
...
mysql-test/t/func_math.test
View file @
5f118b26
...
...
@@ -587,6 +587,44 @@ INSERT INTO t1 VALUES (1),(2);
SELECT
STDDEV_SAMP
(
ROUND
(
'0'
,
309
))
FROM
t1
;
DROP
TABLE
t1
;
--
echo
#
--
echo
# MDEV-20495 Assertion `precision > 0' failed in decimal_bin_size upon CREATE .. SELECT with zerofilled decimal
--
echo
#
--
echo
# Testing that dyadic arithmetic operations are symmetric
--
echo
# for (+1) and (-1) and produce the same length in CONCAT(),
--
echo
# because (+1) and (-1) have the same data type: signed int.
CREATE
TABLE
t1
AS
SELECT
CONCAT
(
+
1
%
2.0
),
CONCAT
(
-
1
%
2.0
),
CONCAT
(
+
1
/
2.0
),
CONCAT
(
-
1
/
2.0
),
CONCAT
(
+
1
*
2.0
),
CONCAT
(
-
1
*
2.0
),
CONCAT
(
+
1
+
2.0
),
CONCAT
(
-
1
+
2.0
),
CONCAT
(
+
1
-
2.0
),
CONCAT
(
-
1
-
2.0
);
SHOW
CREATE
TABLE
t1
;
DROP
TABLE
t1
;
CREATE
TABLE
t1
AS
SELECT
CONCAT
(
+
1
%
2
),
CONCAT
(
-
1
%
2
),
CONCAT
(
+
1
/
2
),
CONCAT
(
-
1
/
2
),
CONCAT
(
+
1
*
2
),
CONCAT
(
-
1
*
2
),
CONCAT
(
+
1
+
2
),
CONCAT
(
-
1
+
2
),
CONCAT
(
+
1
-
2
),
CONCAT
(
-
1
-
2
);
SHOW
CREATE
TABLE
t1
;
DROP
TABLE
t1
;
--
echo
#
--
echo
# End of 5.5 tests
--
echo
#
...
...
mysql-test/t/type_newdecimal.test
View file @
5f118b26
...
...
@@ -1624,6 +1624,49 @@ CREATE TABLE t1 AS SELECT 1.0 * 2.000;
SHOW
CREATE
TABLE
t1
;
DROP
TABLE
t1
;
--
echo
#
--
echo
# MDEV-20495 Assertion `precision > 0' failed in decimal_bin_size upon CREATE .. SELECT with zerofilled decimal
--
echo
#
CREATE
TABLE
t1
(
d
DECIMAL
(
1
,
0
)
ZEROFILL
);
CREATE
TABLE
t2
AS
SELECT
0
MOD
d
AS
f
FROM
t1
;
SHOW
CREATE
TABLE
t2
;
DROP
TABLE
t1
,
t2
;
CREATE
TABLE
t1
(
d
DECIMAL
(
1
,
0
)
UNSIGNED
);
CREATE
TABLE
t2
AS
SELECT
0
MOD
d
AS
f
FROM
t1
;
SHOW
CREATE
TABLE
t2
;
DROP
TABLE
IF
EXISTS
t1
,
t2
;
CREATE
TABLE
t1
(
d
DECIMAL
(
1
,
0
)
ZEROFILL
);
CREATE
TABLE
t2
AS
SELECT
CAST
(
0
AS
UNSIGNED
)
MOD
d
AS
f
FROM
t1
;
SHOW
CREATE
TABLE
t2
;
DROP
TABLE
t1
,
t2
;
CREATE
TABLE
t1
(
d
DECIMAL
(
1
,
0
)
UNSIGNED
);
CREATE
TABLE
t2
AS
SELECT
CAST
(
0
AS
UNSIGNED
)
MOD
d
AS
f
FROM
t1
;
SHOW
CREATE
TABLE
t2
;
DROP
TABLE
t1
,
t2
;
--
echo
#
--
echo
# MDEV-20560 Assertion `precision > 0' failed in decimal_bin_size upon SELECT with MOD short unsigned decimal
--
echo
#
CREATE
TABLE
t1
(
a
DECIMAL
(
1
,
0
)
UNSIGNED
);
INSERT
INTO
t1
VALUES
(
1.0
),(
2.0
);
SELECT
DISTINCT
1
MOD
a
FROM
t1
;
CREATE
TABLE
t2
AS
SELECT
DISTINCT
1
MOD
a
AS
f
FROM
t1
;
SHOW
CREATE
TABLE
t2
;
DROP
TABLE
t1
,
t2
;
CREATE
TABLE
t1
(
a
DECIMAL
(
1
,
0
)
UNSIGNED
);
INSERT
INTO
t1
VALUES
(
1.0
),(
2.0
);
SELECT
DISTINCT
1
MOD
a
FROM
t1
;
CREATE
TABLE
t2
AS
SELECT
DISTINCT
CAST
(
1
AS
UNSIGNED
)
MOD
a
AS
f
FROM
t1
;
SHOW
CREATE
TABLE
t2
;
DROP
TABLE
t1
,
t2
;
--
echo
#
--
echo
# End of 5.5 tests
--
echo
#
...
...
scripts/mysqld_safe.sh
View file @
5f118b26
...
...
@@ -23,6 +23,7 @@ numa_interleave=0
unsafe_my_cnf
=
0
wsrep_on
=
0
dry_run
=
0
defaults_group_suffix
=
# Initial logging status: error log is not open, and not using syslog
logging
=
init
...
...
@@ -378,6 +379,8 @@ parse_arguments() {
append_arg_to_args
"
$arg
"
;;
--defaults-group-suffix
=
*
)
defaults_group_suffix
=
"
$arg
"
;;
--help
)
usage
;;
*
)
...
...
@@ -964,7 +967,7 @@ then
exit
1
fi
for
i
in
"
$ledir
/
$MYSQLD
"
"
$defaults
"
"--basedir=
$MY_BASEDIR_VERSION
"
\
for
i
in
"
$ledir
/
$MYSQLD
"
"
$defaults
_group_suffix
"
"
$defaults
"
"--basedir=
$MY_BASEDIR_VERSION
"
\
"--datadir=
$DATADIR
"
"--plugin-dir=
$plugin_dir
"
"
$USER_OPTION
"
do
cmd
=
"
$cmd
"
`
shell_quote_string
"
$i
"
`
...
...
sql/item_func.cc
View file @
5f118b26
...
...
@@ -1951,8 +1951,11 @@ my_decimal *Item_func_mod::decimal_op(my_decimal *decimal_value)
void
Item_func_mod
::
result_precision
()
{
unsigned_flag
=
args
[
0
]
->
unsigned_flag
;
decimals
=
MY_MAX
(
args
[
0
]
->
decimal_scale
(),
args
[
1
]
->
decimal_scale
());
max_length
=
MY_MAX
(
args
[
0
]
->
max_length
,
args
[
1
]
->
max_length
);
uint
prec
=
MY_MAX
(
args
[
0
]
->
decimal_precision
(),
args
[
1
]
->
decimal_precision
());
fix_char_length
(
my_decimal_precision_to_length_no_truncation
(
prec
,
decimals
,
unsigned_flag
));
}
...
...
@@ -1960,6 +1963,10 @@ void Item_func_mod::fix_length_and_dec()
{
Item_num_op
::
fix_length_and_dec
();
maybe_null
=
1
;
/*
result_precision() sets unsigned_flag for INT_RESULT and DECIMAL_RESULT.
Here we need to set it in case of REAL_RESULT.
*/
unsigned_flag
=
args
[
0
]
->
unsigned_flag
;
}
...
...
storage/myisam/NEWS
View file @
5f118b26
...
...
@@ -26,7 +26,7 @@ New features compared to NISAM:
- Index on BLOB and VARCHAR.
- One can now have NULL in an index. This takes 0-1 bytes / key.
- MYISAM will allow one to specify one AUTO_INCREMENT column; MYISAM will
automaticly update this on INSERT/UPDATE. The AUTO_INCREMENT value can be
automatic
al
ly update this on INSERT/UPDATE. The AUTO_INCREMENT value can be
reset with myisamchk.
- Max key length will be 500 by default; In cases of longer keys than 250,
a bigger key block size than the default of 1024 byes is used for this key.
...
...
@@ -39,7 +39,7 @@ New features compared to NISAM:
- 'myisamchk -a' stores statistic for key parts (and not only for whole keys
as in NISAM).
- Dynamic size rows will now be much less fragmented when mixing deletes with
update and insert. This is done by automatic
ly combine
adjacent deleted
update and insert. This is done by automatic
ally combining
adjacent deleted
blocks and by extending blocks if the next block is deleted.
- For dynamic size rows, the delete link contains a pointer to itself
(to make repairs easier).
...
...
storage/myisam/ft_boolean_search.c
View file @
5f118b26
...
...
@@ -335,7 +335,7 @@ static int _ftb_no_dupes_cmp(void* not_used __attribute__((unused)),
When performing prefix search (a word with truncation operator), we
must preserve original prefix to ensure that characters which may be
expanded/contracted do not break the prefix. This is done by storing
newly found key immediatly after the original word in ftbw->word
newly found key immediat
e
ly after the original word in ftbw->word
buffer.
ftbw->word= LENGTH WORD [ LENGTH1 WORD1 ] WEIGHT REFERENCE
...
...
storage/myisam/ha_myisam.cc
View file @
5f118b26
...
...
@@ -741,8 +741,8 @@ int ha_myisam::open(const char *name, int mode, uint test_if_locked)
growing files. Using an open_flag instead of calling mi_extra(...
HA_EXTRA_MMAP ...) after mi_open() has the advantage that the
mapping is not repeated for every open, but just done on the initial
open, when the MyISAM share is created. Everytime the server
requires
to open
a new instance of a table it calls this method. We
open, when the MyISAM share is created. Every
time the server
requires
opening
a new instance of a table it calls this method. We
will always supply HA_OPEN_MMAP for a permanent table. However, the
MyISAM storage engine will ignore this flag if this is a secondary
open of a table that is in use by other threads already (if the
...
...
storage/myisam/mi_check.c
View file @
5f118b26
...
...
@@ -283,7 +283,7 @@ static int check_k_link(HA_CHECK *param, register MI_INFO *info, uint nr)
/*
Read the key block with MI_MIN_KEY_BLOCK_LENGTH to find next link.
If the key cache block size is smaller than block_size, we can so
avoid unecessary eviction of cache block.
avoid un
n
ecessary eviction of cache block.
*/
if
(
!
(
buff
=
key_cache_read
(
info
->
s
->
key_cache
,
info
->
s
->
kfile
,
next_link
,
DFLT_INIT_HITS
,
...
...
@@ -1894,7 +1894,7 @@ int flush_blocks(HA_CHECK *param, KEY_CACHE *key_cache, File file,
}
/* flush_blocks */
/* Sort index for more efficent reads */
/* Sort index for more effic
i
ent reads */
int
mi_sort_index
(
HA_CHECK
*
param
,
register
MI_INFO
*
info
,
char
*
name
)
{
...
...
@@ -3047,13 +3047,13 @@ int mi_repair_parallel(HA_CHECK *param, register MI_INFO *info,
/*
Destroy the write cache. The master thread did already detach from
the share by remove_io_thread() or it was not yet started (if the
error happend before creating the thread).
error happen
e
d before creating the thread).
*/
(
void
)
end_io_cache
(
&
info
->
rec_cache
);
/*
Destroy the new data cache in case of non-quick repair. All slave
threads did either detach from the share by remove_io_thread()
already or they were not yet started (if the error happend before
already or they were not yet started (if the error happen
e
d before
creating the threads).
*/
if
(
!
rep_quick
&&
my_b_inited
(
&
new_data_cache
))
...
...
@@ -4591,7 +4591,7 @@ void update_auto_increment_key(HA_CHECK *param, MI_INFO *info,
keypart_k=c_k for arbitrary constants c_1 ... c_k)
= {assuming that values have uniform distribution and index contains all
tuples from the domain (or that {c_1, ..., c_k} tuple is cho
o
sen from
tuples from the domain (or that {c_1, ..., c_k} tuple is chosen from
index tuples}
= #tuples-in-the-index / #distinct-tuples-in-the-index.
...
...
storage/myisam/mi_create.c
View file @
5f118b26
...
...
@@ -610,7 +610,7 @@ int mi_create(const char *name,uint keys,MI_KEYDEF *keydefs,
klinkname_ptr
=
klinkname
;
/*
Don't create the table if the link or file exists to ensure that one
doesn't accidently destroy another table.
doesn't accident
al
ly destroy another table.
*/
create_flag
=
0
;
}
...
...
storage/myisam/mi_delete.c
View file @
5f118b26
...
...
@@ -326,7 +326,7 @@ static int d_search(register MI_INFO *info, register MI_KEYDEF *keyinfo,
{
DBUG_PRINT
(
"error"
,(
"Didn't find key"
));
mi_print_error
(
info
->
s
,
HA_ERR_CRASHED
);
my_errno
=
HA_ERR_CRASHED
;
/* This should ne
wer happend
*/
my_errno
=
HA_ERR_CRASHED
;
/* This should ne
ver happen
*/
goto
err
;
}
save_flag
=
0
;
...
...
storage/myisam/mi_dynrec.c
View file @
5f118b26
...
...
@@ -886,8 +886,8 @@ static int update_dynamic_record(MI_INFO *info, my_off_t filepos, uchar *record,
/*
Check if next block is a deleted block
Above we have MI_MIN_BLOCK_LENGTH to avoid the problem where
the next block is so small it can't be split
ed
which could
ca
su
e problems
the next block is so small it can't be split which could
ca
us
e problems
*/
MI_BLOCK_INFO
del_block
;
...
...
storage/myisam/mi_extra.c
View file @
5f118b26
...
...
@@ -211,7 +211,7 @@ int mi_extra(MI_INFO *info, enum ha_extra_function function, void *extra_arg)
info
->
read_record
=
share
->
read_record
;
info
->
opt_flag
&=
~
(
KEY_READ_USED
|
REMEMBER_OLD_POS
);
break
;
case
HA_EXTRA_NO_USER_CHANGE
:
/* Database is somehow locked agains changes */
case
HA_EXTRA_NO_USER_CHANGE
:
/* Database is somehow locked agains
t
changes */
info
->
lock_type
=
F_EXTRA_LCK
;
/* Simulate as locked */
break
;
case
HA_EXTRA_WAIT_LOCK
:
...
...
@@ -349,7 +349,7 @@ int mi_extra(MI_INFO *info, enum ha_extra_function function, void *extra_arg)
if
(
share
->
base
.
blobs
)
mi_alloc_rec_buff
(
info
,
-
1
,
&
info
->
rec_buff
);
break
;
case
HA_EXTRA_NORMAL
:
/* The
ese is
n't in use */
case
HA_EXTRA_NORMAL
:
/* The
se are
n't in use */
info
->
quick_mode
=
0
;
break
;
case
HA_EXTRA_QUICK
:
...
...
storage/myisam/mi_key.c
View file @
5f118b26
...
...
@@ -605,7 +605,7 @@ ulonglong retrieve_auto_increment(MI_INFO *info,const uchar *record)
}
/*
The following code works beca
su
e if s_value < 0 then value is 0
The following code works beca
us
e if s_value < 0 then value is 0
and if s_value == 0 then value will contain either s_value or the
correct value.
*/
...
...
storage/myisam/mi_locking.c
View file @
5f118b26
...
...
@@ -446,7 +446,7 @@ my_bool mi_check_status(void *param)
@param org_table
@param new_table that should point on org_lock. new_table is 0
in case this is the first occurence of the table in the lock
in case this is the first occur
r
ence of the table in the lock
structure.
*/
...
...
storage/myisam/mi_packrec.c
View file @
5f118b26
...
...
@@ -810,7 +810,7 @@ static void (*get_unpack_function(MI_COLUMNDEF *rec))
return
&
uf_varchar2
;
case
FIELD_LAST
:
default:
return
0
;
/* This should never happen
d
*/
return
0
;
/* This should never happen */
}
}
...
...
storage/myisam/mi_rfirst.c
View file @
5f118b26
...
...
@@ -16,7 +16,7 @@
#include "myisamdef.h"
/* Read first row through
a spec
fic key */
/* Read first row through
a speci
fic key */
int
mi_rfirst
(
MI_INFO
*
info
,
uchar
*
buf
,
int
inx
)
{
...
...
storage/myisam/mi_search.c
View file @
5f118b26
...
...
@@ -432,7 +432,7 @@ int _mi_prefix_search(MI_INFO *info, register MI_KEYDEF *keyinfo, uchar *page,
/*
If prefix_len > cmplen then we are in the end-space comparison
phase. Do not try to acces the key any more ==> left= 0.
phase. Do not try to acces
s
the key any more ==> left= 0.
*/
left
=
((
len
<=
cmplen
)
?
suffix_len
:
((
prefix_len
<
cmplen
)
?
cmplen
-
prefix_len
:
0
));
...
...
storage/myisam/mi_test_all.sh
View file @
5f118b26
...
...
@@ -19,8 +19,8 @@
# MA 02110-1335 USA
#
# Execute some simple basic test
on MyISAM libary to check if things
#
works
at all.
# Execute some simple basic test
s on the MyISAM library to check if
#
things work
at all.
valgrind
=
"valgrind --alignment=8 --leak-check=yes"
silent
=
"-s"
...
...
storage/myisam/myisamchk.c
View file @
5f118b26
...
...
@@ -379,7 +379,7 @@ static void usage(void)
puts
(
"Check options (check is the default action for myisamchk):
\n
\
-c, --check Check table for errors.
\n
\
-e, --extend-check Check the table VERY throughly. Only use this in
\n
\
-e, --extend-check Check the table VERY th
o
roughly. Only use this in
\n
\
extreme cases as myisamchk should normally be able to
\n
\
find out if the table is ok even without this switch.
\n
\
-F, --fast Check only tables that haven't been closed properly.
\n
\
...
...
storage/myisam/myisamdef.h
View file @
5f118b26
...
...
@@ -195,7 +195,7 @@ typedef struct st_mi_isam_share
ulong
last_process
;
/* For table-change-check */
ulong
last_version
;
/* Version on start */
ulong
options
;
/* Options used */
ulong
min_pack_length
;
/* The
e
se are used by packed data */
ulong
min_pack_length
;
/* These are used by packed data */
ulong
max_pack_length
;
ulong
state_diff_length
;
uint
rec_reflength
;
/* rec_reflength in use now */
...
...
storage/myisam/myisamlog.c
View file @
5f118b26
...
...
@@ -415,7 +415,7 @@ static int examine_log(char * file_name, char **table_names)
left_root_right
);
file_info
.
id
=
open_param
.
max_id
+
1
;
/*
* In the line below +10 is added to accomodate '<' and '>' chars
* In the line below +10 is added to accom
m
odate '<' and '>' chars
* plus '\0' at the end, so that there is place for 7 digits.
* It is improbable that same table can have that many entries in
* the table cache.
...
...
storage/myisam/myisampack.c
View file @
5f118b26
...
...
@@ -110,7 +110,7 @@ typedef struct st_isam_mrg {
MI_INFO
**
file
,
**
current
,
**
end
;
uint
free_file
;
uint
count
;
uint
min_pack_length
;
/* The
ese is
used by packed data */
uint
min_pack_length
;
/* The
se are
used by packed data */
uint
max_pack_length
;
uint
ref_length
;
uint
max_blob_length
;
...
...
@@ -1237,7 +1237,7 @@ static void check_counts(HUFF_COUNTS *huff_counts, uint trees,
huff_counts
->
counts
[
0
]
=
0
;
goto
found_pack
;
}
/* Remeber the number of significant spaces. */
/* Reme
m
ber the number of significant spaces. */
old_space_count
=
huff_counts
->
counts
[
' '
];
/* Add all leading and trailing spaces. */
huff_counts
->
counts
[
' '
]
+=
(
huff_counts
->
tot_end_space
+
...
...
storage/myisam/sort.c
View file @
5f118b26
...
...
@@ -860,7 +860,7 @@ static int merge_many_buff(MI_SORT_PARAM *info, ha_keys keys,
buffpek Where to read from
sort_length max length to read
RESULT
> 0
Ammount
of bytes read
> 0
Number
of bytes read
-1 Error
*/
...
...
support-files/mysql-log-rotate.sh
View file @
5f118b26
# This logname can be set in /etc/my.cnf
# by setting the variable "
err-log
"
# in the [
safe_
mysqld] section as follows:
# by setting the variable "
log-error
"
# in the [mysqld] section as follows:
#
# [
safe_
mysqld]
#
err-log
=@localstatedir@/mysqld.log
# [mysqld]
#
log-error
=@localstatedir@/mysqld.log
#
# If the root user has a password you have to create a
# /root/.my.cnf configuration file with the following
...
...
@@ -21,7 +21,7 @@
@localstatedir@/mysqld.log
{
# create 600 mysql mysql
notifempty
daily
daily
rotate 3
missingok
compress
...
...
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