Skip to content

Commit fa81a82

Browse files
author
[email protected]/nosik.monty.fi
committed
Fixed a LOT of compiler warnings
Added missing DBUG_RETURN statements (in mysqldump.c) Added missing enums Fixed a lot of wrong DBUG_PRINT() statements, some of which could cause crashes Removed usage of %lld and %p in printf strings as these are not portable or produces different results on different systems.
1 parent 89570bf commit fa81a82

97 files changed

Lines changed: 504 additions & 417 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.

client/mysqldump.c

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,14 @@
3030
** master/autocommit code by Brian Aker <[email protected]>
3131
** SSL by
3232
** Andrei Errapart <[email protected]>
33-
** Tõnu Samuel <[email protected]>
33+
** Tõnu Samuel <[email protected]>
3434
** XML by Gary Huntress <[email protected]> 10/10/01, cleaned up
3535
** and adapted to mysqldump 05/11/01 by Jani Tolonen
3636
** Added --single-transaction option 06/06/2002 by Peter Zaitsev
3737
** 10 Jun 2003: SET NAMES and --no-set-names by Alexander Barkov
3838
*/
3939

40-
#define DUMP_VERSION "10.11"
40+
#define DUMP_VERSION "10.12"
4141

4242
#include <my_global.h>
4343
#include <my_sys.h>
@@ -540,8 +540,10 @@ static void write_header(FILE *sql_file, char *db_name)
540540
if (opt_xml)
541541
{
542542
fputs("<?xml version=\"1.0\"?>\n", sql_file);
543-
/* Schema reference. Allows use of xsi:nil for NULL values and
544-
xsi:type to define an element's data type. */
543+
/*
544+
Schema reference. Allows use of xsi:nil for NULL values and
545+
xsi:type to define an element's data type.
546+
*/
545547
fputs("<mysqldump ", sql_file);
546548
fputs("xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"",
547549
sql_file);
@@ -2349,7 +2351,7 @@ static void dump_table(char *table, char *db)
23492351
The "table" could be a view. If so, we don't do anything here.
23502352
*/
23512353
if (strcmp (table_type, "VIEW") == 0)
2352-
return;
2354+
DBUG_VOID_RETURN;
23532355

23542356
/* Check --no-data flag */
23552357
if (opt_no_data)
@@ -2657,16 +2659,16 @@ static void dump_table(char *table, char *db)
26572659
{
26582660
if (opt_hex_blob && is_blob && length)
26592661
{
2660-
/* Define xsi:type="xs:hexBinary" for hex encoded data */
2661-
print_xml_tag(md_result_file, "\t\t", "", "field", "name=",
2662-
field->name, "xsi:type=", "xs:hexBinary", NullS);
2663-
print_blob_as_hex(md_result_file, row[i], length);
2662+
/* Define xsi:type="xs:hexBinary" for hex encoded data */
2663+
print_xml_tag(md_result_file, "\t\t", "", "field", "name=",
2664+
field->name, "xsi:type=", "xs:hexBinary", NullS);
2665+
print_blob_as_hex(md_result_file, row[i], length);
26642666
}
26652667
else
26662668
{
2667-
print_xml_tag(md_result_file, "\t\t", "", "field", "name=",
2668-
field->name, NullS);
2669-
print_quoted_xml(md_result_file, row[i], length);
2669+
print_xml_tag(md_result_file, "\t\t", "", "field", "name=",
2670+
field->name, NullS);
2671+
print_quoted_xml(md_result_file, row[i], length);
26702672
}
26712673
fputs("</field>\n", md_result_file);
26722674
}
@@ -3155,10 +3157,8 @@ static int dump_all_tables_in_db(char *database)
31553157
afterdot= strmov(hash_key, database);
31563158
*afterdot++= '.';
31573159

3158-
if (!strcmp(database, NDB_REP_DB)) /* Skip cluster internal database */
3159-
return 0;
31603160
if (init_dumping(database, init_dumping_tables))
3161-
return 1;
3161+
DBUG_RETURN(1);
31623162
if (opt_xml)
31633163
print_xml_tag(md_result_file, "", "\n", "database", "name=", database, NullS);
31643164
if (lock_tables)
@@ -3218,7 +3218,7 @@ static int dump_all_tables_in_db(char *database)
32183218
fprintf(md_result_file,"\n--\n-- Flush Grant Tables \n--\n");
32193219
fprintf(md_result_file,"\n/*! FLUSH PRIVILEGES */;\n");
32203220
}
3221-
return 0;
3221+
DBUG_RETURN(0);
32223222
} /* dump_all_tables_in_db */
32233223

32243224

client/mysqlslap.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1031,7 +1031,7 @@ run_scheduler(stats *sptr, statement *stmts, uint concur, ulonglong limit)
10311031
for (x= 0; x < concur; x++)
10321032
{
10331033
int pid;
1034-
DBUG_PRINT("info", ("x %d concurrency %d", x, concurrency));
1034+
DBUG_PRINT("info", ("x: %d concurrency: %u", x, *concurrency));
10351035
pid= fork();
10361036
switch(pid)
10371037
{

client/mysqltest.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ enum {
8080
OPT_SSL_CA, OPT_SSL_CAPATH, OPT_SSL_CIPHER, OPT_PS_PROTOCOL,
8181
OPT_SP_PROTOCOL, OPT_CURSOR_PROTOCOL, OPT_VIEW_PROTOCOL,
8282
OPT_SSL_VERIFY_SERVER_CERT, OPT_MAX_CONNECT_RETRIES,
83-
OPT_MARK_PROGRESS, OPT_CHARSETS_DIR, OPT_LOG_DIR, OPT_DEBUG_INFO};
83+
OPT_MARK_PROGRESS, OPT_CHARSETS_DIR, OPT_LOG_DIR, OPT_DEBUG_INFO
8484
};
8585

8686
static int record= 0, opt_sleep= -1;

extra/yassl/taocrypt/include/algebra.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ class TAOCRYPT_NO_VTABLE AbstractRing : public AbstractGroup
7575
typedef Integer Element;
7676

7777
AbstractRing() : AbstractGroup() {m_mg.m_pRing = this;}
78-
AbstractRing(const AbstractRing &source) {m_mg.m_pRing = this;}
78+
AbstractRing(const AbstractRing &source) :AbstractGroup() {m_mg.m_pRing = this;}
7979
AbstractRing& operator=(const AbstractRing &source) {return *this;}
8080

8181
virtual bool IsUnit(const Element &a) const =0;

mysql-test/include/im_check_env.inc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,5 @@ SHOW VARIABLES LIKE 'server_id';
2222
# Check that IM understands that mysqld1 is online, while mysqld2 is
2323
# offline.
2424

25+
--replace_result starting XXXXX online XXXXX
2526
SHOW INSTANCES;

mysql-test/mysql-test-run.pl

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1576,7 +1576,8 @@ ()
15761576
if ( $opt_source_dist )
15771577
{
15781578
push(@ld_library_paths, "$glob_basedir/libmysql/.libs/",
1579-
"$glob_basedir/libmysql_r/.libs/");
1579+
"$glob_basedir/libmysql_r/.libs/",
1580+
"$glob_basedir/zlib.libs/");
15801581
}
15811582
else
15821583
{
@@ -2992,10 +2993,6 @@ ($)
29922993
# Save info from this testcase run to mysqltest.log
29932994
mtr_appendfile_to_file($path_timefile, $path_mysqltest_log)
29942995
if -f $path_timefile;
2995-
2996-
# Remove the file that mysqltest writes info to
2997-
unlink($path_timefile);
2998-
29992996
}
30002997

30012998

@@ -3183,6 +3180,9 @@ ($)
31833180
}
31843181
}
31853182

3183+
# Remove the file that mysqltest writes info to
3184+
unlink($path_timefile);
3185+
31863186
# ----------------------------------------------------------------------
31873187
# Stop Instance Manager if we are processing an IM-test case.
31883188
# ----------------------------------------------------------------------
@@ -4094,7 +4094,6 @@ ($)
40944094
}
40954095

40964096
if ( $clusters->[0]->{'pid'} and ! $master->[1]->{'pid'} )
4097-
{
40984097
{
40994098
# Test needs cluster, start an extra mysqld connected to cluster
41004099

@@ -4848,4 +4847,3 @@ ($)
48484847
mtr_exit(1);
48494848

48504849
}
4851-

mysql-test/r/ctype_cp1250_ch.result

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
drop table if exists t1;
12
DROP TABLE IF EXISTS t1;
23
SHOW COLLATION LIKE 'cp1250_czech_cs';
34
Collation Charset Id Default Compiled Sortlen

mysql-test/r/im_cmd_line.result

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Variable_name Value
33
server_id 1
44
SHOW INSTANCES;
55
instance_name state
6-
mysqld1 starting
6+
mysqld1 XXXXX
77
mysqld2 offline
88
--> Listing users...
99
im_admin

mysql-test/r/im_daemon_life_cycle.result

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Variable_name Value
33
server_id 1
44
SHOW INSTANCES;
55
instance_name state
6-
mysqld1 online
6+
mysqld1 XXXXX
77
mysqld2 offline
88
Killing the process...
99
Sleeping...

mysql-test/r/im_instance_conf.result

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Variable_name Value
33
server_id 1
44
SHOW INSTANCES;
55
instance_name state
6-
mysqld1 online
6+
mysqld1 XXXXX
77
mysqld2 offline
88
--------------------------------------------------------------------
99
server_id = 1

0 commit comments

Comments
 (0)