mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into serg.mylan:/usr/home/serg/Abk/mysql-5.0
This commit is contained in:
@ -1307,7 +1307,7 @@ static uint dump_routines_for_db(char *db)
|
||||
fprintf(sql_file, "DELIMITER ;\n");
|
||||
|
||||
if (lock_tables)
|
||||
mysql_query_with_error_report(sock, 0, "UNLOCK TABLES");
|
||||
VOID(mysql_query_with_error_report(sock, 0, "UNLOCK TABLES"));
|
||||
DBUG_RETURN(0);
|
||||
}
|
||||
|
||||
@ -2124,7 +2124,10 @@ static void dump_table(char *table, char *db)
|
||||
else
|
||||
res=mysql_store_result(sock);
|
||||
if (!res)
|
||||
{
|
||||
DB_error(sock, "when retrieving data from server");
|
||||
goto err;
|
||||
}
|
||||
if (verbose)
|
||||
fprintf(stderr, "-- Retrieving rows...\n");
|
||||
if (mysql_num_fields(res) != num_fields)
|
||||
@ -2654,7 +2657,7 @@ static int dump_all_tables_in_db(char *database)
|
||||
check_io(md_result_file);
|
||||
}
|
||||
if (lock_tables)
|
||||
mysql_query_with_error_report(sock, 0, "UNLOCK TABLES");
|
||||
VOID(mysql_query_with_error_report(sock, 0, "UNLOCK TABLES"));
|
||||
return 0;
|
||||
} /* dump_all_tables_in_db */
|
||||
|
||||
@ -2709,23 +2712,23 @@ static my_bool dump_all_views_in_db(char *database)
|
||||
check_io(md_result_file);
|
||||
}
|
||||
if (lock_tables)
|
||||
mysql_query(sock,"UNLOCK TABLES");
|
||||
VOID(mysql_query_with_error_report(sock, 0, "UNLOCK TABLES"));
|
||||
return 0;
|
||||
} /* dump_all_tables_in_db */
|
||||
|
||||
|
||||
/*
|
||||
get_actual_table_name -- executes a SHOW TABLES LIKE '%s' to get the actual
|
||||
table name from the server for the table name given on the command line.
|
||||
we do this because the table name given on the command line may be a
|
||||
get_actual_table_name -- executes a SHOW TABLES LIKE '%s' to get the actual
|
||||
table name from the server for the table name given on the command line.
|
||||
we do this because the table name given on the command line may be a
|
||||
different case (e.g. T1 vs t1)
|
||||
|
||||
|
||||
RETURN
|
||||
int - 0 if a tablename was retrieved. 1 if not
|
||||
*/
|
||||
|
||||
static int get_actual_table_name(const char *old_table_name,
|
||||
char *new_table_name,
|
||||
static int get_actual_table_name(const char *old_table_name,
|
||||
char *new_table_name,
|
||||
int buf_size)
|
||||
{
|
||||
int retval;
|
||||
@ -2737,7 +2740,7 @@ static int get_actual_table_name(const char *old_table_name,
|
||||
|
||||
/* Check memory for quote_for_like() */
|
||||
DBUG_ASSERT(2*sizeof(old_table_name) < sizeof(show_name_buff));
|
||||
my_snprintf(query, sizeof(query), "SHOW TABLES LIKE %s",
|
||||
my_snprintf(query, sizeof(query), "SHOW TABLES LIKE %s",
|
||||
quote_for_like(old_table_name, show_name_buff));
|
||||
|
||||
if (mysql_query_with_error_report(sock, 0, query))
|
||||
@ -2746,7 +2749,7 @@ static int get_actual_table_name(const char *old_table_name,
|
||||
}
|
||||
|
||||
retval = 1;
|
||||
|
||||
|
||||
if ((table_res= mysql_store_result(sock)))
|
||||
{
|
||||
my_ulonglong num_rows= mysql_num_rows(table_res);
|
||||
@ -2868,7 +2871,7 @@ static int dump_selected_tables(char *db, char **table_names, int tables)
|
||||
check_io(md_result_file);
|
||||
}
|
||||
if (lock_tables)
|
||||
mysql_query_with_error_report(sock, 0, "UNLOCK TABLES");
|
||||
VOID(mysql_query_with_error_report(sock, 0, "UNLOCK TABLES"));
|
||||
DBUG_RETURN(0);
|
||||
} /* dump_selected_tables */
|
||||
|
||||
|
Reference in New Issue
Block a user