summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Widenius <monty@askmonty.org>2011-05-04 21:51:44 +0300
committerMichael Widenius <monty@askmonty.org>2011-05-04 21:51:44 +0300
commita3af6f0f3d023bcbba7be013343b46a400cf0648 (patch)
treeec375d94d2adfc4765bcf46b095155dbe0158ec5
parentca67f01baefbdc1e50ee3f7ca2bbe759d8017166 (diff)
downloadmariadb-git-a3af6f0f3d023bcbba7be013343b46a400cf0648.tar.gz
Fixed build errors on centos5-amd64-minimal, where we compile with very few character sets
Fixed compiler warnings client/readline.cc: Fixed compiler warning mysql-test/suite/innodb/t/innodb_bug60049.test: This test failed when running with --mysqld=--loose-innodb-fast-shutdown=2 which we do on some machines mysql-test/t/mysqldump.test: Only run test if utf8 is used sql/log.cc: Fixed compiler warning sql/mysql_priv.h: Fixed compiler warnings tests/mysql_client_test.c: Don't abort test if ucs2 is not in use.
-rw-r--r--client/readline.cc1
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug60049.test6
-rw-r--r--mysql-test/t/mysqldump.test4
-rw-r--r--sql/log.cc1
-rw-r--r--sql/mysql_priv.h16
-rw-r--r--tests/mysql_client_test.c3
6 files changed, 22 insertions, 9 deletions
diff --git a/client/readline.cc b/client/readline.cc
index 946cb582977..4edccebef39 100644
--- a/client/readline.cc
+++ b/client/readline.cc
@@ -56,6 +56,7 @@ char *batch_readline(LINE_BUFFER *line_buff)
{
char *pos;
ulong out_length;
+ LINT_INIT(out_length);
if (!(pos=intern_read_line(line_buff, &out_length)))
return 0;
diff --git a/mysql-test/suite/innodb/t/innodb_bug60049.test b/mysql-test/suite/innodb/t/innodb_bug60049.test
index ec4e3b8de7e..1110f619862 100644
--- a/mysql-test/suite/innodb/t/innodb_bug60049.test
+++ b/mysql-test/suite/innodb/t/innodb_bug60049.test
@@ -5,6 +5,12 @@
-- source include/not_embedded.inc
-- source include/have_innodb.inc
+if (`SELECT @@innodb_fast_shutdown != 0`)
+
+{
+ skip Need innodb_fast_shutdown=0;
+}
+
CREATE TABLE t(a INT)ENGINE=InnoDB;
RENAME TABLE t TO u;
DROP TABLE u;
diff --git a/mysql-test/t/mysqldump.test b/mysql-test/t/mysqldump.test
index 00d9339fcf4..99537618011 100644
--- a/mysql-test/t/mysqldump.test
+++ b/mysql-test/t/mysqldump.test
@@ -6,6 +6,10 @@ call mtr.add_suppression("@003f.frm' \\(errno: 22\\)");
# Binlog is required
--source include/have_log_bin.inc
+# utf8 is required
+let collation=utf8_unicode_ci;
+--source include/have_collation.inc
+
# Save the initial number of concurrent sessions
--source include/count_sessions.inc
diff --git a/sql/log.cc b/sql/log.cc
index c0feb753bef..ad546cc3642 100644
--- a/sql/log.cc
+++ b/sql/log.cc
@@ -1877,6 +1877,7 @@ static int find_uniq_filename(char *name)
size_t buf_length, length;
char *start, *end;
DBUG_ENTER("find_uniq_filename");
+ LINT_INIT(number);
length= dirname_part(buff, name, &buf_length);
start= name + length;
diff --git a/sql/mysql_priv.h b/sql/mysql_priv.h
index 0a62c17e2fc..24c8ba0b257 100644
--- a/sql/mysql_priv.h
+++ b/sql/mysql_priv.h
@@ -909,14 +909,14 @@ struct Query_cache_query_flags
(((L)->sql_command == SQLCOM_SELECT) && (L)->safe_to_cache_query)
#else
#define QUERY_CACHE_FLAGS_SIZE 0
-#define query_cache_store_query(A, B)
-#define query_cache_destroy()
-#define query_cache_result_size_limit(A)
-#define query_cache_init()
-#define query_cache_resize(A)
-#define query_cache_set_min_res_unit(A)
-#define query_cache_invalidate3(A, B, C)
-#define query_cache_invalidate1(A)
+#define query_cache_store_query(A, B) do { } while(0)
+#define query_cache_destroy() do { } while(0)
+#define query_cache_result_size_limit(A) do { } while(0)
+#define query_cache_init() do { } while(0)
+#define query_cache_resize(A) do { } while(0)
+#define query_cache_set_min_res_unit(A) do { } while(0)
+#define query_cache_invalidate3(A, B, C) do { } while(0)
+#define query_cache_invalidate1(A) do { } while(0)
#define query_cache_send_result_to_client(A, B, C) 0
#define query_cache_invalidate_by_MyISAM_filename_ref NULL
diff --git a/tests/mysql_client_test.c b/tests/mysql_client_test.c
index 22d62d9a661..bbb98229222 100644
--- a/tests/mysql_client_test.c
+++ b/tests/mysql_client_test.c
@@ -18466,7 +18466,8 @@ static void test_bug58036()
if (!opt_silent)
printf("Got mysql_real_connect() error (expected): %s (%d)\n",
mysql_error(conn), mysql_errno(conn));
- DIE_UNLESS(mysql_errno(conn) == ER_WRONG_VALUE_FOR_VAR);
+ DIE_UNLESS(mysql_errno(conn) == ER_WRONG_VALUE_FOR_VAR ||
+ mysql_errno(conn)== CR_CANT_READ_CHARSET);
mysql_close(conn);