mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
After merge fixes
Changed 'SHOW FIELD STATUS' to use 'Engine' instead of 'Type' client/client_priv.h: Added option 'create_options' for mysqldump client/mysqldump.c: Changed '--all' to '--create-options' as the old name was meaningless innobase/buf/buf0buf.c: After merge fixes innobase/buf/buf0lru.c: After merge fixes innobase/buf/buf0rea.c: After merge fixes innobase/dict/dict0load.c: After merge fixes innobase/fil/fil0fil.c: After merge fixes innobase/ibuf/ibuf0ibuf.c: After merge fixes innobase/include/fil0fil.h: After merge fixes innobase/include/row0mysql.h: After merge fixes innobase/include/ut0mem.h: After merge fixes innobase/log/log0recv.c: After merge fixes innobase/row/row0mysql.c: After merge fixes innobase/row/row0sel.c: After merge fixes innobase/srv/srv0start.c: After merge fixes innobase/sync/sync0rw.c: After merge fixes innobase/sync/sync0sync.c: After merge fixes myisam/ft_boolean_search.c: After merge fixes myisam/ft_nlq_search.c: After merge fixes mysql-test/r/mysqldump.result: After merge fixes mysql-test/t/mysqldump.test: Make result file smaller Some new tests sql/ha_innodb.cc: After merge fixes sql/set_var.cc: Removed compiler warning sql/slave.cc: After merge fixes sql/slave.h: After merge fixes sql/sql_show.cc: Type -> Engine
This commit is contained in:
@ -43,5 +43,5 @@ enum options_client
|
|||||||
OPT_PROMPT, OPT_IGN_LINES,OPT_TRANSACTION,OPT_MYSQL_PROTOCOL,
|
OPT_PROMPT, OPT_IGN_LINES,OPT_TRANSACTION,OPT_MYSQL_PROTOCOL,
|
||||||
OPT_SHARED_MEMORY_BASE_NAME, OPT_FRM, OPT_SKIP_OPTIMIZATION,
|
OPT_SHARED_MEMORY_BASE_NAME, OPT_FRM, OPT_SKIP_OPTIMIZATION,
|
||||||
OPT_COMPATIBLE, OPT_RECONNECT, OPT_DELIMITER, OPT_SECURE_AUTH,
|
OPT_COMPATIBLE, OPT_RECONNECT, OPT_DELIMITER, OPT_SECURE_AUTH,
|
||||||
OPT_OPEN_FILES_LIMIT, OPT_SET_CHARSET
|
OPT_OPEN_FILES_LIMIT, OPT_SET_CHARSET, OPT_CREATE_OPTIONS
|
||||||
};
|
};
|
||||||
|
@ -37,7 +37,7 @@
|
|||||||
** 10 Jun 2003: SET NAMES and --no-set-names by Alexander Barkov
|
** 10 Jun 2003: SET NAMES and --no-set-names by Alexander Barkov
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define DUMP_VERSION "10.6"
|
#define DUMP_VERSION "10.7"
|
||||||
|
|
||||||
#include <my_global.h>
|
#include <my_global.h>
|
||||||
#include <my_sys.h>
|
#include <my_sys.h>
|
||||||
@ -132,9 +132,6 @@ static struct my_option my_long_options[] =
|
|||||||
"Dump all the databases. This will be same as --databases with all databases selected.",
|
"Dump all the databases. This will be same as --databases with all databases selected.",
|
||||||
(gptr*) &opt_alldbs, (gptr*) &opt_alldbs, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0,
|
(gptr*) &opt_alldbs, (gptr*) &opt_alldbs, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0,
|
||||||
0, 0},
|
0, 0},
|
||||||
{"all", 'a', "Include all MySQL specific create options.",
|
|
||||||
(gptr*) &create_options, (gptr*) &create_options, 0, GET_BOOL, NO_ARG, 1,
|
|
||||||
0, 0, 0, 0, 0},
|
|
||||||
{"add-drop-table", OPT_DROP, "Add a 'drop table' before each create.",
|
{"add-drop-table", OPT_DROP, "Add a 'drop table' before each create.",
|
||||||
(gptr*) &opt_drop, (gptr*) &opt_drop, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0,
|
(gptr*) &opt_drop, (gptr*) &opt_drop, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0,
|
||||||
0},
|
0},
|
||||||
@ -148,7 +145,7 @@ static struct my_option my_long_options[] =
|
|||||||
"Directory where character sets are.", (gptr*) &charsets_dir,
|
"Directory where character sets are.", (gptr*) &charsets_dir,
|
||||||
(gptr*) &charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
(gptr*) &charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"compatible", OPT_COMPATIBLE,
|
{"compatible", OPT_COMPATIBLE,
|
||||||
"Change the dump to be compatible with a given mode. By default tables are dumped without any restrictions. Legal modes are: ansi, mysql323, mysql40, postgresql, oracle, mssql, db2, maxdb, no_key_options, no_table_options, no_field_options. One can use several modes separated by commas. Note: Requires MySQL server version 4.1.0 or higher. This option does a no operation on earlier server versions.",
|
"Change the dump to be compatible with a given mode. By default tables are dumped in a format optimized for MySQL. Legal modes are: ansi, mysql323, mysql40, postgresql, oracle, mssql, db2, maxdb, no_key_options, no_table_options, no_field_options. One can use several modes separated by commas. Note: Requires MySQL server version 4.1.0 or higher. This option is ignored with earlier server versions.",
|
||||||
(gptr*) &opt_compatible_mode_str, (gptr*) &opt_compatible_mode_str, 0,
|
(gptr*) &opt_compatible_mode_str, (gptr*) &opt_compatible_mode_str, 0,
|
||||||
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"compact", OPT_COMPACT,
|
{"compact", OPT_COMPACT,
|
||||||
@ -160,6 +157,10 @@ static struct my_option my_long_options[] =
|
|||||||
{"compress", 'C', "Use compression in server/client protocol.",
|
{"compress", 'C', "Use compression in server/client protocol.",
|
||||||
(gptr*) &opt_compress, (gptr*) &opt_compress, 0, GET_BOOL, NO_ARG, 0, 0, 0,
|
(gptr*) &opt_compress, (gptr*) &opt_compress, 0, GET_BOOL, NO_ARG, 0, 0, 0,
|
||||||
0, 0, 0},
|
0, 0, 0},
|
||||||
|
{"create-options", OPT_CREATE_OPTIONS,
|
||||||
|
"Include all MySQL specific create options.",
|
||||||
|
(gptr*) &create_options, (gptr*) &create_options, 0, GET_BOOL, NO_ARG, 1,
|
||||||
|
0, 0, 0, 0, 0},
|
||||||
{"databases", 'B',
|
{"databases", 'B',
|
||||||
"To dump several databases. Note the difference in usage; In this case no tables are given. All name arguments are regarded as databasenames. 'USE db_name;' will be included in the output.",
|
"To dump several databases. Note the difference in usage; In this case no tables are given. All name arguments are regarded as databasenames. 'USE db_name;' will be included in the output.",
|
||||||
(gptr*) &opt_databases, (gptr*) &opt_databases, 0, GET_BOOL, NO_ARG, 0, 0,
|
(gptr*) &opt_databases, (gptr*) &opt_databases, 0, GET_BOOL, NO_ARG, 0, 0,
|
||||||
@ -483,7 +484,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
|
|||||||
break;
|
break;
|
||||||
case (int) OPT_SKIP_OPTIMIZATION:
|
case (int) OPT_SKIP_OPTIMIZATION:
|
||||||
extended_insert= opt_drop= opt_lock= quick= create_options=
|
extended_insert= opt_drop= opt_lock= quick= create_options=
|
||||||
opt_disable_keys= lock_tables= 0;
|
opt_disable_keys= lock_tables= opt_set_charset= 0;
|
||||||
break;
|
break;
|
||||||
case (int) OPT_COMPACT:
|
case (int) OPT_COMPACT:
|
||||||
if (opt_compact)
|
if (opt_compact)
|
||||||
@ -863,7 +864,7 @@ static void print_xml_row(FILE *xml_file, const char *row_name,
|
|||||||
print_quoted_xml(xml_file, field->name, field->name_length);
|
print_quoted_xml(xml_file, field->name, field->name_length);
|
||||||
fputs("=\"", xml_file);
|
fputs("=\"", xml_file);
|
||||||
print_quoted_xml(xml_file, (*row)[i], lengths[i]);
|
print_quoted_xml(xml_file, (*row)[i], lengths[i]);
|
||||||
fputc('"', file);
|
fputc('"', xml_file);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
fputs(" />\n", xml_file);
|
fputs(" />\n", xml_file);
|
||||||
@ -897,6 +898,9 @@ static uint getTableStructure(char *table, char* db)
|
|||||||
|
|
||||||
sprintf(insert_pat,"SET OPTION SQL_QUOTE_SHOW_CREATE=%d",
|
sprintf(insert_pat,"SET OPTION SQL_QUOTE_SHOW_CREATE=%d",
|
||||||
(opt_quoted || opt_keywords));
|
(opt_quoted || opt_keywords));
|
||||||
|
if (!create_options)
|
||||||
|
strmov(strend(insert_pat), "/*!40102 ,SQL_MODE=concat(@@sql_mode, _utf8 'NO_KEY_OPTIONS,NO_TABLE_OPTIONS,NO_FIELD_OPTIONS') */");
|
||||||
|
|
||||||
result_table= quote_name(table, table_buff, 1);
|
result_table= quote_name(table, table_buff, 1);
|
||||||
opt_quoted_table= quote_name(table, table_buff2, 0);
|
opt_quoted_table= quote_name(table, table_buff2, 0);
|
||||||
if (!opt_xml && !mysql_query(sock,insert_pat))
|
if (!opt_xml && !mysql_query(sock,insert_pat))
|
||||||
@ -978,8 +982,10 @@ static uint getTableStructure(char *table, char* db)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* fprintf(stderr, "%s: Can't set SQL_QUOTE_SHOW_CREATE option (%s)\n",
|
if (verbose)
|
||||||
my_progname, mysql_error(sock)); */
|
fprintf(stderr,
|
||||||
|
"%s: Warning: Can't set SQL_QUOTE_SHOW_CREATE option (%s)\n",
|
||||||
|
my_progname, mysql_error(sock));
|
||||||
|
|
||||||
sprintf(insert_pat,"show fields from %s", result_table);
|
sprintf(insert_pat,"show fields from %s", result_table);
|
||||||
if (mysql_query(sock,insert_pat) || !(tableRes=mysql_store_result(sock)))
|
if (mysql_query(sock,insert_pat) || !(tableRes=mysql_store_result(sock)))
|
||||||
@ -1172,7 +1178,7 @@ static uint getTableStructure(char *table, char* db)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
fputs("/*!",sql_file);
|
fputs("/*!",sql_file);
|
||||||
print_value(sql_file,tableRes,row,"type=","Type",0);
|
print_value(sql_file,tableRes,row,"engine=","Engine",0);
|
||||||
print_value(sql_file,tableRes,row,"","Create_options",0);
|
print_value(sql_file,tableRes,row,"","Create_options",0);
|
||||||
print_value(sql_file,tableRes,row,"comment=","Comment",1);
|
print_value(sql_file,tableRes,row,"comment=","Comment",1);
|
||||||
fputs(" */",sql_file);
|
fputs(" */",sql_file);
|
||||||
|
@ -1545,11 +1545,12 @@ buf_page_init(
|
|||||||
"InnoDB: Error: page %lu %lu already found from the hash table\n",
|
"InnoDB: Error: page %lu %lu already found from the hash table\n",
|
||||||
(ulong) space,
|
(ulong) space,
|
||||||
(ulong) offset);
|
(ulong) offset);
|
||||||
|
#ifdef UNIV_DEBUG
|
||||||
buf_print();
|
buf_print();
|
||||||
buf_LRU_print();
|
buf_LRU_print();
|
||||||
buf_validate();
|
buf_validate();
|
||||||
buf_LRU_validate();
|
buf_LRU_validate();
|
||||||
|
#endif /* UNIV_DEBUG */
|
||||||
ut_a(0);
|
ut_a(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2243,7 +2244,7 @@ buf_print_io(
|
|||||||
/ time_elapsed);
|
/ time_elapsed);
|
||||||
|
|
||||||
if (srv_use_awe) {
|
if (srv_use_awe) {
|
||||||
buf += sprintf(buf, "AWE: %.2f page remaps/s\n",
|
fprintf(file, "AWE: %.2f page remaps/s\n",
|
||||||
(buf_pool->n_pages_awe_remapped
|
(buf_pool->n_pages_awe_remapped
|
||||||
- buf_pool->n_pages_awe_remapped_old)
|
- buf_pool->n_pages_awe_remapped_old)
|
||||||
/ time_elapsed);
|
/ time_elapsed);
|
||||||
|
@ -97,13 +97,14 @@ scan_again:
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (block->space == id) {
|
if (block->space == id) {
|
||||||
|
#ifdef UNIV_DEBUG
|
||||||
if (buf_debug_prints) {
|
if (buf_debug_prints) {
|
||||||
printf(
|
printf(
|
||||||
"Dropping space %lu page %lu\n",
|
"Dropping space %lu page %lu\n",
|
||||||
(ulong) block->space,
|
(ulong) block->space,
|
||||||
(ulong) block->offset);
|
(ulong) block->offset);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
if (block->is_hashed) {
|
if (block->is_hashed) {
|
||||||
page_no = block->offset;
|
page_no = block->offset;
|
||||||
|
|
||||||
@ -207,6 +208,7 @@ buf_LRU_search_and_free_block(
|
|||||||
while (block != NULL) {
|
while (block != NULL) {
|
||||||
ut_a(block->in_LRU_list);
|
ut_a(block->in_LRU_list);
|
||||||
if (buf_flush_ready_for_replace(block)) {
|
if (buf_flush_ready_for_replace(block)) {
|
||||||
|
|
||||||
#ifdef UNIV_DEBUG
|
#ifdef UNIV_DEBUG
|
||||||
if (buf_debug_prints) {
|
if (buf_debug_prints) {
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
@ -215,6 +217,7 @@ buf_LRU_search_and_free_block(
|
|||||||
(ulong) block->offset);
|
(ulong) block->offset);
|
||||||
}
|
}
|
||||||
#endif /* UNIV_DEBUG */
|
#endif /* UNIV_DEBUG */
|
||||||
|
|
||||||
buf_LRU_block_remove_hashed_page(block);
|
buf_LRU_block_remove_hashed_page(block);
|
||||||
|
|
||||||
mutex_exit(&(buf_pool->mutex));
|
mutex_exit(&(buf_pool->mutex));
|
||||||
@ -419,7 +422,8 @@ loop:
|
|||||||
(ulong) n_iterations,
|
(ulong) n_iterations,
|
||||||
(ulong) fil_n_pending_log_flushes,
|
(ulong) fil_n_pending_log_flushes,
|
||||||
(ulong) fil_n_pending_tablespace_flushes,
|
(ulong) fil_n_pending_tablespace_flushes,
|
||||||
(ulong) os_n_file_reads, (ulong) os_n_file_writes, (ulong) os_n_fsyncs);
|
(ulong) os_n_file_reads, (ulong) os_n_file_writes,
|
||||||
|
(ulong) os_n_fsyncs);
|
||||||
|
|
||||||
mon_value_was = srv_print_innodb_monitor;
|
mon_value_was = srv_print_innodb_monitor;
|
||||||
started_monitor = TRUE;
|
started_monitor = TRUE;
|
||||||
@ -849,11 +853,12 @@ buf_LRU_block_remove_hashed_page(
|
|||||||
(ulong) block);
|
(ulong) block);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef UNIV_DEBUG
|
||||||
buf_print();
|
buf_print();
|
||||||
buf_LRU_print();
|
buf_LRU_print();
|
||||||
buf_validate();
|
buf_validate();
|
||||||
buf_LRU_validate();
|
buf_LRU_validate();
|
||||||
|
#endif
|
||||||
ut_a(0);
|
ut_a(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -125,11 +125,14 @@ buf_read_page_low(
|
|||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef UNIV_DEBUG
|
||||||
if (buf_debug_prints) {
|
if (buf_debug_prints) {
|
||||||
printf("Posting read request for page %lu, sync %lu\n",
|
fprintf(stderr,
|
||||||
|
"Posting read request for page %lu, sync %lu\n",
|
||||||
(ulong) offset,
|
(ulong) offset,
|
||||||
(ulong) sync);
|
(ulong) sync);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
ut_a(block->state == BUF_BLOCK_FILE_PAGE);
|
ut_a(block->state == BUF_BLOCK_FILE_PAGE);
|
||||||
|
|
||||||
|
@ -121,7 +121,6 @@ dict_print(void)
|
|||||||
byte* field;
|
byte* field;
|
||||||
ulint len;
|
ulint len;
|
||||||
mtr_t mtr;
|
mtr_t mtr;
|
||||||
char table_name[10000];
|
|
||||||
|
|
||||||
mutex_enter(&(dict_sys->mutex));
|
mutex_enter(&(dict_sys->mutex));
|
||||||
|
|
||||||
|
@ -86,7 +86,7 @@ the count drops to zero. */
|
|||||||
/* When mysqld is run, the default directory "." is the mysqld datadir,
|
/* When mysqld is run, the default directory "." is the mysqld datadir,
|
||||||
but in the MySQL Embedded Server Library and ibbackup it is not the default
|
but in the MySQL Embedded Server Library and ibbackup it is not the default
|
||||||
directory, and we must set the base file path explicitly */
|
directory, and we must set the base file path explicitly */
|
||||||
const char* fil_path_to_mysql_datadir = (char*)".";
|
const char* fil_path_to_mysql_datadir = ".";
|
||||||
|
|
||||||
ulint fil_n_pending_log_flushes = 0;
|
ulint fil_n_pending_log_flushes = 0;
|
||||||
ulint fil_n_pending_tablespace_flushes = 0;
|
ulint fil_n_pending_tablespace_flushes = 0;
|
||||||
@ -2727,7 +2727,7 @@ fil_load_single_table_tablespaces(void)
|
|||||||
|
|
||||||
/* The datadir of MySQL is always the default directory of mysqld */
|
/* The datadir of MySQL is always the default directory of mysqld */
|
||||||
|
|
||||||
dir = os_file_opendir(fil_path_to_mysql_datadir, TRUE);
|
dir = os_file_opendir((char*) fil_path_to_mysql_datadir, TRUE);
|
||||||
|
|
||||||
if (dir == NULL) {
|
if (dir == NULL) {
|
||||||
|
|
||||||
@ -2739,7 +2739,7 @@ fil_load_single_table_tablespaces(void)
|
|||||||
/* Scan all directories under the datadir. They are the database
|
/* Scan all directories under the datadir. They are the database
|
||||||
directories of MySQL. */
|
directories of MySQL. */
|
||||||
|
|
||||||
ret = os_file_readdir_next_file(fil_path_to_mysql_datadir, dir,
|
ret = os_file_readdir_next_file((char*) fil_path_to_mysql_datadir, dir,
|
||||||
&dbinfo);
|
&dbinfo);
|
||||||
while (ret == 0) {
|
while (ret == 0) {
|
||||||
/* printf("Looking at %s in datadir\n", dbinfo.name); */
|
/* printf("Looking at %s in datadir\n", dbinfo.name); */
|
||||||
@ -2800,7 +2800,7 @@ next_file_item:
|
|||||||
}
|
}
|
||||||
|
|
||||||
next_datadir_item:
|
next_datadir_item:
|
||||||
ret = os_file_readdir_next_file(fil_path_to_mysql_datadir,
|
ret = os_file_readdir_next_file((char*) fil_path_to_mysql_datadir,
|
||||||
dir, &dbinfo);
|
dir, &dbinfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -332,9 +332,9 @@ ibuf_count_get(
|
|||||||
return(*(ibuf_counts[space] + page_no));
|
return(*(ibuf_counts[space] + page_no));
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef UNIV_IBUF_DEBUG
|
|
||||||
/**********************************************************************
|
/**********************************************************************
|
||||||
Sets the ibuf count for a given page. */
|
Sets the ibuf count for a given page. */
|
||||||
|
#ifdef UNIV_IBUF_DEBUG
|
||||||
static
|
static
|
||||||
void
|
void
|
||||||
ibuf_count_set(
|
ibuf_count_set(
|
||||||
@ -2710,17 +2710,17 @@ ibuf_insert_to_index_page(
|
|||||||
|
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
"InnoDB: Trying to insert a record from the insert buffer to an index page\n"
|
"InnoDB: Trying to insert a record from the insert buffer to an index page\n"
|
||||||
"InnoDB: but the number of fields does not match!\n%s\n", errbuf);
|
"InnoDB: but the number of fields does not match!\n");
|
||||||
|
|
||||||
buf_page_print(page);
|
buf_page_print(page);
|
||||||
|
|
||||||
dtuple_sprintf(errbuf, 900, entry);
|
dtuple_print(stderr, entry);
|
||||||
|
|
||||||
fprintf(stderr,
|
fputs(
|
||||||
"InnoDB: The table where where this index record belongs\n"
|
"InnoDB: The table where where this index record belongs\n"
|
||||||
"InnoDB: is now probably corrupt. Please run CHECK TABLE on\n"
|
"InnoDB: is now probably corrupt. Please run CHECK TABLE on\n"
|
||||||
"InnoDB: your tables.\n"
|
"InnoDB: your tables.\n"
|
||||||
"InnoDB: Send a detailed bug report to mysql@lists.mysql.com!\n");
|
"InnoDB: Send a detailed bug report to mysql@lists.mysql.com!\n", stderr);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -3386,13 +3386,17 @@ ibuf_print(
|
|||||||
(ulong) data->seg_size);
|
(ulong) data->seg_size);
|
||||||
|
|
||||||
if (data->empty) {
|
if (data->empty) {
|
||||||
buf += sprintf(buf, " is empty\n");
|
fputs(" is empty\n", file);
|
||||||
} else {
|
} else {
|
||||||
buf += sprintf(buf, " is not empty\n");
|
fputs(" is not empty\n", file);
|
||||||
}
|
}
|
||||||
fprintf(file,
|
fprintf(file,
|
||||||
"Ibuf for space %lu: size %lu, free list len %lu, seg size %lu,\n"
|
"Ibuf for space %lu: size %lu, free list len %lu, seg size %lu,\n"
|
||||||
"%lu inserts, %lu merged recs, %lu merges\n",
|
"%lu inserts, %lu merged recs, %lu merges\n",
|
||||||
|
(ulong) data->space,
|
||||||
|
(ulong) data->size,
|
||||||
|
(ulong) data->free_list_len,
|
||||||
|
(ulong) data->seg_size,
|
||||||
(ulong) data->n_inserts,
|
(ulong) data->n_inserts,
|
||||||
(ulong) data->n_merged_recs,
|
(ulong) data->n_merged_recs,
|
||||||
(ulong) data->n_merges);
|
(ulong) data->n_merges);
|
||||||
|
@ -19,7 +19,7 @@ Created 10/25/1995 Heikki Tuuri
|
|||||||
/* When mysqld is run, the default directory "." is the mysqld datadir, but in
|
/* When mysqld is run, the default directory "." is the mysqld datadir, but in
|
||||||
ibbackup we must set it explicitly; the patgh must NOT contain the trailing
|
ibbackup we must set it explicitly; the patgh must NOT contain the trailing
|
||||||
'/' or '\' */
|
'/' or '\' */
|
||||||
extern char* fil_path_to_mysql_datadir;
|
extern const char* fil_path_to_mysql_datadir;
|
||||||
|
|
||||||
/* Initial size of a single-table tablespace in pages */
|
/* Initial size of a single-table tablespace in pages */
|
||||||
#define FIL_IBD_FILE_INITIAL_SIZE 4
|
#define FIL_IBD_FILE_INITIAL_SIZE 4
|
||||||
|
@ -339,6 +339,8 @@ row_drop_table_for_mysql(
|
|||||||
char* name, /* in: table name */
|
char* name, /* in: table name */
|
||||||
trx_t* trx, /* in: transaction handle */
|
trx_t* trx, /* in: transaction handle */
|
||||||
ibool drop_db);/* in: TRUE=dropping whole database */
|
ibool drop_db);/* in: TRUE=dropping whole database */
|
||||||
|
|
||||||
|
/*************************************************************************
|
||||||
Discards the tablespace of a table which stored in an .ibd file. Discarding
|
Discards the tablespace of a table which stored in an .ibd file. Discarding
|
||||||
means that this function deletes the .ibd file and assigns a new table id for
|
means that this function deletes the .ibd file and assigns a new table id for
|
||||||
the table. Also the flag table->ibd_file_missing is set TRUE.
|
the table. Also the flag table->ibd_file_missing is set TRUE.
|
||||||
|
@ -128,6 +128,8 @@ ut_str_catenate(
|
|||||||
/* out, own: catenated null-terminated string */
|
/* out, own: catenated null-terminated string */
|
||||||
char* str1, /* in: null-terminated string */
|
char* str1, /* in: null-terminated string */
|
||||||
char* str2); /* in: null-terminated string */
|
char* str2); /* in: null-terminated string */
|
||||||
|
|
||||||
|
/**************************************************************************
|
||||||
Return a copy of the given string. The returned string must be freed
|
Return a copy of the given string. The returned string must be freed
|
||||||
using mem_free. */
|
using mem_free. */
|
||||||
|
|
||||||
@ -136,7 +138,6 @@ ut_strdup(
|
|||||||
/*======*/
|
/*======*/
|
||||||
/* out, own: cnull-terminated string */
|
/* out, own: cnull-terminated string */
|
||||||
char* str); /* in: null-terminated string */
|
char* str); /* in: null-terminated string */
|
||||||
/**************************************************************************
|
|
||||||
|
|
||||||
#ifndef UNIV_NONINL
|
#ifndef UNIV_NONINL
|
||||||
#include "ut0mem.ic"
|
#include "ut0mem.ic"
|
||||||
|
@ -1868,7 +1868,7 @@ recv_report_corrupt_log(
|
|||||||
"InnoDB: Recv offset %lu, prev %lu\n",
|
"InnoDB: Recv offset %lu, prev %lu\n",
|
||||||
(ulong) type, (ulong) space, (ulong) page_no,
|
(ulong) type, (ulong) space, (ulong) page_no,
|
||||||
(ulong) ut_dulint_get_high(recv_sys->recovered_lsn),
|
(ulong) ut_dulint_get_high(recv_sys->recovered_lsn),
|
||||||
(ulong) ut_dulint_get_low(recv_sys->recovered_lsn));
|
(ulong) ut_dulint_get_low(recv_sys->recovered_lsn),
|
||||||
(ulong) recv_previous_parsed_rec_type,
|
(ulong) recv_previous_parsed_rec_type,
|
||||||
(ulong) recv_previous_parsed_rec_is_multi,
|
(ulong) recv_previous_parsed_rec_is_multi,
|
||||||
(ulong) (ptr - recv_sys->buf),
|
(ulong) (ptr - recv_sys->buf),
|
||||||
|
@ -1318,6 +1318,7 @@ Does a table creation operation for MySQL. If the name of the table
|
|||||||
to be created is equal with one of the predefined magic table names,
|
to be created is equal with one of the predefined magic table names,
|
||||||
then this also starts printing the corresponding monitor output by
|
then this also starts printing the corresponding monitor output by
|
||||||
the master thread. */
|
the master thread. */
|
||||||
|
|
||||||
int
|
int
|
||||||
row_create_table_for_mysql(
|
row_create_table_for_mysql(
|
||||||
/*=======================*/
|
/*=======================*/
|
||||||
@ -2116,79 +2117,6 @@ row_drop_table_for_mysql(
|
|||||||
"PROCEDURE DROP_TABLE_PROC () IS\n"
|
"PROCEDURE DROP_TABLE_PROC () IS\n"
|
||||||
"table_name CHAR;\n"
|
"table_name CHAR;\n"
|
||||||
"sys_foreign_id CHAR;\n"
|
"sys_foreign_id CHAR;\n"
|
||||||
|
|
||||||
ut_ad(trx->mysql_thread_id == os_thread_get_curr_id());
|
|
||||||
ut_a(name != NULL);
|
|
||||||
|
|
||||||
if (srv_created_new_raw) {
|
|
||||||
fprintf(stderr,
|
|
||||||
"InnoDB: A new raw disk partition was initialized or\n"
|
|
||||||
"InnoDB: innodb_force_recovery is on: we do not allow\n"
|
|
||||||
"InnoDB: database modifications by the user. Shut down\n"
|
|
||||||
"InnoDB: mysqld and edit my.cnf so that newraw is replaced\n"
|
|
||||||
"InnoDB: with raw, and innodb_force_... is removed.\n");
|
|
||||||
|
|
||||||
return(DB_ERROR);
|
|
||||||
}
|
|
||||||
|
|
||||||
trx->op_info = (char *) "dropping table";
|
|
||||||
|
|
||||||
trx_start_if_not_started(trx);
|
|
||||||
|
|
||||||
namelen = ut_strlen(name);
|
|
||||||
keywordlen = ut_strlen((char *) "innodb_monitor");
|
|
||||||
|
|
||||||
if (namelen >= keywordlen
|
|
||||||
&& 0 == ut_memcmp(name + namelen - keywordlen,
|
|
||||||
(char *) "innodb_monitor", keywordlen)) {
|
|
||||||
|
|
||||||
/* Table name ends to characters innodb_monitor:
|
|
||||||
stop monitor prints */
|
|
||||||
|
|
||||||
srv_print_innodb_monitor = FALSE;
|
|
||||||
srv_print_innodb_lock_monitor = FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
keywordlen = ut_strlen((char *) "innodb_lock_monitor");
|
|
||||||
|
|
||||||
if (namelen >= keywordlen
|
|
||||||
&& 0 == ut_memcmp(name + namelen - keywordlen,
|
|
||||||
(char *) "innodb_lock_monitor",
|
|
||||||
keywordlen)) {
|
|
||||||
|
|
||||||
srv_print_innodb_monitor = FALSE;
|
|
||||||
srv_print_innodb_lock_monitor = FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
keywordlen = ut_strlen((char *) "innodb_tablespace_monitor");
|
|
||||||
|
|
||||||
if (namelen >= keywordlen
|
|
||||||
&& 0 == ut_memcmp(name + namelen - keywordlen,
|
|
||||||
(char *) "innodb_tablespace_monitor",
|
|
||||||
keywordlen)) {
|
|
||||||
|
|
||||||
srv_print_innodb_tablespace_monitor = FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
keywordlen = ut_strlen((char *) "innodb_table_monitor");
|
|
||||||
|
|
||||||
if (namelen >= keywordlen
|
|
||||||
&& 0 == ut_memcmp(name + namelen - keywordlen,
|
|
||||||
(char *) "innodb_table_monitor",
|
|
||||||
keywordlen)) {
|
|
||||||
|
|
||||||
srv_print_innodb_table_monitor = FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* We use the private SQL parser of Innobase to generate the
|
|
||||||
query graphs needed in deleting the dictionary data from system
|
|
||||||
tables in Innobase. Deleting a row from SYS_INDEXES table also
|
|
||||||
frees the file segments of the B-tree associated with the index. */
|
|
||||||
|
|
||||||
str1 = (char *)
|
|
||||||
"PROCEDURE DROP_TABLE_PROC () IS\n"
|
|
||||||
"table_name CHAR;\n"
|
|
||||||
"sys_foreign_id CHAR;\n"
|
|
||||||
"table_id CHAR;\n"
|
"table_id CHAR;\n"
|
||||||
"index_id CHAR;\n"
|
"index_id CHAR;\n"
|
||||||
"foreign_id CHAR;\n"
|
"foreign_id CHAR;\n"
|
||||||
@ -2256,7 +2184,7 @@ row_drop_table_for_mysql(
|
|||||||
"InnoDB: database modifications by the user. Shut down\n"
|
"InnoDB: database modifications by the user. Shut down\n"
|
||||||
"InnoDB: mysqld and edit my.cnf so that newraw is replaced\n"
|
"InnoDB: mysqld and edit my.cnf so that newraw is replaced\n"
|
||||||
"InnoDB: with raw, and innodb_force_... is removed.\n",
|
"InnoDB: with raw, and innodb_force_... is removed.\n",
|
||||||
stderr);
|
stderr);
|
||||||
|
|
||||||
return(DB_ERROR);
|
return(DB_ERROR);
|
||||||
}
|
}
|
||||||
@ -2279,7 +2207,6 @@ row_drop_table_for_mysql(
|
|||||||
} else if (namelen == sizeof S_innodb_lock_monitor
|
} else if (namelen == sizeof S_innodb_lock_monitor
|
||||||
&& !memcmp(name, S_innodb_lock_monitor,
|
&& !memcmp(name, S_innodb_lock_monitor,
|
||||||
sizeof S_innodb_lock_monitor)) {
|
sizeof S_innodb_lock_monitor)) {
|
||||||
|
|
||||||
srv_print_innodb_monitor = FALSE;
|
srv_print_innodb_monitor = FALSE;
|
||||||
srv_print_innodb_lock_monitor = FALSE;
|
srv_print_innodb_lock_monitor = FALSE;
|
||||||
} else if (namelen == sizeof S_innodb_tablespace_monitor
|
} else if (namelen == sizeof S_innodb_tablespace_monitor
|
||||||
@ -2294,6 +2221,21 @@ row_drop_table_for_mysql(
|
|||||||
srv_print_innodb_table_monitor = FALSE;
|
srv_print_innodb_table_monitor = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ut_ad(trx->mysql_thread_id == os_thread_get_curr_id());
|
||||||
|
ut_a(name != NULL);
|
||||||
|
|
||||||
|
if (srv_created_new_raw) {
|
||||||
|
fputs(
|
||||||
|
"InnoDB: A new raw disk partition was initialized or\n"
|
||||||
|
"InnoDB: innodb_force_recovery is on: we do not allow\n"
|
||||||
|
"InnoDB: database modifications by the user. Shut down\n"
|
||||||
|
"InnoDB: mysqld and edit my.cnf so that newraw is replaced\n"
|
||||||
|
"InnoDB: with raw, and innodb_force_... is removed.\n",
|
||||||
|
stderr);
|
||||||
|
|
||||||
|
return(DB_ERROR);
|
||||||
|
}
|
||||||
|
|
||||||
quoted_name = mem_strdupq(name, '\'');
|
quoted_name = mem_strdupq(name, '\'');
|
||||||
namelen = strlen(quoted_name);
|
namelen = strlen(quoted_name);
|
||||||
sql = mem_alloc((sizeof str1) + (sizeof str2) - 2 + 1 + namelen);
|
sql = mem_alloc((sizeof str1) + (sizeof str2) - 2 + 1 + namelen);
|
||||||
@ -2676,7 +2618,7 @@ row_rename_table_for_mysql(
|
|||||||
ibool recovering_temp_table = FALSE;
|
ibool recovering_temp_table = FALSE;
|
||||||
ulint len;
|
ulint len;
|
||||||
ulint i;
|
ulint i;
|
||||||
ibool success;
|
ibool success;
|
||||||
/* length of database name; 0 if not renaming to a temporary table */
|
/* length of database name; 0 if not renaming to a temporary table */
|
||||||
ulint db_name_len;
|
ulint db_name_len;
|
||||||
char* sql;
|
char* sql;
|
||||||
|
@ -2035,8 +2035,7 @@ row_sel_convert_mysql_key_to_innobase(
|
|||||||
(ulong) data_field_len,
|
(ulong) data_field_len,
|
||||||
(ulong) (key_ptr - key_end));
|
(ulong) (key_ptr - key_end));
|
||||||
fflush(stderr);
|
fflush(stderr);
|
||||||
ut_print_buf(original_key_ptr, key_len);
|
ut_print_buf(stderr, original_key_ptr, key_len);
|
||||||
fflush(stdout);
|
|
||||||
fprintf(stderr, "\n");
|
fprintf(stderr, "\n");
|
||||||
|
|
||||||
if (!is_null) {
|
if (!is_null) {
|
||||||
@ -2772,14 +2771,12 @@ row_search_for_mysql(
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (trx->n_mysql_tables_in_use == 0) {
|
if (trx->n_mysql_tables_in_use == 0) {
|
||||||
char err_buf[1000];
|
fputs(
|
||||||
|
|
||||||
trx_print(err_buf, trx);
|
|
||||||
|
|
||||||
fprintf(stderr,
|
|
||||||
"InnoDB: Error: MySQL is trying to perform a SELECT\n"
|
"InnoDB: Error: MySQL is trying to perform a SELECT\n"
|
||||||
"InnoDB: but it has not locked any tables in ::external_lock()!\n%s\n",
|
"InnoDB: but it has not locked any tables in ::external_lock()!\n",
|
||||||
err_buf);
|
stderr);
|
||||||
|
trx_print(stderr, trx);
|
||||||
|
fputc('\n', stderr);
|
||||||
ut_a(0);
|
ut_a(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3092,14 +3089,12 @@ shortcut_fails_too_big_rec:
|
|||||||
|
|
||||||
if (trx->read_view == NULL
|
if (trx->read_view == NULL
|
||||||
&& prebuilt->select_lock_type == LOCK_NONE) {
|
&& prebuilt->select_lock_type == LOCK_NONE) {
|
||||||
char err_buf[1000];
|
|
||||||
|
|
||||||
trx_print(err_buf, trx);
|
fputs(
|
||||||
|
|
||||||
fprintf(stderr,
|
|
||||||
"InnoDB: Error: MySQL is trying to perform a consistent read\n"
|
"InnoDB: Error: MySQL is trying to perform a consistent read\n"
|
||||||
"InnoDB: but the read view is not assigned!\n%s\n", err_buf);
|
"InnoDB: but the read view is not assigned!\n", stderr);
|
||||||
|
trx_print(stderr, trx);
|
||||||
|
fputc('\n', stderr);
|
||||||
ut_a(0);
|
ut_a(0);
|
||||||
}
|
}
|
||||||
} else if (prebuilt->select_lock_type == LOCK_NONE) {
|
} else if (prebuilt->select_lock_type == LOCK_NONE) {
|
||||||
|
@ -520,6 +520,8 @@ ulint
|
|||||||
open_or_create_log_file(
|
open_or_create_log_file(
|
||||||
/*====================*/
|
/*====================*/
|
||||||
/* out: DB_SUCCESS or error code */
|
/* out: DB_SUCCESS or error code */
|
||||||
|
ibool create_new_db, /* in: TRUE if we should create a
|
||||||
|
new database */
|
||||||
ibool* log_file_created, /* out: TRUE if new log file
|
ibool* log_file_created, /* out: TRUE if new log file
|
||||||
created */
|
created */
|
||||||
ibool log_file_has_been_opened,/* in: TRUE if a log file has been
|
ibool log_file_has_been_opened,/* in: TRUE if a log file has been
|
||||||
@ -533,6 +535,8 @@ open_or_create_log_file(
|
|||||||
ulint size_high;
|
ulint size_high;
|
||||||
char name[10000];
|
char name[10000];
|
||||||
|
|
||||||
|
UT_NOT_USED(create_new_db);
|
||||||
|
|
||||||
*log_file_created = FALSE;
|
*log_file_created = FALSE;
|
||||||
|
|
||||||
srv_normalize_path_for_win(srv_log_group_home_dirs[k]);
|
srv_normalize_path_for_win(srv_log_group_home_dirs[k]);
|
||||||
|
@ -146,7 +146,9 @@ rw_lock_free(
|
|||||||
/*=========*/
|
/*=========*/
|
||||||
rw_lock_t* lock) /* in: rw-lock */
|
rw_lock_t* lock) /* in: rw-lock */
|
||||||
{
|
{
|
||||||
|
#ifdef UNIV_DEBUG
|
||||||
ut_a(rw_lock_validate(lock));
|
ut_a(rw_lock_validate(lock));
|
||||||
|
#endif /* UNIV_DEBUG */
|
||||||
ut_a(rw_lock_get_writer(lock) == RW_LOCK_NOT_LOCKED);
|
ut_a(rw_lock_get_writer(lock) == RW_LOCK_NOT_LOCKED);
|
||||||
ut_a(rw_lock_get_waiters(lock) == 0);
|
ut_a(rw_lock_get_waiters(lock) == 0);
|
||||||
ut_a(rw_lock_get_reader_count(lock) == 0);
|
ut_a(rw_lock_get_reader_count(lock) == 0);
|
||||||
|
@ -251,7 +251,9 @@ mutex_free(
|
|||||||
/*=======*/
|
/*=======*/
|
||||||
mutex_t* mutex) /* in: mutex */
|
mutex_t* mutex) /* in: mutex */
|
||||||
{
|
{
|
||||||
|
#ifdef UNIV_DEBUG
|
||||||
ut_a(mutex_validate(mutex));
|
ut_a(mutex_validate(mutex));
|
||||||
|
#endif /* UNIV_DEBUG */
|
||||||
ut_a(mutex_get_lock_word(mutex) == 0);
|
ut_a(mutex_get_lock_word(mutex) == 0);
|
||||||
ut_a(mutex_get_waiters(mutex) == 0);
|
ut_a(mutex_get_waiters(mutex) == 0);
|
||||||
|
|
||||||
|
@ -224,8 +224,9 @@ static int _ft2_search(FTB *ftb, FTB_WORD *ftbw, my_bool init_search)
|
|||||||
|
|
||||||
/* Skip rows inserted by concurrent insert */
|
/* Skip rows inserted by concurrent insert */
|
||||||
while (!r && info->lastpos >= info->state->data_file_length)
|
while (!r && info->lastpos >= info->state->data_file_length)
|
||||||
r= _mi_search_next(info, keyinfo, info->lastkey, info->lastkey_length,
|
r= _mi_search_next(info, ftbw->keyinfo, info->lastkey,
|
||||||
SEARCH_BIGGER, keyroot);
|
info->lastkey_length,
|
||||||
|
SEARCH_BIGGER, ftbw->key_root);
|
||||||
|
|
||||||
if (!r && !ftbw->off)
|
if (!r && !ftbw->off)
|
||||||
{
|
{
|
||||||
|
@ -89,8 +89,8 @@ static int walk_and_match(FT_WORD *word, uint32 count, ALL_IN_ONE *aio)
|
|||||||
doc_cnt=0;
|
doc_cnt=0;
|
||||||
|
|
||||||
/* Skip rows inserted by current inserted */
|
/* Skip rows inserted by current inserted */
|
||||||
for (r=_mi_search(info, keyinfo, keybuff, keylen, SEARCH_FIND, key_root)
|
for (r=_mi_search(info, keyinfo, keybuff, keylen, SEARCH_FIND, key_root) ;
|
||||||
!r && info->lastpos >= info->state->data_file_length;
|
!r && info->lastpos >= info->state->data_file_length ;
|
||||||
r= _mi_search_next(info, keyinfo, info->lastkey,
|
r= _mi_search_next(info, keyinfo, info->lastkey,
|
||||||
info->lastkey_length, SEARCH_BIGGER, key_root))
|
info->lastkey_length, SEARCH_BIGGER, key_root))
|
||||||
;
|
;
|
||||||
@ -159,8 +159,8 @@ static int walk_and_match(FT_WORD *word, uint32 count, ALL_IN_ONE *aio)
|
|||||||
SEARCH_BIGGER, key_root);
|
SEARCH_BIGGER, key_root);
|
||||||
|
|
||||||
while (!r && info->lastpos >= info->state->data_file_length)
|
while (!r && info->lastpos >= info->state->data_file_length)
|
||||||
r= _mi_search(info, keyinfo, info->lastkey, info->lastkey_length,
|
r= _mi_search_next(info, keyinfo, info->lastkey, info->lastkey_length,
|
||||||
SEARCH_BIGGER, key_root);
|
SEARCH_BIGGER, key_root);
|
||||||
|
|
||||||
}
|
}
|
||||||
word->weight=gweight;
|
word->weight=gweight;
|
||||||
|
@ -21,66 +21,74 @@ DROP TABLE t1;
|
|||||||
CREATE TABLE t1 (a decimal(240, 20));
|
CREATE TABLE t1 (a decimal(240, 20));
|
||||||
INSERT INTO t1 VALUES ("1234567890123456789012345678901234567890"),
|
INSERT INTO t1 VALUES ("1234567890123456789012345678901234567890"),
|
||||||
("0987654321098765432109876543210987654321");
|
("0987654321098765432109876543210987654321");
|
||||||
|
|
||||||
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT, CHARACTER_SET_CLIENT=utf8 */;
|
|
||||||
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
|
|
||||||
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
|
|
||||||
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE="NO_AUTO_VALUE_ON_ZERO" */;
|
|
||||||
DROP TABLE IF EXISTS `t1`;
|
|
||||||
CREATE TABLE `t1` (
|
CREATE TABLE `t1` (
|
||||||
`a` decimal(240,20) default NULL
|
`a` decimal(240,20) default NULL
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||||
|
|
||||||
|
|
||||||
/*!40000 ALTER TABLE `t1` DISABLE KEYS */;
|
|
||||||
LOCK TABLES `t1` WRITE;
|
|
||||||
INSERT INTO `t1` VALUES ('1234567890123456789012345678901234567890.00000000000000000000'),('0987654321098765432109876543210987654321.00000000000000000000');
|
INSERT INTO `t1` VALUES ('1234567890123456789012345678901234567890.00000000000000000000'),('0987654321098765432109876543210987654321.00000000000000000000');
|
||||||
UNLOCK TABLES;
|
|
||||||
/*!40000 ALTER TABLE `t1` ENABLE KEYS */;
|
|
||||||
|
|
||||||
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
|
|
||||||
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
|
|
||||||
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
|
|
||||||
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
|
|
||||||
|
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
CREATE TABLE t1 (a double);
|
CREATE TABLE t1 (a double);
|
||||||
INSERT INTO t1 VALUES (-9e999999);
|
INSERT INTO t1 VALUES (-9e999999);
|
||||||
|
|
||||||
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT, CHARACTER_SET_CLIENT=utf8 */;
|
|
||||||
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
|
|
||||||
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
|
|
||||||
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE="NO_AUTO_VALUE_ON_ZERO" */;
|
|
||||||
DROP TABLE IF EXISTS `t1`;
|
|
||||||
CREATE TABLE `t1` (
|
CREATE TABLE `t1` (
|
||||||
`a` double default NULL
|
`a` double default NULL
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||||
|
|
||||||
|
|
||||||
/*!40000 ALTER TABLE `t1` DISABLE KEYS */;
|
|
||||||
LOCK TABLES `t1` WRITE;
|
|
||||||
INSERT INTO `t1` VALUES (RES);
|
INSERT INTO `t1` VALUES (RES);
|
||||||
UNLOCK TABLES;
|
|
||||||
/*!40000 ALTER TABLE `t1` ENABLE KEYS */;
|
|
||||||
|
|
||||||
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
|
|
||||||
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
|
|
||||||
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
|
|
||||||
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
|
|
||||||
|
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
CREATE TABLE t1 (a DECIMAL(10,5), b FLOAT);
|
CREATE TABLE t1 (a DECIMAL(10,5), b FLOAT);
|
||||||
INSERT INTO t1 VALUES (1.2345, 2.3456);
|
INSERT INTO t1 VALUES (1.2345, 2.3456);
|
||||||
INSERT INTO t1 VALUES ('1.2345', 2.3456);
|
INSERT INTO t1 VALUES ('1.2345', 2.3456);
|
||||||
INSERT INTO t1 VALUES ("1.2345", 2.3456);
|
INSERT INTO t1 VALUES ("1.2345", 2.3456);
|
||||||
CREATE TABLE t1 (
|
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='ANSI_QUOTES';
|
||||||
a decimal(10,5) default NULL,
|
INSERT INTO t1 VALUES (1.2345, 2.3456);
|
||||||
b float default NULL
|
INSERT INTO t1 VALUES ('1.2345', 2.3456);
|
||||||
) TYPE=MyISAM;
|
INSERT INTO t1 VALUES ("1.2345", 2.3456);
|
||||||
|
ERROR 42S22: Unknown column '1.2345' in 'field list'
|
||||||
|
SET SQL_MODE=@OLD_SQL_MODE;
|
||||||
|
CREATE TABLE `t1` (
|
||||||
|
`a` decimal(10,5) default NULL,
|
||||||
|
`b` float default NULL
|
||||||
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||||
|
INSERT INTO `t1` VALUES ('1.23450',2.3456),('1.23450',2.3456),('1.23450',2.3456),('1.23450',2.3456),('1.23450',2.3456);
|
||||||
|
CREATE TABLE `t1` (
|
||||||
|
`a` decimal(10,5) default NULL,
|
||||||
|
`b` float default NULL
|
||||||
|
);
|
||||||
|
INSERT INTO `t1` VALUES ('1.23450',2.3456),('1.23450',2.3456),('1.23450',2.3456),('1.23450',2.3456),('1.23450',2.3456);
|
||||||
|
|
||||||
INSERT INTO t1 VALUES ('1.23450',2.3456);
|
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT, CHARACTER_SET_CLIENT=utf8 */;
|
||||||
INSERT INTO t1 VALUES ('1.23450',2.3456);
|
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
|
||||||
INSERT INTO t1 VALUES ('1.23450',2.3456);
|
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
|
||||||
|
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE="NO_AUTO_VALUE_ON_ZERO" */;
|
||||||
|
DROP TABLE IF EXISTS `t1`;
|
||||||
|
CREATE TABLE `t1` (
|
||||||
|
`a` decimal(10,5) default NULL,
|
||||||
|
`b` float default NULL
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
/*!40000 ALTER TABLE `t1` DISABLE KEYS */;
|
||||||
|
LOCK TABLES `t1` WRITE;
|
||||||
|
INSERT INTO `t1` VALUES ('1.23450',2.3456),('1.23450',2.3456),('1.23450',2.3456),('1.23450',2.3456),('1.23450',2.3456);
|
||||||
|
UNLOCK TABLES;
|
||||||
|
/*!40000 ALTER TABLE `t1` ENABLE KEYS */;
|
||||||
|
|
||||||
|
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
|
||||||
|
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
|
||||||
|
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
|
||||||
|
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
|
||||||
|
|
||||||
|
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
|
||||||
|
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
|
||||||
|
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE="NO_AUTO_VALUE_ON_ZERO" */;
|
||||||
|
CREATE TABLE `t1` (
|
||||||
|
`a` decimal(10,5) default NULL,
|
||||||
|
`b` float default NULL
|
||||||
|
);
|
||||||
|
|
||||||
|
INSERT INTO `t1` VALUES ('1.23450',2.3456),('1.23450',2.3456),('1.23450',2.3456),('1.23450',2.3456),('1.23450',2.3456);
|
||||||
|
|
||||||
|
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
|
||||||
|
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
|
||||||
|
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
|
||||||
|
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
CREATE TABLE t1(a int, b text, c varchar(3));
|
CREATE TABLE t1(a int, b text, c varchar(3));
|
||||||
@ -194,27 +202,9 @@ UNLOCK TABLES;
|
|||||||
|
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
create table ```a` (i int);
|
create table ```a` (i int);
|
||||||
|
|
||||||
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT, CHARACTER_SET_CLIENT=utf8 */;
|
|
||||||
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
|
|
||||||
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
|
|
||||||
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE="NO_AUTO_VALUE_ON_ZERO" */;
|
|
||||||
DROP TABLE IF EXISTS ```a`;
|
|
||||||
CREATE TABLE ```a` (
|
CREATE TABLE ```a` (
|
||||||
`i` int(11) default NULL
|
`i` int(11) default NULL
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||||
|
|
||||||
|
|
||||||
/*!40000 ALTER TABLE ```a` DISABLE KEYS */;
|
|
||||||
LOCK TABLES ```a` WRITE;
|
|
||||||
UNLOCK TABLES;
|
|
||||||
/*!40000 ALTER TABLE ```a` ENABLE KEYS */;
|
|
||||||
|
|
||||||
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
|
|
||||||
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
|
|
||||||
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
|
|
||||||
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
|
|
||||||
|
|
||||||
drop table ```a`;
|
drop table ```a`;
|
||||||
create table t1(a int);
|
create table t1(a int);
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@ DROP TABLE IF EXISTS t1, `"t"1`;
|
|||||||
|
|
||||||
CREATE TABLE t1(a int);
|
CREATE TABLE t1(a int);
|
||||||
INSERT INTO t1 VALUES (1), (2);
|
INSERT INTO t1 VALUES (1), (2);
|
||||||
--exec $MYSQL_DUMP --skip-all --skip-comments -X test t1
|
--exec $MYSQL_DUMP --skip-create --skip-comments -X test t1
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
|
||||||
#
|
#
|
||||||
@ -16,7 +16,7 @@ DROP TABLE t1;
|
|||||||
CREATE TABLE t1 (a decimal(240, 20));
|
CREATE TABLE t1 (a decimal(240, 20));
|
||||||
INSERT INTO t1 VALUES ("1234567890123456789012345678901234567890"),
|
INSERT INTO t1 VALUES ("1234567890123456789012345678901234567890"),
|
||||||
("0987654321098765432109876543210987654321");
|
("0987654321098765432109876543210987654321");
|
||||||
--exec $MYSQL_DUMP --skip-comments test t1
|
--exec $MYSQL_DUMP --compact test t1
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
|
||||||
#
|
#
|
||||||
@ -28,11 +28,11 @@ INSERT INTO t1 VALUES (-9e999999);
|
|||||||
# The following replaces is here because some systems replaces the above
|
# The following replaces is here because some systems replaces the above
|
||||||
# double with '-inf' and others with MAX_DOUBLE
|
# double with '-inf' and others with MAX_DOUBLE
|
||||||
--replace_result (-1.79769313486232e+308) (RES) (NULL) (RES)
|
--replace_result (-1.79769313486232e+308) (RES) (NULL) (RES)
|
||||||
--exec $MYSQL_DUMP --skip-comments test t1
|
--exec $MYSQL_DUMP --compact test t1
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
|
||||||
#
|
#
|
||||||
# Bug #3361 mysqldum quotes DECIMAL values
|
# Bug #3361 mysqldump quotes DECIMAL values inconsistently
|
||||||
#
|
#
|
||||||
|
|
||||||
CREATE TABLE t1 (a DECIMAL(10,5), b FLOAT);
|
CREATE TABLE t1 (a DECIMAL(10,5), b FLOAT);
|
||||||
@ -51,12 +51,15 @@ INSERT INTO t1 VALUES ("1.2345", 2.3456);
|
|||||||
SET SQL_MODE=@OLD_SQL_MODE;
|
SET SQL_MODE=@OLD_SQL_MODE;
|
||||||
|
|
||||||
# check how mysqldump make quoting
|
# check how mysqldump make quoting
|
||||||
--exec $MYSQL_DUMP --skip-comments test t1
|
--exec $MYSQL_DUMP --compact test t1
|
||||||
|
--exec $MYSQL_DUMP --compact --skip-create test t1
|
||||||
|
--exec $MYSQL_DUMP --skip-create --skip-comments test t1
|
||||||
|
--exec $MYSQL_DUMP --skip-opt --extended-insert --skip-comments test t1
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
|
||||||
CREATE TABLE t1(a int, b text, c varchar(3));
|
CREATE TABLE t1(a int, b text, c varchar(3));
|
||||||
INSERT INTO t1 VALUES (1, "test", "tes"), (2, "TEST", "TES");
|
INSERT INTO t1 VALUES (1, "test", "tes"), (2, "TEST", "TES");
|
||||||
--exec $MYSQL_DUMP --skip-all --skip-comments -X test t1
|
--exec $MYSQL_DUMP --skip-create --compact -X test t1
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
|
||||||
#
|
#
|
||||||
@ -65,7 +68,7 @@ DROP TABLE t1;
|
|||||||
|
|
||||||
CREATE TABLE t1 (`a"b"` char(2));
|
CREATE TABLE t1 (`a"b"` char(2));
|
||||||
INSERT INTO t1 VALUES ("1\""), ("\"2");
|
INSERT INTO t1 VALUES ("1\""), ("\"2");
|
||||||
--exec $MYSQL_DUMP --skip-all --skip-comments -X test t1
|
--exec $MYSQL_DUMP --compact --skip-create -X test t1
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
|
||||||
#
|
#
|
||||||
@ -74,7 +77,7 @@ DROP TABLE t1;
|
|||||||
|
|
||||||
CREATE TABLE t1 (a VARCHAR(255)) DEFAULT CHARSET koi8r;
|
CREATE TABLE t1 (a VARCHAR(255)) DEFAULT CHARSET koi8r;
|
||||||
INSERT INTO t1 VALUES (_koi8r x'C1C2C3C4C5');
|
INSERT INTO t1 VALUES (_koi8r x'C1C2C3C4C5');
|
||||||
--exec $MYSQL_DUMP --skip-comments test t1
|
--exec $MYSQL_DUMP --skip-comments test t1
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
|
||||||
#
|
#
|
||||||
@ -88,11 +91,11 @@ INSERT INTO t1 VALUES (1), (2);
|
|||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
|
||||||
#
|
#
|
||||||
# Bug #2592 'mysqldum doesn't quote "tricky" names correctly'
|
# Bug #2592 'mysqldump doesn't quote "tricky" names correctly'
|
||||||
#
|
#
|
||||||
|
|
||||||
create table ```a` (i int);
|
create table ```a` (i int);
|
||||||
--exec $MYSQL_DUMP --skip-comments test
|
--exec $MYSQL_DUMP --compact test
|
||||||
drop table ```a`;
|
drop table ```a`;
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -3748,7 +3748,7 @@ ha_innobase::delete_table(
|
|||||||
/* Drop the table in InnoDB */
|
/* Drop the table in InnoDB */
|
||||||
|
|
||||||
error = row_drop_table_for_mysql(norm_name, trx,
|
error = row_drop_table_for_mysql(norm_name, trx,
|
||||||
thd->lex.sql_command == SQLCOM_DROP_DB);
|
thd->lex->sql_command == SQLCOM_DROP_DB);
|
||||||
|
|
||||||
/* Flush the log to reduce probability that the .frm files and
|
/* Flush the log to reduce probability that the .frm files and
|
||||||
the InnoDB data dictionary get out-of-sync if the user runs
|
the InnoDB data dictionary get out-of-sync if the user runs
|
||||||
@ -4830,7 +4830,7 @@ innodb_show_status(
|
|||||||
|
|
||||||
field_list.push_back(new Item_empty_string("Status", flen));
|
field_list.push_back(new Item_empty_string("Status", flen));
|
||||||
|
|
||||||
if (protocol->send_fields(field_list, 1)) {
|
if (protocol->send_fields(&field_list, 1)) {
|
||||||
|
|
||||||
my_free(str, MYF(0));
|
my_free(str, MYF(0));
|
||||||
|
|
||||||
@ -4844,7 +4844,7 @@ innodb_show_status(
|
|||||||
if (protocol->write())
|
if (protocol->write())
|
||||||
DBUG_RETURN(-1);
|
DBUG_RETURN(-1);
|
||||||
|
|
||||||
send_eof(&thd->net);
|
send_eof(thd);
|
||||||
DBUG_RETURN(0);
|
DBUG_RETURN(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1090,9 +1090,9 @@ static void fix_max_relay_log_size(THD *thd, enum_var_type type)
|
|||||||
|
|
||||||
static int check_max_delayed_threads(THD *thd, set_var *var)
|
static int check_max_delayed_threads(THD *thd, set_var *var)
|
||||||
{
|
{
|
||||||
int val= var->value->val_int();
|
longlong val= var->value->val_int();
|
||||||
if (var->type != OPT_GLOBAL && val != 0 &&
|
if (var->type != OPT_GLOBAL && val != 0 &&
|
||||||
val != global_system_variables.max_insert_delayed_threads)
|
val != (longlong) global_system_variables.max_insert_delayed_threads)
|
||||||
{
|
{
|
||||||
char buf[64];
|
char buf[64];
|
||||||
my_error(ER_WRONG_VALUE_FOR_VAR, MYF(0), var->var->name, llstr(val, buf));
|
my_error(ER_WRONG_VALUE_FOR_VAR, MYF(0), var->var->name, llstr(val, buf));
|
||||||
@ -1101,6 +1101,7 @@ static int check_max_delayed_threads(THD *thd, set_var *var)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void fix_max_connections(THD *thd, enum_var_type type)
|
static void fix_max_connections(THD *thd, enum_var_type type)
|
||||||
{
|
{
|
||||||
resize_thr_alarm(max_connections +
|
resize_thr_alarm(max_connections +
|
||||||
|
51
sql/slave.cc
51
sql/slave.cc
@ -361,19 +361,32 @@ void init_slave_skip_errors(const char* arg)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void st_relay_log_info::inc_pending(ulonglong val)
|
|
||||||
{
|
|
||||||
pending += val;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* TODO: this probably needs to be fixed */
|
void st_relay_log_info::inc_group_relay_log_pos(ulonglong val,
|
||||||
void st_relay_log_info::inc_pos(ulonglong val, ulonglong log_pos, bool skip_lock)
|
ulonglong log_pos,
|
||||||
|
bool skip_lock)
|
||||||
{
|
{
|
||||||
if (!skip_lock)
|
if (!skip_lock)
|
||||||
pthread_mutex_lock(&data_lock);
|
pthread_mutex_lock(&data_lock);
|
||||||
relay_log_pos += val+pending;
|
inc_event_relay_log_pos(val);
|
||||||
pending = 0;
|
group_relay_log_pos= event_relay_log_pos;
|
||||||
if (log_pos)
|
strmake(group_relay_log_name,event_relay_log_name,
|
||||||
|
sizeof(group_relay_log_name)-1);
|
||||||
|
|
||||||
|
notify_group_relay_log_name_update();
|
||||||
|
|
||||||
|
/*
|
||||||
|
If the slave does not support transactions and replicates a transaction,
|
||||||
|
users should not trust group_master_log_pos (which they can display with
|
||||||
|
SHOW SLAVE STATUS or read from relay-log.info), because to compute
|
||||||
|
group_master_log_pos the slave relies on log_pos stored in the master's
|
||||||
|
binlog, but if we are in a master's transaction these positions are always
|
||||||
|
the BEGIN's one (excepted for the COMMIT), so group_master_log_pos does
|
||||||
|
not advance as it should on the non-transactional slave (it advances by
|
||||||
|
big leaps, whereas it should advance by small leaps).
|
||||||
|
*/
|
||||||
|
if (log_pos) // 3.23 binlogs don't have log_posx
|
||||||
|
{
|
||||||
#if MYSQL_VERSION_ID < 50000
|
#if MYSQL_VERSION_ID < 50000
|
||||||
/*
|
/*
|
||||||
If the event was converted from a 3.23 format, get_event_len() has
|
If the event was converted from a 3.23 format, get_event_len() has
|
||||||
@ -384,28 +397,18 @@ void st_relay_log_info::inc_pos(ulonglong val, ulonglong log_pos, bool skip_lock
|
|||||||
mi->old_format will not help if the I/O thread has not started yet.
|
mi->old_format will not help if the I/O thread has not started yet.
|
||||||
Yes this is a hack but it's just to make 3.23->4.x replication work;
|
Yes this is a hack but it's just to make 3.23->4.x replication work;
|
||||||
3.23->5.0 replication is working much better.
|
3.23->5.0 replication is working much better.
|
||||||
|
|
||||||
The line "mi->old_format ? : " below should NOT BE MERGED to 5.0 which
|
|
||||||
already works. But it SHOULD be merged to 4.1.
|
|
||||||
*/
|
*/
|
||||||
master_log_pos= log_pos + val -
|
group_master_log_pos= log_pos + val -
|
||||||
(mi->old_format ? (LOG_EVENT_HEADER_LEN - OLD_HEADER_LEN) : 0);
|
(mi->old_format ? (LOG_EVENT_HEADER_LEN - OLD_HEADER_LEN) : 0);
|
||||||
#endif
|
#else
|
||||||
|
group_master_log_pos= log_pos+ val;
|
||||||
|
#endif /* MYSQL_VERSION_ID < 5000 */
|
||||||
|
}
|
||||||
pthread_cond_broadcast(&data_cond);
|
pthread_cond_broadcast(&data_cond);
|
||||||
if (!skip_lock)
|
if (!skip_lock)
|
||||||
pthread_mutex_unlock(&data_lock);
|
pthread_mutex_unlock(&data_lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
thread safe read of position - not needed if we are in the slave thread,
|
|
||||||
but required otherwise as var is a longlong
|
|
||||||
*/
|
|
||||||
void st_relay_log_info::read_pos(ulonglong& var)
|
|
||||||
{
|
|
||||||
pthread_mutex_lock(&data_lock);
|
|
||||||
var = relay_log_pos;
|
|
||||||
pthread_mutex_unlock(&data_lock);
|
|
||||||
}
|
|
||||||
|
|
||||||
void st_relay_log_info::close_temporary_tables()
|
void st_relay_log_info::close_temporary_tables()
|
||||||
{
|
{
|
||||||
|
29
sql/slave.h
29
sql/slave.h
@ -291,34 +291,7 @@ typedef struct st_relay_log_info
|
|||||||
event_relay_log_pos+= val;
|
event_relay_log_pos+= val;
|
||||||
}
|
}
|
||||||
|
|
||||||
void inc_group_relay_log_pos(ulonglong val, ulonglong log_pos, bool skip_lock=0)
|
void inc_group_relay_log_pos(ulonglong val, ulonglong log_pos, bool skip_lock=0);
|
||||||
{
|
|
||||||
if (!skip_lock)
|
|
||||||
pthread_mutex_lock(&data_lock);
|
|
||||||
inc_event_relay_log_pos(val);
|
|
||||||
group_relay_log_pos= event_relay_log_pos;
|
|
||||||
strmake(group_relay_log_name,event_relay_log_name,
|
|
||||||
sizeof(group_relay_log_name)-1);
|
|
||||||
|
|
||||||
notify_group_relay_log_name_update();
|
|
||||||
|
|
||||||
/*
|
|
||||||
If the slave does not support transactions and replicates a transaction,
|
|
||||||
users should not trust group_master_log_pos (which they can display with
|
|
||||||
SHOW SLAVE STATUS or read from relay-log.info), because to compute
|
|
||||||
group_master_log_pos the slave relies on log_pos stored in the master's
|
|
||||||
binlog, but if we are in a master's transaction these positions are always
|
|
||||||
the BEGIN's one (excepted for the COMMIT), so group_master_log_pos does
|
|
||||||
not advance as it should on the non-transactional slave (it advances by
|
|
||||||
big leaps, whereas it should advance by small leaps).
|
|
||||||
*/
|
|
||||||
if (log_pos) // 3.23 binlogs don't have log_posx
|
|
||||||
group_master_log_pos= log_pos+ val;
|
|
||||||
pthread_cond_broadcast(&data_cond);
|
|
||||||
if (!skip_lock)
|
|
||||||
pthread_mutex_unlock(&data_lock);
|
|
||||||
}
|
|
||||||
|
|
||||||
int wait_for_pos(THD* thd, String* log_name, longlong log_pos,
|
int wait_for_pos(THD* thd, String* log_name, longlong log_pos,
|
||||||
longlong timeout);
|
longlong timeout);
|
||||||
void close_temporary_tables();
|
void close_temporary_tables();
|
||||||
|
@ -181,7 +181,7 @@ int mysqld_show_storage_engines(THD *thd)
|
|||||||
Protocol *protocol= thd->protocol;
|
Protocol *protocol= thd->protocol;
|
||||||
DBUG_ENTER("mysqld_show_storage_engines");
|
DBUG_ENTER("mysqld_show_storage_engines");
|
||||||
|
|
||||||
field_list.push_back(new Item_empty_string("Type",10));
|
field_list.push_back(new Item_empty_string("Engine",10));
|
||||||
field_list.push_back(new Item_empty_string("Support",10));
|
field_list.push_back(new Item_empty_string("Support",10));
|
||||||
field_list.push_back(new Item_empty_string("Comment",80));
|
field_list.push_back(new Item_empty_string("Comment",80));
|
||||||
|
|
||||||
@ -471,7 +471,7 @@ int mysqld_extend_show_tables(THD *thd,const char *db,const char *wild)
|
|||||||
(void) sprintf(path,"%s/%s",mysql_data_home,db);
|
(void) sprintf(path,"%s/%s",mysql_data_home,db);
|
||||||
(void) unpack_dirname(path,path);
|
(void) unpack_dirname(path,path);
|
||||||
field_list.push_back(item=new Item_empty_string("Name",NAME_LEN));
|
field_list.push_back(item=new Item_empty_string("Name",NAME_LEN));
|
||||||
field_list.push_back(item=new Item_empty_string("Type",10));
|
field_list.push_back(item=new Item_empty_string("Engine",10));
|
||||||
item->maybe_null=1;
|
item->maybe_null=1;
|
||||||
field_list.push_back(item=new Item_empty_string("Row_format",10));
|
field_list.push_back(item=new Item_empty_string("Row_format",10));
|
||||||
item->maybe_null=1;
|
item->maybe_null=1;
|
||||||
|
Reference in New Issue
Block a user