Skip to content

Commit e8bdef8

Browse files
author
Vladislav Vaintroub
committed
merge
2 parents 57e3ba2 + 85d5a08 commit e8bdef8

File tree

811 files changed

+20180
-16627
lines changed

Some content is hidden

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

811 files changed

+20180
-16627
lines changed

.bzrignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3070,3 +3070,5 @@ libmysqld/rpl_handler.cc
30703070
libmysqld/debug_sync.cc
30713071
libmysqld/rpl_handler.cc
30723072
dbug/tests
3073+
libmysqld/sys_vars.cc
3074+
libmysqld/keycaches.cc

Makefile.am

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -132,14 +132,14 @@ smoke:
132132
test-full: test test-nr test-ps
133133

134134
test-force:
135-
$(MAKE) force=--force test
135+
$(MAKE) -k force=--force test
136136

137137
test-force-full:
138-
$(MAKE) force=--force test-full
138+
$(MAKE) -k force=--force test-full
139139

140140
#used by autopush.pl to run memory based tests
141141
test-force-mem:
142-
$(MAKE) force=--force mem=--mem test
142+
$(MAKE) -k force=--force mem=--mem test
143143

144144
EXP = --experimental=collections/default.experimental
145145

@@ -207,10 +207,6 @@ test-bt-debug:
207207
@PERL@ ./mysql-test-run.pl --comment=debug --force --timer \
208208
--skip-ndbcluster --skip-rpl --report-features $(EXP)
209209

210-
test-bt-debug-fast:
211-
212-
test-bt-debug-fast:
213-
214210
# Keep these for a while
215211
test-pl: test
216212
test-full-pl: test-full

client/Makefile.am

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ sql_src=log_event.h mysql_priv.h rpl_constants.h \
108108
log_event.cc my_decimal.h my_decimal.cc \
109109
log_event_old.h log_event_old.cc \
110110
rpl_record_old.h rpl_record_old.cc
111-
strings_src=decimal.c
111+
strings_src=decimal.c dtoa.c
112112

113113
link_sources:
114114
for f in $(sql_src) ; do \

client/mysql.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ extern "C" {
100100
#define vidattr(A) {} // Can't get this to work
101101
#endif
102102

103-
#ifdef FN_NO_CASE_SENCE
103+
#ifdef FN_NO_CASE_SENSE
104104
#define cmp_database(cs,A,B) my_strcasecmp((cs), (A), (B))
105105
#else
106106
#define cmp_database(cs,A,B) strcmp((A),(B))
@@ -3652,7 +3652,7 @@ static void print_warnings()
36523652
mysql_store_result_for_lazy(&result);
36533653

36543654
/* Bail out when no warnings */
3655-
if (!(num_rows= mysql_num_rows(result)))
3655+
if (!result || !(num_rows= mysql_num_rows(result)))
36563656
goto end;
36573657

36583658
cur= mysql_fetch_row(result);

client/mysqltest.cc

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2225,7 +2225,7 @@ do_result_format_version(struct st_command *command)
22252225
long version;
22262226
static DYNAMIC_STRING ds_version;
22272227
const struct command_arg result_format_args[] = {
2228-
"version", ARG_STRING, TRUE, &ds_version, "Version to use",
2228+
{"version", ARG_STRING, TRUE, &ds_version, "Version to use"}
22292229
};
22302230

22312231
DBUG_ENTER("do_result_format_version");
@@ -6150,6 +6150,8 @@ void init_win_path_patterns()
61506150
"$MYSQL_TMP_DIR",
61516151
"$MYSQLTEST_VARDIR",
61526152
"$MASTER_MYSOCK",
6153+
"$MYSQL_SHAREDIR",
6154+
"$MYSQL_LIBDIR",
61536155
"./test/" };
61546156
int num_paths= sizeof(paths)/sizeof(char*);
61556157
int i;
@@ -7098,7 +7100,7 @@ int util_query(MYSQL* org_mysql, const char* query){
70987100
cur_con->util_mysql= mysql;
70997101
}
71007102

7101-
return mysql_query(mysql, query);
7103+
DBUG_RETURN(mysql_query(mysql, query));
71027104
}
71037105

71047106

@@ -7736,6 +7738,7 @@ int main(int argc, char **argv)
77367738
cur_file->file_name= my_strdup("<stdin>", MYF(MY_WME));
77377739
cur_file->lineno= 1;
77387740
}
7741+
var_set_string("MYSQLTEST_FILE", cur_file->file_name);
77397742
init_re();
77407743
ps_protocol_enabled= ps_protocol;
77417744
sp_protocol_enabled= sp_protocol;

client/sql_string.cc

Lines changed: 7 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,6 @@
2424
#include <m_string.h>
2525
#include <m_ctype.h>
2626
#include <mysql_com.h>
27-
#ifdef HAVE_FCONVERT
28-
#include <floatingpoint.h>
29-
#endif
30-
3127
/*
3228
The following extern declarations are ok as these are interface functions
3329
required by the string function
@@ -117,82 +113,19 @@ bool String::set(ulonglong num, CHARSET_INFO *cs)
117113

118114
bool String::set(double num,uint decimals, CHARSET_INFO *cs)
119115
{
120-
char buff[331];
116+
char buff[FLOATING_POINT_BUFFER];
121117
uint dummy_errors;
118+
size_t len;
122119

123120
str_charset=cs;
124121
if (decimals >= NOT_FIXED_DEC)
125122
{
126-
uint32 len= my_sprintf(buff,(buff, "%.15g",num));// Enough for a DATETIME
123+
len= my_gcvt(num, MY_GCVT_ARG_DOUBLE, sizeof(buff) - 1, buff, NULL);
127124
return copy(buff, len, &my_charset_latin1, cs, &dummy_errors);
128125
}
129-
#ifdef HAVE_FCONVERT
130-
int decpt,sign;
131-
char *pos,*to;
132-
133-
(void) fconvert(num,(int) decimals,&decpt,&sign,buff+1);
134-
if (!my_isdigit(&my_charset_latin1, buff[1]))
135-
{ // Nan or Inf
136-
pos=buff+1;
137-
if (sign)
138-
{
139-
buff[0]='-';
140-
pos=buff;
141-
}
142-
uint dummy_errors;
143-
return copy(pos,(uint32) strlen(pos), &my_charset_latin1, cs, &dummy_errors);
144-
}
145-
if (alloc((uint32) ((uint32) decpt+3+decimals)))
146-
return TRUE;
147-
to=Ptr;
148-
if (sign)
149-
*to++='-';
150-
151-
pos=buff+1;
152-
if (decpt < 0)
153-
{ /* value is < 0 */
154-
*to++='0';
155-
if (!decimals)
156-
goto end;
157-
*to++='.';
158-
if ((uint32) -decpt > decimals)
159-
decpt= - (int) decimals;
160-
decimals=(uint32) ((int) decimals+decpt);
161-
while (decpt++ < 0)
162-
*to++='0';
163-
}
164-
else if (decpt == 0)
165-
{
166-
*to++= '0';
167-
if (!decimals)
168-
goto end;
169-
*to++='.';
170-
}
171-
else
172-
{
173-
while (decpt-- > 0)
174-
*to++= *pos++;
175-
if (!decimals)
176-
goto end;
177-
*to++='.';
178-
}
179-
while (decimals--)
180-
*to++= *pos++;
181-
182-
end:
183-
*to=0;
184-
str_length=(uint32) (to-Ptr);
185-
return FALSE;
186-
#else
187-
#ifdef HAVE_SNPRINTF
188-
buff[sizeof(buff)-1]=0; // Safety
189-
snprintf(buff,sizeof(buff)-1, "%.*f",(int) decimals,num);
190-
#else
191-
sprintf(buff,"%.*f",(int) decimals,num);
192-
#endif
193-
return copy(buff,(uint32) strlen(buff), &my_charset_latin1, cs,
126+
len= my_fcvt(num, decimals, buff, NULL);
127+
return copy(buff, (uint32) len, &my_charset_latin1, cs,
194128
&dummy_errors);
195-
#endif
196129
}
197130

198131

@@ -675,7 +608,8 @@ void String::qs_append(const char *str, uint32 len)
675608
void String::qs_append(double d)
676609
{
677610
char *buff = Ptr + str_length;
678-
str_length+= my_sprintf(buff, (buff, "%.15g", d));
611+
str_length+= my_gcvt(d, MY_GCVT_ARG_DOUBLE, FLOATING_POINT_BUFFER - 1, buff,
612+
NULL);
679613
}
680614

681615
void String::qs_append(double *d)

cmake/plugin.cmake

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,12 +113,21 @@ MACRO(MYSQL_ADD_PLUGIN)
113113
SET (MYSQLD_STATIC_PLUGIN_LIBS ${MYSQLD_STATIC_PLUGIN_LIBS}
114114
${target} CACHE INTERNAL "")
115115

116-
SET (mysql_plugin_defs "${mysql_plugin_defs},builtin_${target}_plugin"
117-
PARENT_SCOPE)
116+
118117
IF(ARG_STORAGE_ENGINE)
119118
SET(${with_var} ON CACHE BOOL "Link ${plugin} statically to the server"
120119
FORCE)
121120
ENDIF()
121+
122+
IF(ARG_MANDATORY)
123+
SET (mysql_mandatory_plugins
124+
"${mysql_mandatory_plugins} builtin_${target}_plugin,"
125+
PARENT_SCOPE)
126+
ELSE()
127+
SET (mysql_optional_plugins
128+
"${mysql_optional_plugins} builtin_${target}_plugin,"
129+
PARENT_SCOPE)
130+
ENDIF()
122131
ELSEIF(NOT WITHOUT_${plugin} AND NOT ARG_STATIC_ONLY AND NOT WITHOUT_DYNAMIC_PLUGINS)
123132
IF(NOT ARG_MODULE_OUTPUT_NAME)
124133
IF(ARG_STORAGE_ENGINE)

config/ac-macros/plugins.m4

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,11 @@ dnl Although this is "pretty", it breaks libmysqld build
460460
])
461461
])
462462
])
463-
mysql_plugin_defs="$mysql_plugin_defs, [builtin_]$2[_plugin]"
463+
m4_ifdef([$9],[
464+
mysql_mandatory_plugins="$mysql_mandatory_plugins [builtin_]$2[_plugin],"
465+
],[
466+
mysql_optional_plugins="$mysql_optional_plugins [builtin_]$2[_plugin],"
467+
])
464468
[with_plugin_]$2=yes
465469
AC_MSG_RESULT([yes])
466470
m4_ifdef([$11],[

configure.in

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -375,6 +375,21 @@ case "$target_os" in
375375
fi
376376
;;
377377
esac
378+
379+
# The following is required for portable results of floating point calculations
380+
# on PowerPC. The same must also be done for IA-64, but this options is missing
381+
# in the IA-64 gcc backend.
382+
383+
if test "$GCC" = "yes"
384+
then
385+
case "$host_cpu" in
386+
*ppc* | *powerpc*)
387+
CFLAGS="$CFLAGS -mno-fused-madd"
388+
CXXFLAGS="$CXXFLAGS -mno-fused-madd"
389+
;;
390+
esac
391+
fi
392+
378393
AC_SUBST(CC)
379394
AC_SUBST(CFLAGS)
380395
AC_SUBST(CXX)
@@ -2236,7 +2251,7 @@ AC_FUNC_VPRINTF
22362251

22372252
AC_CHECK_FUNCS(alarm bcmp bfill bmove bsearch bzero \
22382253
chsize cuserid fchmod fcntl \
2239-
fconvert fdatasync fesetround finite fpresetsticky fpsetmask fsync ftruncate \
2254+
fdatasync fesetround finite fpresetsticky fpsetmask fsync ftruncate \
22402255
getcwd gethostbyaddr_r gethostbyname_r getpass getpassphrase getpwnam \
22412256
getpwuid getrlimit getrusage getwd index initgroups isnan \
22422257
localtime_r gethrtime gmtime_r \
@@ -2875,7 +2890,7 @@ case $SYSTEM_TYPE in
28752890
fi
28762891

28772892
# if there is no readline, but we want to build with readline, we fail
2878-
if [test "$want_to_use_readline" = "yes"] && [test ! -d "./cmd-line-utils/readline"]
2893+
if [test "$want_to_use_readline" = "yes"] && [test ! -d "$srcdir/cmd-line-utils/readline"]
28792894
then
28802895
AC_MSG_ERROR([This commercially licensed MySQL source package can't
28812896
be built with libreadline. Please use --with-libedit to use
@@ -3015,8 +3030,8 @@ AC_SUBST(server_scripts)
30153030

30163031
AC_SUBST(mysql_plugin_dirs)
30173032
AC_SUBST(mysql_plugin_libs)
3018-
AC_SUBST(mysql_plugin_defs)
3019-
3033+
AC_SUBST(mysql_optional_plugins)
3034+
AC_SUBST(mysql_mandatory_plugins)
30203035

30213036
# Now that sql_client_dirs and sql_server_dirs are stable, determine the union.
30223037
# We support client-only builds by "--without-server", but not vice versa,

include/atomic/nolock.h

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,7 @@
5050
# endif
5151
#endif
5252

53-
#if defined(make_atomic_cas_body) || defined(MY_ATOMICS_MADE)
54-
/*
55-
* We have atomics that require no locking
56-
*/
57-
#define MY_ATOMIC_NOLOCK
53+
#if defined(make_atomic_cas_body)
5854
/*
5955
Type not used so minimal size (emptry struct has different size between C
6056
and C++, zero-length array is gcc-specific).

0 commit comments

Comments
 (0)