mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
References lp:1051808 - merged with lp:maria/5.5
bzr merge lp:maria/5.5 ... Text conflict in CMakeLists.txt Text conflict in sql/mysqld.cc Text conflict in sql/sql_class.h Text conflict in sql/sql_truncate.cc 4 conflicts encountered.
This commit is contained in:
@ -663,6 +663,7 @@ public:
|
||||
break;
|
||||
|
||||
case ER_NO_SUCH_TABLE:
|
||||
case ER_NO_SUCH_TABLE_IN_ENGINE:
|
||||
/* Established behavior: warn if underlying tables are missing. */
|
||||
push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
|
||||
ER_VIEW_INVALID,
|
||||
@ -995,9 +996,13 @@ static const char *require_quotes(const char *name, uint name_length)
|
||||
packet target string
|
||||
name the identifier to be appended
|
||||
name_length length of the appending identifier
|
||||
|
||||
RETURN VALUES
|
||||
true Error
|
||||
false Ok
|
||||
*/
|
||||
|
||||
void
|
||||
bool
|
||||
append_identifier(THD *thd, String *packet, const char *name, uint length)
|
||||
{
|
||||
const char *name_end;
|
||||
@ -1005,10 +1010,7 @@ append_identifier(THD *thd, String *packet, const char *name, uint length)
|
||||
int q= get_quote_char_for_identifier(thd, name, length);
|
||||
|
||||
if (q == EOF)
|
||||
{
|
||||
packet->append(name, length, packet->charset());
|
||||
return;
|
||||
}
|
||||
return packet->append(name, length, packet->charset());
|
||||
|
||||
/*
|
||||
The identifier must be quoted as it includes a quote character or
|
||||
@ -1017,7 +1019,8 @@ append_identifier(THD *thd, String *packet, const char *name, uint length)
|
||||
|
||||
(void) packet->reserve(length*2 + 2);
|
||||
quote_char= (char) q;
|
||||
packet->append("e_char, 1, system_charset_info);
|
||||
if (packet->append("e_char, 1, system_charset_info))
|
||||
return true;
|
||||
|
||||
for (name_end= name+length ; name < name_end ; name+= length)
|
||||
{
|
||||
@ -1032,11 +1035,13 @@ append_identifier(THD *thd, String *packet, const char *name, uint length)
|
||||
*/
|
||||
if (!length)
|
||||
length= 1;
|
||||
if (length == 1 && chr == (uchar) quote_char)
|
||||
packet->append("e_char, 1, system_charset_info);
|
||||
packet->append(name, length, system_charset_info);
|
||||
if (length == 1 && chr == (uchar) quote_char &&
|
||||
packet->append("e_char, 1, system_charset_info))
|
||||
return true;
|
||||
if (packet->append(name, length, system_charset_info))
|
||||
return true;
|
||||
}
|
||||
packet->append("e_char, 1, system_charset_info);
|
||||
return packet->append("e_char, 1, system_charset_info);
|
||||
}
|
||||
|
||||
|
||||
@ -3228,9 +3233,12 @@ int make_db_list(THD *thd, List<LEX_STRING> *files,
|
||||
|
||||
/*
|
||||
If we have db lookup vaule we just add it to list and
|
||||
exit from the function
|
||||
exit from the function.
|
||||
We don't do this for database names longer than the maximum
|
||||
path length.
|
||||
*/
|
||||
if (lookup_field_vals->db_value.str)
|
||||
if (lookup_field_vals->db_value.str &&
|
||||
lookup_field_vals->db_value.length < FN_REFLEN)
|
||||
{
|
||||
if (is_infoschema_db(lookup_field_vals->db_value.str,
|
||||
lookup_field_vals->db_value.length))
|
||||
|
Reference in New Issue
Block a user