Commit 140a7060 authored by marko's avatar marko

branches/zip: Merge 1783:1792 from trunk.

parent a2943ec7
...@@ -1242,8 +1242,7 @@ innobase_invalidate_query_cache( ...@@ -1242,8 +1242,7 @@ innobase_invalidate_query_cache(
} }
/********************************************************************* /*********************************************************************
Display an SQL identifier. Display an SQL identifier. */
This definition must match the one in innobase/ut/ut0ut.c! */
extern "C" extern "C"
void void
innobase_print_identifier( innobase_print_identifier(
......
#ifndef HA_INNODB_PROTOTYPES_H #ifndef HA_INNODB_PROTOTYPES_H
#define HA_INNODB_PROTOTYPES_H #define HA_INNODB_PROTOTYPES_H
#ifndef UNIV_HOTBACKUP
#include "univ.i" /* ulint, uint */ #include "univ.i" /* ulint, uint */
#include "m_ctype.h" /* CHARSET_INFO */ #include "m_ctype.h" /* CHARSET_INFO */
...@@ -22,6 +24,19 @@ innobase_convert_string( ...@@ -22,6 +24,19 @@ innobase_convert_string(
CHARSET_INFO* from_cs, CHARSET_INFO* from_cs,
uint* errors); uint* errors);
/*********************************************************************
Display an SQL identifier. */
void
innobase_print_identifier(
/*======================*/
FILE* f, /* in: output stream */
trx_t* trx, /* in: transaction */
ibool table_id,/* in: TRUE=print a table name,
FALSE=print other identifier */
const char* name, /* in: name to print */
ulint namelen);/* in: length of name */
/********************************************************************** /**********************************************************************
Returns true if the thread is the replication thread on the slave Returns true if the thread is the replication thread on the slave
server. Used in srv_conc_enter_innodb() to determine if the thread server. Used in srv_conc_enter_innodb() to determine if the thread
...@@ -59,3 +74,4 @@ innobase_mysql_print_thd( ...@@ -59,3 +74,4 @@ innobase_mysql_print_thd(
uint max_query_len); /* in: max query length to print, or 0 to uint max_query_len); /* in: max query length to print, or 0 to
use the default max length */ use the default max length */
#endif #endif
#endif
...@@ -502,7 +502,7 @@ ERROR 23000: Duplicate entry 'test2' for key 'ggid' ...@@ -502,7 +502,7 @@ ERROR 23000: Duplicate entry 'test2' for key 'ggid'
select * from t1; select * from t1;
id ggid email passwd id ggid email passwd
1 this will work 1 this will work
4 test2 this will work 3 test2 this will work
select * from t1 where id=1; select * from t1 where id=1;
id ggid email passwd id ggid email passwd
1 this will work 1 this will work
......
...@@ -6,10 +6,6 @@ MYSQL_PLUGIN_DYNAMIC(innobase, [ha_innodb.la]) ...@@ -6,10 +6,6 @@ MYSQL_PLUGIN_DYNAMIC(innobase, [ha_innodb.la])
MYSQL_PLUGIN_ACTIONS(innobase, [ MYSQL_PLUGIN_ACTIONS(innobase, [
AC_CHECK_LIB(rt, aio_read, [innodb_system_libs="-lrt"]) AC_CHECK_LIB(rt, aio_read, [innodb_system_libs="-lrt"])
AC_SUBST(innodb_system_libs) AC_SUBST(innodb_system_libs)
AC_PROG_CC
AC_PROG_RANLIB
AC_PROG_INSTALL
AC_PROG_LIBTOOL
AC_CHECK_HEADERS(aio.h sched.h) AC_CHECK_HEADERS(aio.h sched.h)
AC_CHECK_SIZEOF(int, 4) AC_CHECK_SIZEOF(int, 4)
AC_CHECK_SIZEOF(long, 4) AC_CHECK_SIZEOF(long, 4)
......
...@@ -1822,13 +1822,11 @@ row_create_table_for_mysql( ...@@ -1822,13 +1822,11 @@ row_create_table_for_mysql(
ut_ad(trx->dict_operation_lock_mode == RW_X_LATCH); ut_ad(trx->dict_operation_lock_mode == RW_X_LATCH);
if (srv_created_new_raw) { if (srv_created_new_raw) {
fputs("InnoDB: A new raw disk partition was initialized or\n" fputs("InnoDB: A new raw disk partition was initialized:\n"
"InnoDB: innodb_force_recovery is on: we do not allow\n" "InnoDB: we do not allow database modifications"
"InnoDB: database modifications by the user. Shut down\n" " by the user.\n"
"InnoDB: mysqld and edit my.cnf so that newraw" "InnoDB: Shut down mysqld and edit my.cnf so that newraw"
" is replaced\n" " is replaced with raw.\n", stderr);
"InnoDB: with raw, and innodb_force_... is removed.\n",
stderr);
dict_mem_table_free(table); dict_mem_table_free(table);
trx_commit_for_mysql(trx); trx_commit_for_mysql(trx);
...@@ -2772,13 +2770,11 @@ row_truncate_table_for_mysql( ...@@ -2772,13 +2770,11 @@ row_truncate_table_for_mysql(
ut_ad(table); ut_ad(table);
if (srv_created_new_raw) { if (srv_created_new_raw) {
fputs("InnoDB: A new raw disk partition was initialized or\n" fputs("InnoDB: A new raw disk partition was initialized:\n"
"InnoDB: innodb_force_recovery is on: we do not allow\n" "InnoDB: we do not allow database modifications"
"InnoDB: database modifications by the user. Shut down\n" " by the user.\n"
"InnoDB: mysqld and edit my.cnf so that newraw" "InnoDB: Shut down mysqld and edit my.cnf so that newraw"
" is replaced\n" " is replaced with raw.\n", stderr);
"InnoDB: with raw, and innodb_force_... is removed.\n",
stderr);
return(DB_ERROR); return(DB_ERROR);
} }
...@@ -3076,21 +3072,17 @@ row_drop_table_for_mysql_no_commit( ...@@ -3076,21 +3072,17 @@ row_drop_table_for_mysql_no_commit(
ulint err; ulint err;
const char* table_name; const char* table_name;
ulint namelen; ulint namelen;
char* dir_path_of_temp_table = NULL;
ibool success;
ibool locked_dictionary = FALSE; ibool locked_dictionary = FALSE;
pars_info_t* info = NULL; pars_info_t* info = NULL;
ut_a(name != NULL); ut_a(name != NULL);
if (srv_created_new_raw) { if (srv_created_new_raw) {
fputs("InnoDB: A new raw disk partition was initialized or\n" fputs("InnoDB: A new raw disk partition was initialized:\n"
"InnoDB: innodb_force_recovery is on: we do not allow\n" "InnoDB: we do not allow database modifications"
"InnoDB: database modifications by the user. Shut down\n" " by the user.\n"
"InnoDB: mysqld and edit my.cnf so that newraw" "InnoDB: Shut down mysqld and edit my.cnf so that newraw"
" is replaced\n" " is replaced with raw.\n", stderr);
"InnoDB: with raw, and innodb_force_... is removed.\n",
stderr);
return(DB_ERROR); return(DB_ERROR);
} }
...@@ -3377,14 +3369,20 @@ row_drop_table_for_mysql_no_commit( ...@@ -3377,14 +3369,20 @@ row_drop_table_for_mysql_no_commit(
} else { } else {
ibool is_path; ibool is_path;
const char* name_or_path; const char* name_or_path;
mem_heap_t* heap;
heap = mem_heap_create(200);
/* Clone the name, in case it has been allocated
from table->heap, which will be freed by
dict_table_remove_from_cache(table) below. */
name = mem_heap_strdup(heap, name);
space_id = table->space; space_id = table->space;
if (table->dir_path_of_temp_table != NULL) { if (table->dir_path_of_temp_table != NULL) {
dir_path_of_temp_table = mem_strdup(
table->dir_path_of_temp_table);
is_path = TRUE; is_path = TRUE;
name_or_path = dir_path_of_temp_table; name_or_path = mem_heap_strdup(
heap, table->dir_path_of_temp_table);
} else { } else {
is_path = FALSE; is_path = FALSE;
name_or_path = name; name_or_path = name;
...@@ -3417,13 +3415,7 @@ row_drop_table_for_mysql_no_commit( ...@@ -3417,13 +3415,7 @@ row_drop_table_for_mysql_no_commit(
"InnoDB: of table "); "InnoDB: of table ");
ut_print_name(stderr, trx, TRUE, name); ut_print_name(stderr, trx, TRUE, name);
fprintf(stderr, ".\n"); fprintf(stderr, ".\n");
} else if (!fil_delete_tablespace(space_id)) {
goto funct_exit;
}
success = fil_delete_tablespace(space_id);
if (!success) {
fprintf(stderr, fprintf(stderr,
"InnoDB: We removed now the InnoDB" "InnoDB: We removed now the InnoDB"
" internal data dictionary entry\n" " internal data dictionary entry\n"
...@@ -3441,6 +3433,8 @@ row_drop_table_for_mysql_no_commit( ...@@ -3441,6 +3433,8 @@ row_drop_table_for_mysql_no_commit(
err = DB_ERROR; err = DB_ERROR;
} }
} }
mem_heap_free(heap);
} }
funct_exit: funct_exit:
...@@ -3448,10 +3442,6 @@ row_drop_table_for_mysql_no_commit( ...@@ -3448,10 +3442,6 @@ row_drop_table_for_mysql_no_commit(
row_mysql_unlock_data_dictionary(trx); row_mysql_unlock_data_dictionary(trx);
} }
if (dir_path_of_temp_table) {
mem_free(dir_path_of_temp_table);
}
trx->op_info = ""; trx->op_info = "";
#ifndef UNIV_HOTBACKUP #ifndef UNIV_HOTBACKUP
......
...@@ -17,6 +17,7 @@ Created 5/11/1994 Heikki Tuuri ...@@ -17,6 +17,7 @@ Created 5/11/1994 Heikki Tuuri
#include <ctype.h> #include <ctype.h>
#include "trx0trx.h" #include "trx0trx.h"
#include "ha_prototypes.h"
ibool ut_always_false = FALSE; ibool ut_always_false = FALSE;
...@@ -69,22 +70,6 @@ ut_gettimeofday( ...@@ -69,22 +70,6 @@ ut_gettimeofday(
#define ut_gettimeofday gettimeofday #define ut_gettimeofday gettimeofday
#endif #endif
#ifndef UNIV_HOTBACKUP
/*********************************************************************
Display an SQL identifier.
This definition must match the one in sql/ha_innodb.cc! */
extern
void
innobase_print_identifier(
/*======================*/
FILE* f, /* in: output stream */
trx_t* trx, /* in: transaction */
ibool table_id,/* in: TRUE=print a table name,
FALSE=print other identifier */
const char* name, /* in: name to print */
ulint namelen);/* in: length of name */
#endif /* !UNIV_HOTBACKUP */
/************************************************************ /************************************************************
Gets the high 32 bits in a ulint. That is makes a shift >> 32, Gets the high 32 bits in a ulint. That is makes a shift >> 32,
but since there seem to be compiler bugs in both gcc and Visual C++, but since there seem to be compiler bugs in both gcc and Visual C++,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment