mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Manual merge of mysql-5.1-bugteam to mysql-trunk-merge.
Conflicts: conflict Makefile.am conflict mysql-test/suite/rpl/r/rpl_stm_mixing_engines.result conflict mysql-test/suite/rpl/t/rpl_tmp_table_and_DDL.test conflict sql/opt_sum.cc conflict sql/set_var.cc conflict sql/sql_base.cc conflict sql/sql_priv.h conflict sql/sql_show.cc
This commit is contained in:
@ -425,6 +425,25 @@ uint filename_to_tablename(const char *from, char *to, uint to_length)
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
Check if given string begins with "#mysql50#" prefix
|
||||
|
||||
@param name string to check cut
|
||||
|
||||
@retval
|
||||
FALSE no prefix found
|
||||
@retval
|
||||
TRUE prefix found
|
||||
*/
|
||||
|
||||
bool check_mysql50_prefix(const char *name)
|
||||
{
|
||||
return (name[0] == '#' &&
|
||||
!strncmp(name, MYSQL50_TABLE_NAME_PREFIX,
|
||||
MYSQL50_TABLE_NAME_PREFIX_LENGTH));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
Check if given string begins with "#mysql50#" prefix, cut it if so.
|
||||
|
||||
@ -440,9 +459,7 @@ uint filename_to_tablename(const char *from, char *to, uint to_length)
|
||||
|
||||
uint check_n_cut_mysql50_prefix(const char *from, char *to, uint to_length)
|
||||
{
|
||||
if (from[0] == '#' &&
|
||||
!strncmp(from, MYSQL50_TABLE_NAME_PREFIX,
|
||||
MYSQL50_TABLE_NAME_PREFIX_LENGTH))
|
||||
if (check_mysql50_prefix(from))
|
||||
return (uint) (strmake(to, from + MYSQL50_TABLE_NAME_PREFIX_LENGTH,
|
||||
to_length - 1) - to);
|
||||
return 0;
|
||||
|
Reference in New Issue
Block a user