Skip to content

Commit f9bdc7c

Browse files
committed
Merge branch '10.2' into bb-10.2-jan
2 parents f7be8cf + f566a4f commit f9bdc7c

File tree

919 files changed

+70857
-19708
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

919 files changed

+70857
-19708
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,7 @@ storage/tokudb/PerconaFT/tools/tokudb_load
198198
storage/tokudb/PerconaFT/tools/tokuftdump
199199
storage/tokudb/PerconaFT/tools/tokuft_logprint
200200
storage/tokudb/PerconaFT/xz/
201+
strings/conf_to_src
201202
support-files/MySQL-shared-compat.spec
202203
support-files/binary-configure
203204
support-files/config.huge.ini

.travis.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# vim ft=yaml
2+
# travis-ci.org definition
3+
4+
# non-container builds don't have enough RAM to reliably compile
5+
sudo: required
6+
dist: trusty
7+
8+
language: cpp
9+
compiler:
10+
- gcc
11+
# - clang # See commit f38808 if you want to re-enable clang builds
12+
cache:
13+
apt:
14+
ccache:
15+
16+
# Timing on build an test needs to be < 50 minutes. The compile is ~4-5minutes
17+
# so here we group the tests such that this happens.
18+
19+
addons:
20+
apt:
21+
packages: # make sure these match debian/control contents
22+
- bison
23+
- chrpath
24+
- cmake
25+
- debhelper
26+
- dh-apparmor
27+
- dpatch
28+
- libaio-dev
29+
- libboost-dev
30+
- libjudy-dev
31+
- libncurses5-dev
32+
- libpam0g-dev
33+
- libreadline-gplv2-dev
34+
- libssl-dev
35+
- lsb-release
36+
- perl
37+
- po-debconf
38+
- psmisc
39+
- zlib1g-dev
40+
- libcrack2-dev # no effect as the package is disallowed on Travis-CI
41+
- libjemalloc-dev
42+
- devscripts # implicit for any build on Ubuntu
43+
44+
script:
45+
- ${CC} --version ; ${CXX} --version
46+
- cd "${TRAVIS_BUILD_DIR}"
47+
- env DEB_BUILD_OPTIONS="parallel=4" debian/autobake-deb.sh;
48+
49+
notifications:
50+
irc:
51+
channels:
52+
- "chat.freenode.net#maria"
53+
on_success: never # [always|never|change]
54+
on_failure: never
55+
template:
56+
- "%{repository}/%{branch} (%{commit} - %{author}): %{build_url}: %{message}"

BUILD/autorun.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@
1919

2020
# Create MySQL cmake configure wrapper
2121

22-
die() { echo "$@"; exit 1; }
23-
2422
# Use a configure script that will call CMake.
2523
path=`dirname $0`
2624
cp $path/cmake_configure.sh $path/../configure

CMakeLists.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,7 @@ INCLUDE(plugin)
153153
INCLUDE(install_macros)
154154
INCLUDE(systemd)
155155
INCLUDE(mysql_add_executable)
156+
INCLUDE(crc32-vpmsum)
156157

157158
# Handle options
158159
OPTION(DISABLE_SHARED
@@ -176,12 +177,16 @@ IF (WITH_ASAN)
176177
# gcc 4.8.1 and new versions of clang
177178
MY_CHECK_AND_SET_COMPILER_FLAG("-fsanitize=address -O1 -Wno-error -fPIC"
178179
DEBUG RELWITHDEBINFO)
180+
SET(HAVE_C_FSANITIZE ${HAVE_C__fsanitize_address__O1__Wno_error__fPIC})
181+
SET(HAVE_CXX_FSANITIZE ${HAVE_CXX__fsanitize_address__O1__Wno_error__fPIC})
179182
IF(HAVE_C_FSANITIZE AND HAVE_CXX_FSANITIZE)
180183
SET(WITH_ASAN_OK 1)
181184
ELSE()
182185
# older versions of clang
183186
MY_CHECK_AND_SET_COMPILER_FLAG("-faddress-sanitizer -O1 -fPIC"
184187
DEBUG RELWITHDEBINFO)
188+
SET(HAVE_C_FADDRESS ${HAVE_C__faddress_sanitizer__O1__fPIC})
189+
SET(HAVE_CXX_FADDRESS ${HAVE_CXX__faddress_sanitizer__O1__fPIC})
185190
IF(HAVE_C_FADDRESS AND HAVE_CXX_FADDRESS)
186191
SET(WITH_ASAN_OK 1)
187192
ENDIF()
@@ -442,7 +447,7 @@ ADD_CUSTOM_TARGET(INFO_BIN ALL
442447
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
443448
)
444449

445-
INSTALL_DOCUMENTATION(README CREDITS COPYING COPYING.LESSER COPYING.thirdparty
450+
INSTALL_DOCUMENTATION(README.md CREDITS COPYING COPYING.LESSER COPYING.thirdparty
446451
EXCEPTIONS-CLIENT COMPONENT Readme)
447452
# MDEV-6526 these files are not installed anymore
448453
#INSTALL_DOCUMENTATION(${CMAKE_BINARY_DIR}/Docs/INFO_SRC

CREDITS

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,26 @@
11
MariaDB is brought to you by the MariaDB Foundation, a non profit
22
organization registered in the USA.
33

4-
The current main members and sponsors of the MariaDB Foundation are:
5-
6-
MariaDB Corporation http://www.mariadb.com (2013 - 2016)
7-
Booking.com http://www.booking.com (2013 - 2016)
8-
Parallels http://www.parallels.com/products/plesk (2013 - 2016)
9-
Automattic http://automattic.com (2014 - 2016)
10-
Verkkokauppa.com http://verkkokauppa.com (2015 - 2016)
11-
Visma http://visma.com/ (2015 - 2016)
12-
Webyog http://webyog.com (2015 - 2016)
13-
Wikimedia Foundation http://wikimedia.org (2015 - 2016)
14-
Acronis http://acronis.com (2016)
15-
16-
For a full list of supporters and sponsors see
4+
The current main sponsors of the MariaDB Foundation are:
5+
6+
Booking.com http://www.booking.com (2013 - 2016)
7+
Development Bank of Singapore http://dbs.com (2016)
8+
MariaDB Corporation https://www.mariadb.com (2013 - 2016)
9+
Visma http://visma.com (2015 - 2016)
10+
Acronis http://acronis.com (2016)
11+
Nexedi https://www.nexedi.com (2016)
12+
Automattic https://automattic.com (2014 - 2016)
13+
Verkkokauppa.com https://www.verkkokauppa.com (2015 - 2016)
14+
Virtuozzo https://virtuozzo.com (2016)
15+
16+
For a full list of sponsors, see
1717
https://mariadb.org/about/supporters/
18+
and for individual contributors, see
19+
https://mariadb.org/donate/individual-sponsors/
1820

19-
You can also do this by running SHOW CONTRIBUTORS.
21+
You can also get the list of sponsors by running SHOW CONTRIBUTORS.
2022

21-
For all corporate memberships and sponsorships please contact the
23+
For all corporate sponsorships please contact the
2224
MariaDB Foundation Board via foundation@mariadb.org.
2325

2426
The MariaDB Foundation is responsible for the MariaDB source
@@ -38,7 +40,7 @@ following services to the MariaDB community:
3840
To be able to do the above we need help from corporations and individuals!
3941

4042
You can help support MariaDB by becoming a MariaDB developer or a
41-
member or sponsor of the MariaDB Foundation. To donate or sponsor,
43+
sponsor of the MariaDB Foundation. To donate or sponsor,
4244
go to https://mariadb.org/donate/
4345

4446
You can get a list of all the main authors of MariaDB / MySQL by running

README renamed to README.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
## MariaDB: drop-in replacement for MySQL
2+
13
MariaDB is designed as a drop-in replacement of MySQL(R) with more
24
features, new storage engines, fewer bugs, and better performance.
35

@@ -24,10 +26,17 @@ https://mariadb.com/kb/en/mariadb-versus-mysql-compatibility/
2426
As MariaDB is a full replacement of MySQL, the MySQL manual at
2527
http://dev.mysql.com/doc is generally applicable.
2628

29+
Help:
30+
-----
31+
2732
More help is available from the Maria Discuss mailing list
2833
https://launchpad.net/~maria-discuss
2934
and the #maria IRC channel on Freenode.
3035

36+
37+
License:
38+
--------
39+
3140
***************************************************************************
3241

3342
NOTE:
@@ -42,7 +51,8 @@ and COPYING.thirdparty files.
4251

4352
***************************************************************************
4453

45-
IMPORTANT:
54+
Bug Reports:
55+
------------
4656

4757
Bug and/or error reports regarding MariaDB should be submitted at
4858
http://mariadb.org/jira
@@ -53,3 +63,8 @@ The code for MariaDB, including all revision history, can be found at:
5363
https://github.com/MariaDB/server
5464

5565
***************************************************************************
66+
67+
Code status:
68+
------------
69+
70+
* [![tests status](https://secure.travis-ci.org/MariaDB/server.png?branch=10.2)](https://travis-ci.org/MariaDB/server) travis-ci.org (10.2 branch)

client/mysqlcheck.c

Lines changed: 27 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ static int process_selected_tables(char *db, char **table_names, int tables);
240240
static int process_all_tables_in_db(char *database);
241241
static int process_one_db(char *database);
242242
static int use_db(char *database);
243-
static int handle_request_for_tables(char *tables, size_t length, my_bool view);
243+
static int handle_request_for_tables(char *, size_t, my_bool, my_bool);
244244
static int dbConnect(char *host, char *user,char *passwd);
245245
static void dbDisconnect(char *host);
246246
static void DBerror(MYSQL *mysql, const char *when);
@@ -577,7 +577,7 @@ static int process_selected_tables(char *db, char **table_names, int tables)
577577
}
578578
*--end = 0;
579579
handle_request_for_tables(table_names_comma_sep + 1, tot_length - 1,
580-
opt_do_views != 0);
580+
opt_do_views != 0, opt_all_in_1);
581581
my_free(table_names_comma_sep);
582582
}
583583
else
@@ -588,7 +588,7 @@ static int process_selected_tables(char *db, char **table_names, int tables)
588588
view= is_view(table);
589589
if (view < 0)
590590
continue;
591-
handle_request_for_tables(table, table_len, (view == 1));
591+
handle_request_for_tables(table, table_len, view == 1, opt_all_in_1);
592592
}
593593
DBUG_RETURN(0);
594594
} /* process_selected_tables */
@@ -616,13 +616,9 @@ static char *fix_table_name(char *dest, char *src)
616616
*dest++= '`';
617617
for (; *src; src++)
618618
{
619-
switch (*src) {
620-
case '`': /* escape backtick character */
619+
if (*src == '`')
621620
*dest++= '`';
622-
/* fall through */
623-
default:
624-
*dest++= *src;
625-
}
621+
*dest++= *src;
626622
}
627623
*dest++= '`';
628624

@@ -711,9 +707,9 @@ static int process_all_tables_in_db(char *database)
711707
*--end = 0;
712708
*--views_end = 0;
713709
if (tot_length)
714-
handle_request_for_tables(tables + 1, tot_length - 1, FALSE);
710+
handle_request_for_tables(tables + 1, tot_length - 1, FALSE, opt_all_in_1);
715711
if (tot_views_length)
716-
handle_request_for_tables(views + 1, tot_views_length - 1, TRUE);
712+
handle_request_for_tables(views + 1, tot_views_length - 1, TRUE, opt_all_in_1);
717713
my_free(tables);
718714
my_free(views);
719715
}
@@ -739,7 +735,7 @@ static int process_all_tables_in_db(char *database)
739735
!strcmp(row[0], "slow_log")))
740736
continue; /* Skip logging tables */
741737

742-
handle_request_for_tables(row[0], fixed_name_length(row[0]), view);
738+
handle_request_for_tables(row[0], fixed_name_length(row[0]), view, opt_all_in_1);
743739
}
744740
}
745741
mysql_free_result(res);
@@ -800,13 +796,11 @@ static int rebuild_table(char *name)
800796
int rc= 0;
801797
DBUG_ENTER("rebuild_table");
802798

803-
query= (char*)my_malloc(sizeof(char) * (12 + fixed_name_length(name) + 6 + 1),
799+
query= (char*)my_malloc(sizeof(char) * (12 + strlen(name) + 6 + 1),
804800
MYF(MY_WME));
805801
if (!query)
806802
DBUG_RETURN(1);
807-
ptr= strmov(query, "ALTER TABLE ");
808-
ptr= fix_table_name(ptr, name);
809-
ptr= strxmov(ptr, " FORCE", NullS);
803+
ptr= strxmov(query, "ALTER TABLE ", name, " FORCE", NullS);
810804
if (verbose >= 3)
811805
puts(query);
812806
if (mysql_real_query(sock, query, (ulong)(ptr - query)))
@@ -870,7 +864,8 @@ static int disable_binlog()
870864
return run_query("SET SQL_LOG_BIN=0", 0);
871865
}
872866

873-
static int handle_request_for_tables(char *tables, size_t length, my_bool view)
867+
static int handle_request_for_tables(char *tables, size_t length,
868+
my_bool view, my_bool dont_quote)
874869
{
875870
char *query, *end, options[100], message[100];
876871
char table_name_buff[NAME_CHAR_LEN*2*2+1], *table_name;
@@ -929,7 +924,7 @@ static int handle_request_for_tables(char *tables, size_t length, my_bool view)
929924

930925
if (!(query =(char *) my_malloc(query_size, MYF(MY_WME))))
931926
DBUG_RETURN(1);
932-
if (opt_all_in_1)
927+
if (dont_quote)
933928
{
934929
DBUG_ASSERT(strlen(op)+strlen(tables)+strlen(options)+8+1 <= query_size);
935930

@@ -974,23 +969,27 @@ static int handle_request_for_tables(char *tables, size_t length, my_bool view)
974969
DBUG_RETURN(0);
975970
}
976971

972+
static void insert_table_name(DYNAMIC_ARRAY *arr, char *in, size_t dblen)
973+
{
974+
char buf[NAME_LEN*2+2];
975+
in[dblen]= 0;
976+
my_snprintf(buf, sizeof(buf), "%`s.%`s", in, in + dblen + 1);
977+
insert_dynamic(arr, (uchar*) buf);
978+
}
977979

978980
static void print_result()
979981
{
980982
MYSQL_RES *res;
981983
MYSQL_ROW row;
982984
char prev[(NAME_LEN+9)*3+2];
983985
char prev_alter[MAX_ALTER_STR_SIZE];
984-
char *db_name;
985-
uint length_of_db;
986+
size_t length_of_db= strlen(sock->db);
986987
uint i;
987988
my_bool found_error=0, table_rebuild=0;
988989
DYNAMIC_ARRAY *array4repair= &tables4repair;
989990
DBUG_ENTER("print_result");
990991

991992
res = mysql_use_result(sock);
992-
db_name= sock->db;
993-
length_of_db= strlen(db_name);
994993

995994
prev[0] = '\0';
996995
prev_alter[0]= 0;
@@ -1014,16 +1013,10 @@ static void print_result()
10141013
if (prev_alter[0])
10151014
insert_dynamic(&alter_table_cmds, (uchar*) prev_alter);
10161015
else
1017-
{
1018-
char *table_name= prev + (length_of_db+1);
1019-
insert_dynamic(&tables4rebuild, (uchar*) table_name);
1020-
}
1016+
insert_table_name(&tables4rebuild, prev, length_of_db);
10211017
}
10221018
else
1023-
{
1024-
char *table_name= prev + (length_of_db+1);
1025-
insert_dynamic(array4repair, table_name);
1026-
}
1019+
insert_table_name(array4repair, prev, length_of_db);
10271020
}
10281021
array4repair= &tables4repair;
10291022
found_error=0;
@@ -1068,16 +1061,10 @@ static void print_result()
10681061
if (prev_alter[0])
10691062
insert_dynamic(&alter_table_cmds, prev_alter);
10701063
else
1071-
{
1072-
char *table_name= prev + (length_of_db+1);
1073-
insert_dynamic(&tables4rebuild, table_name);
1074-
}
1064+
insert_table_name(&tables4rebuild, prev, length_of_db);
10751065
}
10761066
else
1077-
{
1078-
char *table_name= prev + (length_of_db+1);
1079-
insert_dynamic(array4repair, table_name);
1080-
}
1067+
insert_table_name(array4repair, prev, length_of_db);
10811068
}
10821069
mysql_free_result(res);
10831070
DBUG_VOID_RETURN;
@@ -1222,7 +1209,7 @@ int main(int argc, char **argv)
12221209
for (i = 0; i < tables4repair.elements ; i++)
12231210
{
12241211
char *name= (char*) dynamic_array_ptr(&tables4repair, i);
1225-
handle_request_for_tables(name, fixed_name_length(name), FALSE);
1212+
handle_request_for_tables(name, fixed_name_length(name), FALSE, TRUE);
12261213
}
12271214
for (i = 0; i < tables4rebuild.elements ; i++)
12281215
rebuild_table((char*) dynamic_array_ptr(&tables4rebuild, i));
@@ -1233,7 +1220,7 @@ int main(int argc, char **argv)
12331220
for (i = 0; i < views4repair.elements ; i++)
12341221
{
12351222
char *name= (char*) dynamic_array_ptr(&views4repair, i);
1236-
handle_request_for_tables(name, fixed_name_length(name), TRUE);
1223+
handle_request_for_tables(name, fixed_name_length(name), TRUE, TRUE);
12371224
}
12381225
}
12391226
ret= MY_TEST(first_error);

0 commit comments

Comments
 (0)