#At file:///usr/home/serg/Abk/mysql/5.1/ based on revid:mhansson@stripped
2893 Sergei Golubchik 2009-05-04
bug#44166
removed few sprintf's
modified:
sql/item.cc
sql/sql_table.cc
sql/sql_update.cc
sql/unireg.cc
=== modified file 'sql/item.cc'
--- a/sql/item.cc 2009-04-28 00:27:38 +0000
+++ b/sql/item.cc 2009-05-04 20:33:23 +0000
@@ -3390,14 +3390,12 @@ static void mark_as_dependent(THD *thd,
current->mark_as_dependent(last);
if (thd->lex->describe & DESCRIBE_EXTENDED)
{
- char warn_buff[MYSQL_ERRMSG_SIZE];
- sprintf(warn_buff, ER(ER_WARN_FIELD_RESOLVED),
- db_name, (db_name[0] ? "." : ""),
- table_name, (table_name [0] ? "." : ""),
- resolved_item->field_name,
- current->select_number, last->select_number);
- push_warning(thd, MYSQL_ERROR::WARN_LEVEL_NOTE,
- ER_WARN_FIELD_RESOLVED, warn_buff);
+ push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_NOTE,
+ ER_WARN_FIELD_RESOLVED, ER(ER_WARN_FIELD_RESOLVED),
+ db_name, (db_name[0] ? "." : ""),
+ table_name, (table_name [0] ? "." : ""),
+ resolved_item->field_name,
+ current->select_number, last->select_number);
}
}
=== modified file 'sql/sql_table.cc'
--- a/sql/sql_table.cc 2009-04-23 17:55:32 +0000
+++ b/sql/sql_table.cc 2009-05-04 20:33:23 +0000
@@ -3126,7 +3126,7 @@ static bool prepare_blob_field(THD *thd,
}
sql_field->sql_type= MYSQL_TYPE_BLOB;
sql_field->flags|= BLOB_FLAG;
- sprintf(warn_buff, ER(ER_AUTO_CONVERT), sql_field->field_name,
+ my_snprintf(warn_buff, sizeof(warn_buff), ER(ER_AUTO_CONVERT), sql_field->field_name,
(sql_field->charset == &my_charset_bin) ? "VARBINARY" : "VARCHAR",
(sql_field->charset == &my_charset_bin) ? "BLOB" : "TEXT");
push_warning(thd, MYSQL_ERROR::WARN_LEVEL_NOTE, ER_AUTO_CONVERT,
=== modified file 'sql/sql_update.cc'
--- a/sql/sql_update.cc 2009-04-08 23:42:51 +0000
+++ b/sql/sql_update.cc 2009-05-04 20:33:23 +0000
@@ -818,7 +818,7 @@ int mysql_update(THD *thd,
if (error < 0)
{
char buff[STRING_BUFFER_USUAL_SIZE];
- sprintf(buff, ER(ER_UPDATE_INFO), (ulong) found, (ulong) updated,
+ my_snprintf(buff, sizeof(buff), ER(ER_UPDATE_INFO), (ulong) found, (ulong) updated,
(ulong) thd->cuted_fields);
thd->row_count_func=
(thd->client_capabilities & CLIENT_FOUND_ROWS) ? found : updated;
@@ -2066,8 +2066,8 @@ bool multi_update::send_eof()
id= thd->arg_of_last_insert_id_function ?
thd->first_successful_insert_id_in_prev_stmt : 0;
- sprintf(buff, ER(ER_UPDATE_INFO), (ulong) found, (ulong) updated,
- (ulong) thd->cuted_fields);
+ my_snprintf(buff, sizeof(buff), ER(ER_UPDATE_INFO),
+ (ulong) found, (ulong) updated, (ulong) thd->cuted_fields);
thd->row_count_func=
(thd->client_capabilities & CLIENT_FOUND_ROWS) ? found : updated;
::my_ok(thd, (ulong) thd->row_count_func, id, buff);
=== modified file 'sql/unireg.cc'
--- a/sql/unireg.cc 2009-03-17 20:29:24 +0000
+++ b/sql/unireg.cc 2009-05-04 20:33:23 +0000
@@ -37,8 +37,7 @@ static bool pack_header(uchar *forminfo,
List<Create_field> &create_fields,
uint info_length, uint screens, uint table_options,
ulong data_offset, handler *file);
-static uint get_interval_id(uint *int_count,List<Create_field> &create_fields,
- Create_field *last_field);
+static uint get_interval_id(uint *,List<Create_field> &, Create_field *);
static bool pack_fields(File file, List<Create_field> &create_fields,
ulong data_offset);
static bool make_empty_rec(THD *thd, int file, enum legacy_db_type table_type,
Attachment: [text/bzr-bundle] bzr/serg@mysql.com-20090504203323-4hrh6iecz31i2mea.bundle
Thread |
---|
• bzr commit into mysql-5.1-bugteam branch (serg:2893) Bug#44166 | Sergei Golubchik | 4 May |