dict0dict.c, log.cc:

  Remove accidentally merged 4.0 changes
dict0dict.c:
  Remove the 4.0 fix accidentally auto-merged to 4.1
row0mysql.h, dict0dict.h:
  Remove a change auto-merged from 4.0
parent d9fbdff6
......@@ -27,8 +27,6 @@ Created 1/8/1996 Heikki Tuuri
#include "que0que.h"
#include "rem0cmp.h"
ibool dict_char_0xA0_is_space = FALSE; /* A special fix for 4.0 */
dict_sys_t* dict_sys = NULL; /* the dictionary system */
rw_lock_t dict_operation_lock; /* table create, drop, etc. reserve
......@@ -198,28 +196,7 @@ and unique key errors */
FILE* dict_foreign_err_file = NULL;
mutex_t dict_foreign_err_mutex; /* mutex protecting the foreign
and unique error buffers */
/************************************************************************
Checks if a byte is considered space in the current charset of MySQL.
TODO: find out if this works correctly in multibyte charsets. */
static
ibool
dict_isspace(
/*=========*/
/* out: TRUE if considered space */
char c) /* in: one-byte character */
{
if (isspace(c)) {
return(TRUE);
}
if (dict_char_0xA0_is_space && (byte)c == (byte)0xA0) {
return(TRUE);
}
return(FALSE);
}
/************************************************************************
Checks if the database name in two table names is the same. */
......@@ -2347,7 +2324,7 @@ dict_accept(
*success = FALSE;
while (dict_isspace(*ptr)) {
while (isspace(*ptr)) {
ptr++;
}
......@@ -2392,7 +2369,7 @@ dict_scan_id(
*id = NULL;
while (dict_isspace(*ptr)) {
while (isspace(*ptr)) {
ptr++;
}
......@@ -2423,7 +2400,7 @@ dict_scan_id(
len++;
}
} else {
while (!dict_isspace(*ptr) && *ptr != '(' && *ptr != ')'
while (!isspace(*ptr) && *ptr != '(' && *ptr != ')'
&& (accept_also_dot || *ptr != '.')
&& *ptr != ',' && *ptr != '\0') {
......@@ -2927,11 +2904,11 @@ loop:
ut_a(success);
if (!dict_isspace(*ptr) && *ptr != '"' && *ptr != '`') {
if (!isspace(*ptr) && *ptr != '"' && *ptr != '`') {
goto loop;
}
while (dict_isspace(*ptr)) {
while (isspace(*ptr)) {
ptr++;
}
......@@ -2957,7 +2934,7 @@ loop:
ptr = dict_accept(ptr, "FOREIGN", &success);
if (!dict_isspace(*ptr)) {
if (!isspace(*ptr)) {
goto loop;
}
......@@ -3045,7 +3022,7 @@ col_loop1:
}
ptr = dict_accept(ptr, "REFERENCES", &success);
if (!success || !dict_isspace(*ptr)) {
if (!success || !isspace(*ptr)) {
dict_foreign_report_syntax_err(name, start_of_latest_foreign,
ptr);
return(DB_CANNOT_ADD_CONSTRAINT);
......@@ -3426,7 +3403,7 @@ loop:
ptr = dict_accept(ptr, "DROP", &success);
if (!dict_isspace(*ptr)) {
if (!isspace(*ptr)) {
goto loop;
}
......
......@@ -26,8 +26,6 @@ Created 1/8/1996 Heikki Tuuri
#include "ut0byte.h"
#include "trx0types.h"
extern ibool dict_char_0xA0_is_space;
/************************************************************************
Get the database name length in a table name. */
......
......@@ -291,6 +291,16 @@ row_mysql_unfreeze_data_dictionary(
/*===============================*/
trx_t* trx); /* in: transaction */
/*************************************************************************
Checks if a table name contains the string "/#sql" which denotes temporary
tables in MySQL. */
ibool
row_is_mysql_tmp_table_name(
/*========================*/
/* out: TRUE if temporary table */
const char* name); /* in: table name in the form
'database/tablename' */
/*************************************************************************
Does a table creation operation for MySQL. If the name of the created
table ends to characters INNODB_MONITOR, then this also starts
printing of monitor output by the master thread. */
......
......@@ -2036,7 +2036,6 @@ bool flush_error_log()
char err_renamed[FN_REFLEN], *end;
end= strmake(err_renamed,log_error_file,FN_REFLEN-4);
strmov(end, "-old");
VOID(pthread_mutex_lock(&LOCK_error_log));
#ifdef __WIN__
char err_temp[FN_REFLEN+4];
/*
......@@ -2044,7 +2043,7 @@ bool flush_error_log()
the current error file.
*/
strmov(strmov(err_temp, err_renamed),"-tmp");
(void) my_delete(err_temp, MYF(0));
(void) my_delete(err_temp, MYF(0));
if (freopen(err_temp,"a+",stdout))
{
freopen(err_temp,"a+",stderr);
......@@ -2057,21 +2056,20 @@ bool flush_error_log()
if ((fd = my_open(err_temp, O_RDONLY, MYF(0))) >= 0)
{
while ((bytes = (int) my_read(fd, (byte*) buf, IO_SIZE, MYF(0))) > 0)
my_fwrite(stderr, (byte*) buf, bytes, MYF(0));
my_fwrite(stderr, (byte*) buf, (uint) strlen(buf),MYF(0));
my_close(fd, MYF(0));
}
(void) my_delete(err_temp, MYF(0));
(void) my_delete(err_temp, MYF(0));
}
else
result= 1;
#else
my_rename(log_error_file,err_renamed,MYF(0));
if (freopen(log_error_file,"a+",stdout))
freopen(log_error_file,"a+",stderr);
else
result= 1;
my_rename(log_error_file,err_renamed,MYF(0));
if (freopen(log_error_file,"a+",stdout))
freopen(log_error_file,"a+",stderr);
else
result= 1;
#endif
VOID(pthread_mutex_unlock(&LOCK_error_log));
}
return result;
}
......
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