merge with mysql-5.5.30 minus few incorrect or not applicable changesets

This commit is contained in:
Sergei Golubchik 2013-02-28 18:42:49 +01:00
commit 8161c6772d
178 changed files with 3564 additions and 2042 deletions

View file

@ -2298,7 +2298,6 @@ static uint dump_routines_for_db(char *db)
const char *routine_type[]= {"FUNCTION", "PROCEDURE"};
char db_name_buff[NAME_LEN*2+3], name_buff[NAME_LEN*2+3];
char *routine_name;
char *query_str;
int i;
FILE *sql_file= md_result_file;
MYSQL_RES *routine_res, *routine_list_res;
@ -2392,17 +2391,6 @@ static uint dump_routines_for_db(char *db)
fprintf(sql_file, "/*!50003 DROP %s IF EXISTS %s */;\n",
routine_type[i], routine_name);
query_str= cover_definer_clause(row[2], strlen(row[2]),
C_STRING_WITH_LEN("50020"),
C_STRING_WITH_LEN("50003"),
C_STRING_WITH_LEN(" FUNCTION"));
if (!query_str)
query_str= cover_definer_clause(row[2], strlen(row[2]),
C_STRING_WITH_LEN("50020"),
C_STRING_WITH_LEN("50003"),
C_STRING_WITH_LEN(" PROCEDURE"));
if (mysql_num_fields(routine_res) >= 6)
{
if (switch_db_collation(sql_file, db_name_buff, ";",
@ -2440,9 +2428,9 @@ static uint dump_routines_for_db(char *db)
fprintf(sql_file,
"DELIMITER ;;\n"
"/*!50003 %s */;;\n"
"%s ;;\n"
"DELIMITER ;\n",
(const char *) (query_str != NULL ? query_str : row[2]));
(const char *) row[2]);
restore_sql_mode(sql_file, ";");
@ -2457,7 +2445,6 @@ static uint dump_routines_for_db(char *db)
}
}
my_free(query_str);
}
} /* end of routine printing */
mysql_free_result(routine_res);