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
dca62b6a
Commit
dca62b6a
authored
Oct 28, 2011
by
Andrei Elkin
Browse files
Options
Browse Files
Download
Plain Diff
merge from 5.5 to local tree.
parents
8b987dfd
07e07b34
Changes
20
Show whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
144 additions
and
49 deletions
+144
-49
VERSION
VERSION
+1
-1
cmd-line-utils/libedit/CMakeLists.txt
cmd-line-utils/libedit/CMakeLists.txt
+1
-0
cmd-line-utils/libedit/README
cmd-line-utils/libedit/README
+1
-1
cmd-line-utils/libedit/chared.c
cmd-line-utils/libedit/chared.c
+2
-2
cmd-line-utils/libedit/chartype.c
cmd-line-utils/libedit/chartype.c
+0
-3
cmd-line-utils/libedit/histedit.h
cmd-line-utils/libedit/histedit.h
+0
-9
cmd-line-utils/libedit/refresh.c
cmd-line-utils/libedit/refresh.c
+0
-2
cmd-line-utils/libedit/sys.h
cmd-line-utils/libedit/sys.h
+14
-1
cmd-line-utils/libedit/terminal.c
cmd-line-utils/libedit/terminal.c
+0
-3
mysql-test/r/archive.result
mysql-test/r/archive.result
+19
-0
mysql-test/r/myisam.result
mysql-test/r/myisam.result
+24
-0
mysql-test/t/archive.test
mysql-test/t/archive.test
+15
-0
mysql-test/t/myisam.test
mysql-test/t/myisam.test
+18
-0
sql/sql_base.cc
sql/sql_base.cc
+4
-3
storage/archive/ha_archive.cc
storage/archive/ha_archive.cc
+12
-0
storage/innobase/btr/btr0cur.c
storage/innobase/btr/btr0cur.c
+4
-10
storage/innobase/handler/ha_innodb.cc
storage/innobase/handler/ha_innodb.cc
+11
-8
storage/innobase/row/row0mysql.c
storage/innobase/row/row0mysql.c
+2
-1
storage/myisam/ha_myisam.cc
storage/myisam/ha_myisam.cc
+16
-0
storage/myisam/mi_delete_all.c
storage/myisam/mi_delete_all.c
+0
-5
No files found.
VERSION
View file @
dca62b6a
MYSQL_VERSION_MAJOR=5
MYSQL_VERSION_MINOR=5
MYSQL_VERSION_PATCH=1
8
MYSQL_VERSION_PATCH=1
9
MYSQL_VERSION_EXTRA=
cmd-line-utils/libedit/CMakeLists.txt
View file @
dca62b6a
...
...
@@ -156,6 +156,7 @@ ${CURSES_INCLUDE_PATH}
SET
(
LIBEDIT_SOURCES
chared.c
chartype.c
el.c
eln.c
history.c
...
...
cmd-line-utils/libedit/README
View file @
dca62b6a
...
...
@@ -42,7 +42,7 @@ then merge remaining bits by hand. All MySQL-specific changes should be
marked with XXXMYSQL to make them easier to identify and merge. To generate
a 'clean' diff against upstream you can use the above commands but use
cvs co -D "2011/10/
04 15:27:04
" [..]
cvs co -D "2011/10/
23 17:37:55
" [..]
to fetch the baseline of most recent merge.
...
...
cmd-line-utils/libedit/chared.c
View file @
dca62b6a
/* $NetBSD: chared.c,v 1.3
5 2011/08/16 16:25:1
5 christos Exp $ */
/* $NetBSD: chared.c,v 1.3
6 2011/10/23 17:37:5
5 christos Exp $ */
/*-
* Copyright (c) 1992, 1993
...
...
@@ -200,7 +200,7 @@ c_delbefore1(EditLine *el)
protected
int
ce__isword
(
Int
p
)
{
return
Isalnum
(
p
||
Strchr
(
STR
(
"*?_-.[]~="
),
p
)
!=
NULL
)
;
return
Isalnum
(
p
)
||
Strchr
(
STR
(
"*?_-.[]~="
),
p
)
!=
NULL
;
}
...
...
cmd-line-utils/libedit/chartype.c
View file @
dca62b6a
...
...
@@ -258,9 +258,6 @@ ct_visual_string(const Char *s)
return
NULL
;
}
#ifdef WIDECHAR
int
wcwidth
(
wchar_t
wc
);
// Signature.
#endif
protected
int
ct_visual_width
(
Char
c
)
...
...
cmd-line-utils/libedit/histedit.h
View file @
dca62b6a
...
...
@@ -247,15 +247,6 @@ int tok_str(Tokenizer *, const char *,
/*
* Begin Wide Character Support
*/
#ifdef __linux__
/* Apparently we need _GNU_SOURCE defined to get access to wcsdup on Linux */
#ifndef _GNU_SOURCE
#define _GNU_SOURCE
#endif
#endif
#include <wchar.h>
#include <wctype.h>
/*
* Wide character versions
...
...
cmd-line-utils/libedit/refresh.c
View file @
dca62b6a
...
...
@@ -40,8 +40,6 @@ static char sccsid[] = "@(#)refresh.c 8.1 (Berkeley) 6/4/93";
#endif
#endif
/* not lint && not SCCSID */
#include "chartype.c"
/* XXXMYSQL */
/*
* refresh.c: Lower level screen refreshing functions
*/
...
...
cmd-line-utils/libedit/sys.h
View file @
dca62b6a
...
...
@@ -92,8 +92,21 @@ size_t strlcpy(char *dst, const char *src, size_t size);
char
*
fgetln
(
FILE
*
fp
,
size_t
*
len
);
#endif
#ifndef HAVE_WCSDUP
#ifdef __linux__
/* Apparently we need _GNU_SOURCE defined to get access to wcsdup on Linux */
#ifndef _GNU_SOURCE
#define _GNU_SOURCE
#endif
#endif
#ifndef __USE_XOPEN
#define __USE_XOPEN
#endif
#include <wchar.h>
#include <wctype.h>
#ifndef HAVE_WCSDUP
wchar_t
*
wcsdup
(
const
wchar_t
*
);
#endif
...
...
cmd-line-utils/libedit/terminal.c
View file @
dca62b6a
...
...
@@ -636,9 +636,6 @@ terminal_move_to_char(EditLine *el, int where)
el
->
el_cursor
.
h
=
where
;
/* now where is here */
}
#ifdef WIDECHAR
int
wcwidth
(
wchar_t
);
// Signature.
#endif
/* terminal_overwrite():
* Overstrike num characters
...
...
mysql-test/r/archive.result
View file @
dca62b6a
...
...
@@ -12823,3 +12823,22 @@ a b c d e f
-1 b c d e 1
DROP TABLE t1;
SET sort_buffer_size=DEFAULT;
#
# BUG#11758979 - 51252: ARCHIVE TABLES STILL FAIL UNDER STRESS
# TESTS: CRASH, CORRUPTION, 4G MEMOR
# (to be executed with valgrind)
CREATE TABLE t1(a BLOB, b VARCHAR(200)) ENGINE=ARCHIVE;
INSERT INTO t1 VALUES(NULL, '');
FLUSH TABLE t1;
# we need this select to workaround BUG#11764364
SELECT * FROM t1;
a b
NULL
CHECKSUM TABLE t1 EXTENDED;
Table Checksum
test.t1 286155052
FLUSH TABLE t1;
OPTIMIZE TABLE t1;
Table Op Msg_type Msg_text
test.t1 optimize status OK
DROP TABLE t1;
mysql-test/r/myisam.result
View file @
dca62b6a
...
...
@@ -2414,6 +2414,30 @@ CARDINALITY
DROP TABLE t1;
SET myisam_sort_buffer_size=@@global.myisam_sort_buffer_size;
SET myisam_repair_threads=@@global.myisam_repair_threads;
#
# BUG#11757032 - 49030: OPTIMIZE TABLE BREAKS MYISAM TABLE WHEN
#
USING MYISAM_USE_MMAP ON WINDOWS
#
SET GLOBAL myisam_use_mmap=1;
CREATE TABLE t1(a INT);
INSERT INTO t1 VALUES(1),(2);
DELETE FROM t1 WHERE a=1;
FLUSH TABLE t1;
LOCK TABLE t1 WRITE;
OPTIMIZE TABLE t1;
Table Op Msg_type Msg_text
test.t1 optimize status OK
INSERT INTO t1 VALUES(3);
UNLOCK TABLES;
SELECT * FROM t1;
a
2
3
CHECK TABLE t1;
Table Op Msg_type Msg_text
test.t1 check status OK
DROP TABLE t1;
SET GLOBAL myisam_use_mmap=default;
End of 5.1 tests
#
# Bug#51327 MyISAM table is automatically repaired on ALTER
...
...
mysql-test/t/archive.test
View file @
dca62b6a
...
...
@@ -1745,3 +1745,18 @@ INSERT INTO t1 SELECT t1.* FROM t1,t1 t2,t1 t3,t1 t4,t1 t5,t1 t6;
SELECT
*
FROM
t1
ORDER
BY
f
LIMIT
1
;
DROP
TABLE
t1
;
SET
sort_buffer_size
=
DEFAULT
;
--
echo
#
--
echo
# BUG#11758979 - 51252: ARCHIVE TABLES STILL FAIL UNDER STRESS
--
echo
# TESTS: CRASH, CORRUPTION, 4G MEMOR
--
echo
# (to be executed with valgrind)
CREATE
TABLE
t1
(
a
BLOB
,
b
VARCHAR
(
200
))
ENGINE
=
ARCHIVE
;
INSERT
INTO
t1
VALUES
(
NULL
,
''
);
FLUSH
TABLE
t1
;
--
echo
# we need this select to workaround BUG#11764364
SELECT
*
FROM
t1
;
CHECKSUM
TABLE
t1
EXTENDED
;
FLUSH
TABLE
t1
;
OPTIMIZE
TABLE
t1
;
DROP
TABLE
t1
;
mysql-test/t/myisam.test
View file @
dca62b6a
...
...
@@ -1647,6 +1647,24 @@ DROP TABLE t1;
SET
myisam_sort_buffer_size
=@@
global
.
myisam_sort_buffer_size
;
SET
myisam_repair_threads
=@@
global
.
myisam_repair_threads
;
--
echo
#
--
echo
# BUG#11757032 - 49030: OPTIMIZE TABLE BREAKS MYISAM TABLE WHEN
--
echo
# USING MYISAM_USE_MMAP ON WINDOWS
--
echo
#
SET
GLOBAL
myisam_use_mmap
=
1
;
CREATE
TABLE
t1
(
a
INT
);
INSERT
INTO
t1
VALUES
(
1
),(
2
);
DELETE
FROM
t1
WHERE
a
=
1
;
FLUSH
TABLE
t1
;
LOCK
TABLE
t1
WRITE
;
OPTIMIZE
TABLE
t1
;
INSERT
INTO
t1
VALUES
(
3
);
UNLOCK
TABLES
;
SELECT
*
FROM
t1
;
CHECK
TABLE
t1
;
DROP
TABLE
t1
;
SET
GLOBAL
myisam_use_mmap
=
default
;
--
echo
End
of
5.1
tests
...
...
sql/sql_base.cc
View file @
dca62b6a
...
...
@@ -4810,10 +4810,11 @@ bool open_tables(THD *thd, TABLE_LIST **start, uint *counter, uint flags,
}
/*
temporary mem_root for new .frm parsing.
TODO: variables for size
Initialize temporary MEM_ROOT for new .FRM parsing. Do not allocate
anything yet, to avoid penalty for statements which don't use views
and thus new .FRM format.
*/
init_sql_alloc
(
&
new_frm_mem
,
8024
,
8024
);
init_sql_alloc
(
&
new_frm_mem
,
8024
,
0
);
thd
->
current_tablenr
=
0
;
restart:
...
...
storage/archive/ha_archive.cc
View file @
dca62b6a
...
...
@@ -819,6 +819,7 @@ uint32 ha_archive::max_row_length(const uchar *buf)
ptr
!=
end
;
ptr
++
)
{
if
(
!
table
->
field
[
*
ptr
]
->
is_null
())
length
+=
2
+
((
Field_blob
*
)
table
->
field
[
*
ptr
])
->
get_length
();
}
...
...
@@ -1178,6 +1179,17 @@ int ha_archive::unpack_row(azio_stream *file_to_read, uchar *record)
/* Copy null bits */
const
uchar
*
ptr
=
record_buffer
->
buffer
;
/*
Field::unpack() is not called when field is NULL. For VARCHAR
Field::unpack() only unpacks as much bytes as occupied by field
value. In these cases respective memory area on record buffer is
not initialized.
These uninitialized areas may be accessed by CHECKSUM TABLE or
by optimizer using temporary table (BUG#12997905). We may remove
this memset() when they're fixed.
*/
memset
(
record
,
0
,
table
->
s
->
reclength
);
memcpy
(
record
,
ptr
,
table
->
s
->
null_bytes
);
ptr
+=
table
->
s
->
null_bytes
;
for
(
Field
**
field
=
table
->
field
;
*
field
;
field
++
)
...
...
storage/innobase/btr/btr0cur.c
View file @
dca62b6a
...
...
@@ -3542,16 +3542,11 @@ btr_record_not_null_field_in_rec(
}
for
(
i
=
0
;
i
<
n_unique
;
i
++
)
{
ulint
rec_len
;
rec_get_nth_field_offs
(
offsets
,
i
,
&
rec_len
);
if
(
rec_len
!=
UNIV_SQL_NULL
)
{
n_not_null
[
i
]
++
;
}
else
{
/* Break if we hit the first NULL value */
if
(
rec_offs_nth_sql_null
(
offsets
,
i
))
{
break
;
}
n_not_null
[
i
]
++
;
}
}
...
...
@@ -3694,8 +3689,7 @@ btr_estimate_number_of_different_key_vals(
if
(
n_not_null
)
{
btr_record_not_null_field_in_rec
(
n_cols
,
offsets_next_rec
,
n_not_null
);
n_cols
,
offsets_next_rec
,
n_not_null
);
}
total_external_size
...
...
storage/innobase/handler/ha_innodb.cc
View file @
dca62b6a
...
...
@@ -5806,7 +5806,7 @@ ha_innobase::innobase_get_index(
table. Only print message if the index translation
table exists */
if
(
share
->
idx_trans_tbl
.
index_mapping
)
{
sql_print_
error
(
"InnoDB could not find "
sql_print_
warning
(
"InnoDB could not find "
"index %s key no %u for "
"table %s through its "
"index translation table"
,
...
...
@@ -8285,7 +8285,10 @@ ha_innobase::check(
putc('\n', stderr);
#endif
if
(
!
btr_validate_index
(
index
,
prebuilt
->
trx
))
{
/* If this is an index being created, break */
if
(
*
index
->
name
==
TEMP_INDEX_PREFIX
)
{
break
;
}
else
if
(
!
btr_validate_index
(
index
,
prebuilt
->
trx
))
{
is_ok
=
FALSE
;
innobase_format_name
(
...
...
storage/innobase/row/row0mysql.c
View file @
dca62b6a
/*****************************************************************************
Copyright (c) 2000, 201
0, Innobase Oy
. All Rights Reserved.
Copyright (c) 2000, 201
1, Oracle and/or its affiliates
. All Rights Reserved.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
...
...
@@ -3995,6 +3995,7 @@ row_rename_table_for_mysql(
trx
->
error_state
=
DB_SUCCESS
;
trx_general_rollback_for_mysql
(
trx
,
NULL
);
trx
->
error_state
=
DB_SUCCESS
;
err
=
DB_ERROR
;
goto
funct_exit
;
}
...
...
storage/myisam/ha_myisam.cc
View file @
dca62b6a
...
...
@@ -1026,6 +1026,18 @@ int ha_myisam::repair(THD *thd, MI_CHECK ¶m, bool do_optimize)
mi_get_mask_all_keys_active
(
share
->
base
.
keys
)
:
share
->
state
.
key_map
);
uint
testflag
=
param
.
testflag
;
#ifdef HAVE_MMAP
bool
remap
=
test
(
share
->
file_map
);
/*
mi_repair*() functions family use file I/O even if memory
mapping is available.
Since mixing mmap I/O and file I/O may cause various artifacts,
memory mapping must be disabled.
*/
if
(
remap
)
mi_munmap_file
(
file
);
#endif
if
(
mi_test_if_sort_rep
(
file
,
file
->
state
->
records
,
key_map
,
0
)
&&
(
local_testflag
&
T_REP_BY_SORT
))
{
...
...
@@ -1057,6 +1069,10 @@ int ha_myisam::repair(THD *thd, MI_CHECK ¶m, bool do_optimize)
error
=
mi_repair
(
&
param
,
file
,
fixed_name
,
param
.
testflag
&
T_QUICK
);
}
#ifdef HAVE_MMAP
if
(
remap
)
mi_dynmap_file
(
file
,
file
->
state
->
data_file_length
);
#endif
param
.
testflag
=
testflag
;
optimize_done
=
1
;
}
...
...
storage/myisam/mi_delete_all.c
View file @
dca62b6a
...
...
@@ -61,11 +61,6 @@ int mi_delete_all_rows(MI_INFO *info)
mysql_file_chsize
(
share
->
kfile
,
share
->
base
.
keystart
,
0
,
MYF
(
MY_WME
)))
goto
err
;
(
void
)
_mi_writeinfo
(
info
,
WRITEINFO_UPDATE_KEYFILE
);
#ifdef HAVE_MMAP
/* Map again */
if
(
share
->
file_map
)
mi_dynmap_file
(
info
,
(
my_off_t
)
0
);
#endif
DBUG_RETURN
(
0
);
err:
...
...
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