summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <serg@serg.mylan>2005-01-26 09:54:12 +0100
committerunknown <serg@serg.mylan>2005-01-26 09:54:12 +0100
commitfdae13db98f63088b90d2b6d2726a81f37560aa3 (patch)
treeded6c587a2f9935db6accfaa14edfa14f4213e8f
parent56bf2ce986d6a41e0b8359d3f60d77d949a0e597 (diff)
parentcb271ffec80265c1960b7d909bcb004934baeb13 (diff)
downloadmariadb-git-fdae13db98f63088b90d2b6d2726a81f37560aa3.tar.gz
merged
-rw-r--r--.bzrignore3
-rwxr-xr-xBUILD/compile-pentium64-debug13
-rw-r--r--client/mysqlbinlog.cc15
-rw-r--r--innobase/include/eval0eval.ic2
-rw-r--r--innobase/include/univ.i6
-rw-r--r--sql/item_create.cc5
-rw-r--r--sql/mysqld.cc9
-rw-r--r--sql/sql_select.cc7
8 files changed, 34 insertions, 26 deletions
diff --git a/.bzrignore b/.bzrignore
index 460ea002bff..8a947d63b75 100644
--- a/.bzrignore
+++ b/.bzrignore
@@ -382,8 +382,11 @@ libmysqld/examples/link_sources
libmysqld/examples/my_readline.h
libmysqld/examples/mysql
libmysqld/examples/mysql.cc
+libmysqld/examples/mysql_client_test.c
+libmysqld/examples/mysql_client_test_embedded
libmysqld/examples/mysqltest
libmysqld/examples/mysqltest.c
+libmysqld/examples/mysqltest_embedded
libmysqld/examples/readline.cc
libmysqld/examples/sql_string.cc
libmysqld/examples/sql_string.h
diff --git a/BUILD/compile-pentium64-debug b/BUILD/compile-pentium64-debug
new file mode 100755
index 00000000000..1bbca36d851
--- /dev/null
+++ b/BUILD/compile-pentium64-debug
@@ -0,0 +1,13 @@
+#! /bin/sh
+
+path=`dirname $0`
+. "$path/SETUP.sh"
+
+extra_flags="$pentium64_cflags $debug_cflags"
+c_warnings="$c_warnings $debug_extra_warnings"
+cxx_warnings="$cxx_warnings $debug_extra_warnings"
+extra_configs="$pentium_configs $debug_configs $static_link"
+
+extra_configs="$extra_configs "
+
+. "$path/FINISH.sh"
diff --git a/client/mysqlbinlog.cc b/client/mysqlbinlog.cc
index 45daa64705a..caf126f2830 100644
--- a/client/mysqlbinlog.cc
+++ b/client/mysqlbinlog.cc
@@ -744,7 +744,7 @@ static int parse_args(int *argc, char*** argv)
static MYSQL* safe_connect()
{
- MYSQL *local_mysql = mysql_init(NULL);
+ MYSQL *local_mysql= mysql_init(NULL);
if (!local_mysql)
die("Failed on mysql_init");
@@ -752,9 +752,13 @@ static MYSQL* safe_connect()
if (opt_protocol)
mysql_options(local_mysql, MYSQL_OPT_PROTOCOL, (char*) &opt_protocol);
if (!mysql_real_connect(local_mysql, host, user, pass, 0, port, sock, 0))
- die("failed on connect: %s", mysql_error(local_mysql));
+ {
+ char errmsg[256];
+ strmake(errmsg, mysql_error(local_mysql), sizeof(errmsg)-1);
+ mysql_close(local_mysql);
+ die("failed on connect: %s", errmsg);
+ }
local_mysql->reconnect= 1;
-
return local_mysql;
}
@@ -781,9 +785,8 @@ static int check_master_version(MYSQL* mysql,
if (mysql_query(mysql, "SELECT VERSION()") ||
!(res = mysql_store_result(mysql)))
{
- char errmsg[FN_REFLEN];
-
- strmake(errmsg, mysql_error(mysql), sizeof(errmsg) - 1);
+ char errmsg[256];
+ strmake(errmsg, mysql_error(mysql), sizeof(errmsg)-1);
mysql_close(mysql);
die("Error checking master version: %s", errmsg);
}
diff --git a/innobase/include/eval0eval.ic b/innobase/include/eval0eval.ic
index 2530c869206..069cbfe5f37 100644
--- a/innobase/include/eval0eval.ic
+++ b/innobase/include/eval0eval.ic
@@ -205,8 +205,6 @@ eval_node_copy_and_alloc_val(
{
byte* data;
- ut_ad(UNIV_SQL_NULL > ULINT_MAX);
-
if (len == UNIV_SQL_NULL) {
dfield_set_len(que_node_get_val(node), len);
diff --git a/innobase/include/univ.i b/innobase/include/univ.i
index c413c3bc67e..8158c198e21 100644
--- a/innobase/include/univ.i
+++ b/innobase/include/univ.i
@@ -80,10 +80,8 @@ memory is read outside the allocated blocks. */
/* Make a non-inline debug version */
-#ifdef DBUG_ON
-# define UNIV_DEBUG
-#endif /* DBUG_ON */
/*
+#define UNIV_DEBUG
#define UNIV_MEM_DEBUG
#define UNIV_IBUF_DEBUG
#define UNIV_SYNC_DEBUG
@@ -122,7 +120,7 @@ by one. */
/* Definition for inline version */
#ifdef __WIN__
-#define UNIV_INLINE __inline
+#define UNIV_INLINE __inline
#else
/* config.h contains the right def for 'inline' for the current compiler */
#if (__GNUC__ == 2)
diff --git a/sql/item_create.cc b/sql/item_create.cc
index 8a5aeb6c9b7..9fb44658dd5 100644
--- a/sql/item_create.cc
+++ b/sql/item_create.cc
@@ -370,13 +370,14 @@ Item *create_func_space(Item *a)
{
uint dummy_errors;
sp= new Item_string("",0,cs);
- sp->str_value.copy(" ", 1, &my_charset_latin1, cs, &dummy_errors);
+ if (sp)
+ sp->str_value.copy(" ", 1, &my_charset_latin1, cs, &dummy_errors);
}
else
{
sp= new Item_string(" ",1,cs);
}
- return new Item_func_repeat(sp, a);
+ return sp ? new Item_func_repeat(sp, a) : 0;
}
Item *create_func_soundex(Item* a)
diff --git a/sql/mysqld.cc b/sql/mysqld.cc
index 3195b442de3..94eb34954ba 100644
--- a/sql/mysqld.cc
+++ b/sql/mysqld.cc
@@ -3036,12 +3036,11 @@ You should consider changing lower_case_table_names to 1 or 2",
(test_if_case_insensitive(mysql_real_data_home) == 1)))
{
if (global_system_variables.log_warnings)
- sql_print_warning("\
-You have forced lower_case_table_names to 2 through a command-line \
-option, even though your file system '%s' is case sensitive. This means \
-that you can create a table that you can then no longer access. \
-You should consider changing lower_case_table_names to 0.",
+ sql_print_warning("lower_case_table_names was set to 2, even though your "
+ "the file system '%s' is case sensitive. Now setting "
+ "lower_case_table_names to 0 to avoid future problems.",
mysql_real_data_home);
+ lower_case_table_names= 0;
}
select_thread=pthread_self();
diff --git a/sql/sql_select.cc b/sql/sql_select.cc
index dd1ac332df9..8e6929fdddf 100644
--- a/sql/sql_select.cc
+++ b/sql/sql_select.cc
@@ -4473,16 +4473,9 @@ find_best(JOIN *join,table_map rest_tables,uint idx,double record_count,
x = used key parts (1 <= x <= c)
*/
double rec_per_key;
-#if 0
- if (!(rec_per_key=(double)
- keyinfo->rec_per_key[keyinfo->key_parts-1]))
- rec_per_key=(double) s->records/rec+1;
-#else
rec_per_key= keyinfo->rec_per_key[keyinfo->key_parts-1] ?
(double) keyinfo->rec_per_key[keyinfo->key_parts-1] :
(double) s->records/rec+1;
-#endif
-
if (!s->records)
tmp=0;
else if (rec_per_key/(double) s->records >= 0.01)