summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--client/mysql.cc7
-rw-r--r--cmd-line-utils/libedit/readline/readline.h2
-rw-r--r--sql/item.h10
-rw-r--r--sql/sql_base.cc4
4 files changed, 13 insertions, 10 deletions
diff --git a/client/mysql.cc b/client/mysql.cc
index 15917e99a23..c3e79384938 100644
--- a/client/mysql.cc
+++ b/client/mysql.cc
@@ -2094,7 +2094,8 @@ print_table_data(MYSQL_RES *result)
separator.fill(separator.length()+length+2,'-');
separator.append('+');
}
- tee_puts(separator.c_ptr_safe(), PAGER);
+ separator.append('\0'); // End marker for \0
+ tee_puts((char*) separator.ptr(), PAGER);
if (column_names)
{
mysql_field_seek(result,0);
@@ -2107,7 +2108,7 @@ print_table_data(MYSQL_RES *result)
num_flag[off]= IS_NUM(field->type);
}
(void) tee_fputs("\n", PAGER);
- tee_puts(separator.c_ptr(), PAGER);
+ tee_puts((char*) separator.ptr(), PAGER);
}
while ((cur= mysql_fetch_row(result)))
@@ -2136,7 +2137,7 @@ print_table_data(MYSQL_RES *result)
}
(void) tee_fputs("\n", PAGER);
}
- tee_puts(separator.c_ptr(), PAGER);
+ tee_puts((char*) separator.ptr(), PAGER);
my_afree((gptr) num_flag);
}
diff --git a/cmd-line-utils/libedit/readline/readline.h b/cmd-line-utils/libedit/readline/readline.h
index 902179c208a..c43f71fb51d 100644
--- a/cmd-line-utils/libedit/readline/readline.h
+++ b/cmd-line-utils/libedit/readline/readline.h
@@ -73,7 +73,7 @@ typedef KEYMAP_ENTRY *Keymap;
#ifndef CTRL
#include <sys/ioctl.h>
-#ifdef __GLIBC__
+#if defined(__GLIBC__) || defined(__MWERKS__)
#include <sys/ttydefaults.h>
#endif
#ifndef CTRL
diff --git a/sql/item.h b/sql/item.h
index 0166c5e8707..2bcc9482f4e 100644
--- a/sql/item.h
+++ b/sql/item.h
@@ -1394,12 +1394,14 @@ public:
void print(String *str);
};
+
/*
The following class is used to optimize comparing of date and bigint columns
- We need to save the original item, to be able to set the field to the
- original value in 'opt_range'.
- An instance of Item_int_with_ref may refer to a signed or an unsigned
- integer.
+ We need to save the original item ('ref') to be able to call
+ ref->save_in_field(). This is used to create index search keys.
+
+ An instance of Item_int_with_ref may have signed or unsigned integer value.
+
*/
class Item_int_with_ref :public Item_int
diff --git a/sql/sql_base.cc b/sql/sql_base.cc
index 6439bc8a2d7..4a8303695e9 100644
--- a/sql/sql_base.cc
+++ b/sql/sql_base.cc
@@ -3306,8 +3306,8 @@ bool get_key_map_from_key_list(key_map *map, TABLE *table,
name->length(), 1)) <=
0)
{
- my_error(ER_KEY_COLUMN_DOES_NOT_EXITS, MYF(0),
- name->c_ptr_safe(), table->s->table_name);
+ my_error(ER_KEY_COLUMN_DOES_NOT_EXITS, MYF(0), name->c_ptr(),
+ table->real_name);
map->set_all();
return 1;
}