mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merge mysql.com:/home/kostja/mysql/tmp_merge
into mysql.com:/home/kostja/mysql/mysql-5.1-merge client/mysqlbinlog.cc: Auto merged client/mysqldump.c: Auto merged include/my_base.h: Auto merged libmysql/libmysql.c: Auto merged sql/field.h: Auto merged sql/ha_myisam.cc: Auto merged sql/log_event.cc: Auto merged sql/opt_range.cc: Auto merged sql/opt_range.h: Auto merged sql/repl_failsafe.cc: Auto merged sql/set_var.cc: Auto merged sql/slave.cc: Auto merged sql/slave.h: Auto merged sql/sql_acl.cc: Auto merged sql/sql_db.cc: Auto merged sql/sql_handler.cc: Auto merged sql/sql_help.cc: Auto merged sql/sql_parse.cc: Auto merged sql/sql_repl.cc: Auto merged sql/sql_show.cc: Auto merged sql/sql_test.cc: Auto merged sql-common/client.c: Auto merged sql/table.cc: Auto merged storage/myisam/mi_delete.c: Auto merged storage/myisam/myisampack.c: Auto merged storage/myisam/sort.c: Auto merged mysys/my_bitmap.c: Manual merge sql/field.cc: e Manual merge sql/item.cc: Manual merge (new Field_bit_as_char constructor signature) sql/item_func.cc: Manual merge: use local sql/sql_insert.cc: Manual merge: add VOID() around bitmap_init
This commit is contained in:
@ -1311,7 +1311,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);
|
||||
}
|
||||
|
||||
@ -2134,7 +2134,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)
|
||||
@ -2664,7 +2667,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 */
|
||||
|
||||
@ -2719,23 +2722,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;
|
||||
@ -2747,7 +2750,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))
|
||||
@ -2756,7 +2759,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);
|
||||
@ -2878,7 +2881,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