1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

strmake_buf(X,Y) helper, equivalent to strmake(X,Y,sizeof(X)-1)

with a bit of lame protection against abuse.
This commit is contained in:
Sergei Golubchik
2013-04-17 19:42:34 +02:00
parent 4656060f11
commit 07315d3603
27 changed files with 102 additions and 121 deletions

View File

@ -6914,7 +6914,7 @@ find_field_in_tables(THD *thd, Item_ident *item,
We can't do this in Item_field as this would change the
'name' of the item which may be used in the select list
*/
strmake(name_buff, db, sizeof(name_buff)-1);
strmake_buf(name_buff, db);
my_casedn_str(files_charset_info, name_buff);
db= name_buff;
}
@ -8487,7 +8487,7 @@ insert_fields(THD *thd, Name_resolution_context *context, const char *db_name,
We can't do this in Item_field as this would change the
'name' of the item which may be used in the select list
*/
strmake(name_buff, db_name, sizeof(name_buff)-1);
strmake_buf(name_buff, db_name);
my_casedn_str(files_charset_info, name_buff);
db_name= name_buff;
}