Skip to content

Commit d4d4f85

Browse files
author
joerg@trift2.
committed
Manual merge of parallel development in separate team trees.
2 parents 400aec9 + 20ce606 commit d4d4f85

215 files changed

Lines changed: 11204 additions & 7265 deletions

File tree

Some content is hidden

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

BUILD/compile-solaris-sparc-forte

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,13 @@
33
# Assume Forte is installed in /opt/SUNWSpro and ld is installed in
44
# /usr/ccs/bin
55

6-
PATH=/opt/SUNWspro/bin/:/usr/ccs/bin:$PATH
6+
PATH=/opt/SUNWspro/bin:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin:$PATH
7+
8+
prefix="/usr/local/mysql"
9+
if test -n "$MYSQL_BUILD_PREFIX"
10+
then
11+
prefix="$MYSQL_BUILD_PREFIX"
12+
fi
713

814
make -k maintainer-clean || true
915
/bin/rm -f */.deps/*.P config.cache
@@ -12,20 +18,19 @@ path=`dirname $0`
1218
. "$path/autorun.sh"
1319

1420
# For "optimal" code for this computer add -fast to EXTRA
15-
# To compile 64 bit, add -xarch=v9 to EXTRA_64_BIT
21+
# To compile 32/64 bit, uncomment/comment EXTRA_64_BIT
1622

17-
EXTRA_64_BIT="-xarch=v9" # Remove comment to get 64 bit binaries
23+
EXTRA_64_BIT="-m64"
1824
EXTRA="-fast" # Remove comment to target current machine
1925

2026
#
2127
# The following should not need to be touched
2228
#
2329

2430
STD="-mt -D_FORTEC_ $EXTRA $EXTRA_64_BIT"
25-
ASFLAGS="$EXTRA_64_BIT" \
2631
CC=cc-5.0 CFLAGS="-Xa -xstrconst $STD" \
2732
CXX=CC CXXFLAGS="-noex $STD" \
28-
./configure --prefix=/usr/local/mysql --enable-assembler --with-extra-charsets=complex --enable-thread-safe-client
33+
./configure --prefix=/usr/local/mysql --enable-assembler --with-extra-charsets=complex --enable-thread-safe-client --prefix=$PREFIX
2934

3035
make -j 4
3136
if [ $? = 0 ]

CMakeLists.txt

Lines changed: 9 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -21,22 +21,6 @@ INCLUDE(win/configure.data)
2121
# Hardcode support for CSV storage engine
2222
SET(WITH_CSV_STORAGE_ENGINE TRUE)
2323

24-
# CMAKE will not allow custom VS7+ configurations. mysqld and libmysqld
25-
# cannot be built at the same time as they require different configurations
26-
IF(EMBEDDED_ONLY)
27-
ADD_DEFINITIONS(-DEMBEDDED_LIBRARY)
28-
# By default, CMake will create Release, Debug, RelWithDebInfo and MinSizeRel
29-
# configurations. The EMBEDDED_ONLY build parameter is necessary because CMake
30-
# doesn't support custom build configurations for VS2005. Since the Debug
31-
# configuration does not work properly with USE_TLS defined
32-
# (see mysys/CMakeLists.txt) the easiest way to debug the Embedded Server is to
33-
# use the RelWithDebInfo configuration without optimizations.
34-
#
35-
# Debug default CXX_FLAGS "/D_DEBUG /MDd /Zi /Ob0 /Od /RTC1"
36-
# RelWithDebInfo default CXX_FLAGS "/MD /Zi /O2 /Ob1 /D NDEBUG"
37-
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "/MD /Zi /Od /Ob0 /D NDEBUG" CACHE STRING "No Optimization" FORCE)
38-
ENDIF(EMBEDDED_ONLY)
39-
4024
CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/include/mysql_version.h.in
4125
${CMAKE_SOURCE_DIR}/include/mysql_version.h @ONLY)
4226

@@ -154,7 +138,9 @@ IF(CMAKE_GENERATOR MATCHES "Visual Studio 7" OR
154138
ENDIF(CMAKE_GENERATOR MATCHES "Visual Studio 7" OR
155139
CMAKE_GENERATOR MATCHES "Visual Studio 8")
156140

157-
ADD_DEFINITIONS("-D_WINDOWS -D__WIN__ -D_CRT_SECURE_NO_DEPRECATE")
141+
IF(WIN32)
142+
ADD_DEFINITIONS("-D_WINDOWS -D__WIN__ -D_CRT_SECURE_NO_DEPRECATE")
143+
ENDIF(WIN32)
158144

159145
IF(EMBED_MANIFESTS)
160146
# Search for the tools (mt, makecat, signtool) necessary for embedding
@@ -229,7 +215,7 @@ ADD_SUBDIRECTORY(extra)
229215
ADD_SUBDIRECTORY(storage/heap)
230216
ADD_SUBDIRECTORY(storage/myisam)
231217
ADD_SUBDIRECTORY(storage/myisammrg)
232-
218+
ADD_SUBDIRECTORY(client)
233219
IF(WITH_ARCHIVE_STORAGE_ENGINE)
234220
ADD_SUBDIRECTORY(storage/archive)
235221
ENDIF(WITH_ARCHIVE_STORAGE_ENGINE)
@@ -248,13 +234,11 @@ ENDIF(WITH_FEDERATED_STORAGE_ENGINE)
248234
IF(WITH_INNOBASE_STORAGE_ENGINE)
249235
ADD_SUBDIRECTORY(storage/innobase)
250236
ENDIF(WITH_INNOBASE_STORAGE_ENGINE)
237+
ADD_SUBDIRECTORY(sql)
238+
ADD_SUBDIRECTORY(server-tools/instance-manager)
251239
ADD_SUBDIRECTORY(libmysql)
252-
IF(EMBEDDED_ONLY)
240+
ADD_SUBDIRECTORY(tests)
241+
IF(WITH_EMBEDDED_SERVER)
253242
ADD_SUBDIRECTORY(libmysqld)
254243
ADD_SUBDIRECTORY(libmysqld/examples)
255-
ELSE(EMBEDDED_ONLY)
256-
ADD_SUBDIRECTORY(client)
257-
ADD_SUBDIRECTORY(sql)
258-
ADD_SUBDIRECTORY(server-tools/instance-manager)
259-
ADD_SUBDIRECTORY(tests)
260-
ENDIF(EMBEDDED_ONLY)
244+
ENDIF(WITH_EMBEDDED_SERVER)

client/mysql.cc

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,8 @@ void tee_putc(int c, FILE *file);
196196
static void tee_print_sized_data(const char *, unsigned int, unsigned int, bool);
197197
/* The names of functions that actually do the manipulation. */
198198
static int get_options(int argc,char **argv);
199+
extern "C" my_bool get_one_option(int optid, const struct my_option *opt,
200+
char *argument);
199201
static int com_quit(String *str,char*),
200202
com_go(String *str,char*), com_ego(String *str,char*),
201203
com_print(String *str,char*),
@@ -349,8 +351,8 @@ static ulong start_timer(void);
349351
static void end_timer(ulong start_time,char *buff);
350352
static void mysql_end_timer(ulong start_time,char *buff);
351353
static void nice_time(double sec,char *buff,bool part_second);
352-
static sig_handler mysql_end(int sig);
353-
static sig_handler handle_sigint(int sig);
354+
extern "C" sig_handler mysql_end(int sig);
355+
extern "C" sig_handler handle_sigint(int sig);
354356

355357
int main(int argc,char *argv[])
356358
{
@@ -814,7 +816,7 @@ and you are welcome to modify and redistribute it under the GPL license\n");
814816
}
815817

816818

817-
static my_bool
819+
my_bool
818820
get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
819821
char *argument)
820822
{
@@ -1427,7 +1429,7 @@ static bool add_line(String &buffer,char *line,char *in_string,
14271429
#ifdef HAVE_READLINE
14281430

14291431
static char *new_command_generator(const char *text, int);
1430-
static char **new_mysql_completion (const char *text, int start, int end);
1432+
extern "C" char **new_mysql_completion (const char *text, int start, int end);
14311433

14321434
/*
14331435
Tell the GNU Readline library how to complete. We want to try to complete
@@ -1436,9 +1438,9 @@ static char **new_mysql_completion (const char *text, int start, int end);
14361438
*/
14371439

14381440
#if defined(USE_NEW_READLINE_INTERFACE) || defined(USE_LIBEDIT_INTERFACE)
1439-
char *no_completion(const char*,int)
1441+
extern "C" char *no_completion(const char*,int)
14401442
#else
1441-
char *no_completion()
1443+
extern "C" char *no_completion()
14421444
#endif
14431445
{
14441446
return 0; /* No filename completion */
@@ -1540,9 +1542,9 @@ static void initialize_readline (char *name)
15401542
array of matches, or NULL if there aren't any.
15411543
*/
15421544

1543-
static char **new_mysql_completion (const char *text,
1544-
int start __attribute__((unused)),
1545-
int end __attribute__((unused)))
1545+
char **new_mysql_completion (const char *text,
1546+
int start __attribute__((unused)),
1547+
int end __attribute__((unused)))
15461548
{
15471549
if (!status.batch && !quick)
15481550
#if defined(USE_NEW_READLINE_INTERFACE)

client/mysql_upgrade.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,7 @@ static int run_query(const char *query, DYNAMIC_STRING *ds_res,
451451
MYF(MY_WME))) < 0)
452452
die("Failed to create temporary file for defaults");
453453

454-
if (my_write(fd, query, strlen(query),
454+
if (my_write(fd, (uchar*) query, strlen(query),
455455
MYF(MY_FNABP | MY_WME)))
456456
die("Failed to write to '%s'", query_file_path);
457457

client/mysqladmin.cc

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,12 @@ static uint ex_var_count, max_var_length, max_val_length;
7171

7272
static void print_version(void);
7373
static void usage(void);
74+
extern "C" my_bool get_one_option(int optid, const struct my_option *opt,
75+
char *argument);
7476
static my_bool sql_connect(MYSQL *mysql, uint wait);
7577
static int execute_commands(MYSQL *mysql,int argc, char **argv);
7678
static int drop_db(MYSQL *mysql,const char *db);
77-
static sig_handler endprog(int signal_number);
79+
extern "C" sig_handler endprog(int signal_number);
7880
static void nice_time(ulong sec,char *buff);
7981
static void print_header(MYSQL_RES *result);
8082
static void print_top(MYSQL_RES *result);
@@ -230,7 +232,7 @@ static struct my_option my_long_options[] =
230232

231233
static const char *load_default_groups[]= { "mysqladmin","client",0 };
232234

233-
static my_bool
235+
my_bool
234236
get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
235237
char *argument)
236238
{
@@ -430,7 +432,7 @@ int main(int argc,char *argv[])
430432
}
431433

432434

433-
static sig_handler endprog(int signal_number __attribute__((unused)))
435+
sig_handler endprog(int signal_number __attribute__((unused)))
434436
{
435437
interrupted=1;
436438
}

client/mysqlbinlog.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1030,14 +1030,14 @@ static int dump_log_entries(const char* logname)
10301030
like CREATE PROCEDURE safely
10311031
*/
10321032
fprintf(result_file, "DELIMITER /*!*/;\n");
1033-
strcpy(print_event_info.delimiter, "/*!*/;");
1033+
strmov(print_event_info.delimiter, "/*!*/;");
10341034

10351035
rc= (remote_opt ? dump_remote_log_entries(&print_event_info, logname) :
10361036
dump_local_log_entries(&print_event_info, logname));
10371037

10381038
/* Set delimiter back to semicolon */
10391039
fprintf(result_file, "DELIMITER ;\n");
1040-
strcpy(print_event_info.delimiter, ";");
1040+
strmov(print_event_info.delimiter, ";");
10411041
return rc;
10421042
}
10431043

client/mysqlcheck.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -677,7 +677,7 @@ static void print_result()
677677
*/
678678
if (found_error && opt_auto_repair && what_to_do != DO_REPAIR &&
679679
strcmp(row[3],"OK"))
680-
insert_dynamic(&tables4repair, prev);
680+
insert_dynamic(&tables4repair, (uchar*) prev);
681681
found_error=0;
682682
if (opt_silent)
683683
continue;
@@ -697,7 +697,7 @@ static void print_result()
697697
}
698698
/* add the last table to be repaired to the list */
699699
if (found_error && opt_auto_repair && what_to_do != DO_REPAIR)
700-
insert_dynamic(&tables4repair, prev);
700+
insert_dynamic(&tables4repair, (uchar*) prev);
701701
mysql_free_result(res);
702702
}
703703

client/mysqldump.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3913,9 +3913,9 @@ static int init_dumping(char *database, int init_func(char*))
39133913

39143914
/* Return 1 if we should copy the table */
39153915

3916-
my_bool include_table(const char* hash_key, uint len)
3916+
my_bool include_table(const uchar *hash_key, size_t len)
39173917
{
3918-
return !hash_search(&ignore_table, (uchar*) hash_key, len);
3918+
return !hash_search(&ignore_table, hash_key, len);
39193919
}
39203920

39213921

@@ -3943,7 +3943,7 @@ static int dump_all_tables_in_db(char *database)
39433943
for (numrows= 0 ; (table= getTableName(1)) ; )
39443944
{
39453945
char *end= strmov(afterdot, table);
3946-
if (include_table(hash_key,end - hash_key))
3946+
if (include_table((uchar*) hash_key,end - hash_key))
39473947
{
39483948
numrows++;
39493949
dynstr_append_checked(&query, quote_name(table, table_buff, 1));
@@ -3964,7 +3964,7 @@ static int dump_all_tables_in_db(char *database)
39643964
while ((table= getTableName(0)))
39653965
{
39663966
char *end= strmov(afterdot, table);
3967-
if (include_table(hash_key, end - hash_key))
3967+
if (include_table((uchar*) hash_key, end - hash_key))
39683968
{
39693969
dump_table(table,database);
39703970
my_free(order_by, MYF(MY_ALLOW_ZERO_PTR));
@@ -4043,7 +4043,7 @@ static my_bool dump_all_views_in_db(char *database)
40434043
for (numrows= 0 ; (table= getTableName(1)); )
40444044
{
40454045
char *end= strmov(afterdot, table);
4046-
if (include_table(hash_key,end - hash_key))
4046+
if (include_table((uchar*) hash_key,end - hash_key))
40474047
{
40484048
numrows++;
40494049
dynstr_append_checked(&query, quote_name(table, table_buff, 1));
@@ -4064,7 +4064,7 @@ static my_bool dump_all_views_in_db(char *database)
40644064
while ((table= getTableName(0)))
40654065
{
40664066
char *end= strmov(afterdot, table);
4067-
if (include_table(hash_key, end - hash_key))
4067+
if (include_table((uchar*) hash_key, end - hash_key))
40684068
get_view_structure(table, database);
40694069
}
40704070
if (opt_xml)

client/mysqlslap.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1354,7 +1354,7 @@ get_options(int *argc,char ***argv)
13541354
}
13551355
tmp_string= (char *)my_malloc(sbuf.st_size + 1,
13561356
MYF(MY_ZEROFILL|MY_FAE|MY_WME));
1357-
my_read(data_file, tmp_string, sbuf.st_size, MYF(0));
1357+
my_read(data_file, (uchar*) tmp_string, sbuf.st_size, MYF(0));
13581358
tmp_string[sbuf.st_size]= '\0';
13591359
my_close(data_file,MYF(0));
13601360
parse_delimiter(tmp_string, &create_statements, delimiter[0]);
@@ -1381,7 +1381,7 @@ get_options(int *argc,char ***argv)
13811381
}
13821382
tmp_string= (char *)my_malloc(sbuf.st_size + 1,
13831383
MYF(MY_ZEROFILL|MY_FAE|MY_WME));
1384-
my_read(data_file, tmp_string, sbuf.st_size, MYF(0));
1384+
my_read(data_file, (uchar*) tmp_string, sbuf.st_size, MYF(0));
13851385
tmp_string[sbuf.st_size]= '\0';
13861386
my_close(data_file,MYF(0));
13871387
if (user_supplied_query)
@@ -1412,7 +1412,7 @@ get_options(int *argc,char ***argv)
14121412
}
14131413
tmp_string= (char *)my_malloc(sbuf.st_size + 1,
14141414
MYF(MY_ZEROFILL|MY_FAE|MY_WME));
1415-
my_read(data_file, tmp_string, sbuf.st_size, MYF(0));
1415+
my_read(data_file, (uchar*) tmp_string, sbuf.st_size, MYF(0));
14161416
tmp_string[sbuf.st_size]= '\0';
14171417
my_close(data_file,MYF(0));
14181418
if (user_supplied_pre_statements)
@@ -1443,7 +1443,7 @@ get_options(int *argc,char ***argv)
14431443
}
14441444
tmp_string= (char *)my_malloc(sbuf.st_size + 1,
14451445
MYF(MY_ZEROFILL|MY_FAE|MY_WME));
1446-
my_read(data_file, tmp_string, sbuf.st_size, MYF(0));
1446+
my_read(data_file, (uchar*) tmp_string, sbuf.st_size, MYF(0));
14471447
tmp_string[sbuf.st_size]= '\0';
14481448
my_close(data_file,MYF(0));
14491449
if (user_supplied_post_statements)
@@ -2076,7 +2076,7 @@ print_conclusions_csv(conclusions *con)
20762076
con->users, /* Children used */
20772077
con->avg_rows /* Queries run */
20782078
);
2079-
my_write(csv_file, buffer, (uint)strlen(buffer), MYF(0));
2079+
my_write(csv_file, (uchar*) buffer, (uint)strlen(buffer), MYF(0));
20802080
}
20812081

20822082
void

client/mysqltest.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1514,7 +1514,7 @@ void var_query_set(VAR *var, const char *query, const char** query_end)
15141514

15151515
void var_set_query_get_value(struct st_command *command, VAR *var)
15161516
{
1517-
ulong row_no;
1517+
long row_no;
15181518
int col_no= -1;
15191519
MYSQL_RES* res;
15201520
MYSQL* mysql= &cur_con->mysql;
@@ -1591,7 +1591,7 @@ void var_set_query_get_value(struct st_command *command, VAR *var)
15911591

15921592
while ((row= mysql_fetch_row(res)))
15931593
{
1594-
if (++rows == row_no)
1594+
if (++rows == (ulong) row_no)
15951595
{
15961596

15971597
DBUG_PRINT("info", ("At row %ld, column %d is '%s'",
@@ -2584,7 +2584,7 @@ void do_send_quit(struct st_command *command)
25842584
DBUG_PRINT("info", ("con->name: %s", con->name));
25852585
if (!strcmp(con->name, name))
25862586
{
2587-
simple_command(&con->mysql,COM_QUIT,NullS,0,1);
2587+
simple_command(&con->mysql,COM_QUIT,0,0,1);
25882588
DBUG_VOID_RETURN;
25892589
}
25902590
}

0 commit comments

Comments
 (0)