Commit e7ab159a authored by unknown's avatar unknown

Added create_tmp_disk_tables + comments for 3.23.24


Docs/manual.texi:
  Update for 3.23.24
sql/mysql_priv.h:
  Added create_tmp_disk_tables
sql/mysqld.cc:
  Added create_tmp_disk_tables
sql/sql_select.cc:
  Added create_tmp_disk_tables
parent c2b47100
...@@ -6764,26 +6764,16 @@ install}. ...@@ -6764,26 +6764,16 @@ install}.
@item @item
Remember to use GNU @code{make} when making @strong{MySQL}. Remember to use GNU @code{make} when making @strong{MySQL}.
@item @item
On OSR 5.0.5, you should use the following configure line:
@example
shell> CC="gcc -DSCO" CXX="gcc -DSCO" ./configure
@end example
The @code{-DSCO} is needed to help configure detect some thread
functions properly. If you forget @code{-DSCO}, you will get the following
error message while compiling:
@example
my_pthread.c: In function `my_pthread_mutex_init':
my_pthread.c:374: `pthread_mutexattr_default' undeclared (first use this function)
@end example
@item
If you don't start @code{safe_mysqld} as root, you probably will get only the If you don't start @code{safe_mysqld} as root, you probably will get only the
default 110 open files per process. @code{mysqld} will write a note about this default 110 open files per process. @code{mysqld} will write a note about this
in the log file. in the log file.
@item @item
With SCO 3.2V5.0.5, you should use FSU Pthreads version 3.5c or newer. With SCO 3.2V5.0.5, you should use FSU Pthreads version 3.5c or newer.
You should also use gcc 2.95.2 or newer !
The following @code{configure} command should work: The following @code{configure} command should work:
@example @example
shell> CC="gcc -belf" ./configure --prefix=/usr/local/mysql --disable-shared shell> ./configure --prefix=/usr/local/mysql --disable-shared
@end example @end example
@item @item
With SCO 3.2V4.2, you should use FSU Pthreads version 3.5c or newer. With SCO 3.2V4.2, you should use FSU Pthreads version 3.5c or newer.
...@@ -6827,17 +6817,19 @@ In FSU Pthreads, the following system calls are pthreads-aware: @code{read()}, ...@@ -6827,17 +6817,19 @@ In FSU Pthreads, the following system calls are pthreads-aware: @code{read()},
If you want to install DBI on SCO, you have to edit the @file{Makefiles} in If you want to install DBI on SCO, you have to edit the @file{Makefiles} in
DBI-xxx and each subdirectory: DBI-xxx and each subdirectory:
Note that the following assumes gcc 2.95.2 or newer!
@example @example
OLD: NEW: OLD: NEW:
CC = cc CC = gcc -belf CC = cc CC = gcc
CCCDLFLAGS = -KPIC -W1,-Bexport CCCDLFLAGS = -fpic CCCDLFLAGS = -KPIC -W1,-Bexport CCCDLFLAGS = -fpic
CCDLFLAGS = -wl,-Bexport CCDLFLAGS = CCDLFLAGS = -wl,-Bexport CCDLFLAGS =
LD = ld LD = gcc -belf -G -fpic LD = ld LD = gcc -G -fpic
LDDLFLAGS = -G -L/usr/local/lib LDDLFLAGS = -L/usr/local/lib LDDLFLAGS = -G -L/usr/local/lib LDDLFLAGS = -L/usr/local/lib
LDFLAGS = -belf -L/usr/local/lib LDFLAGS = -L/usr/local/lib LDFLAGS = -belf -L/usr/local/lib LDFLAGS = -L/usr/local/lib
LD = ld LD = gcc -belf -G -fpic LD = ld LD = gcc -G -fpic
OPTIMISE = -Od OPTIMISE = -O1 OPTIMISE = -Od OPTIMISE = -O1
OLD: OLD:
...@@ -8749,6 +8741,10 @@ The following lists tell what you have to watch out for when upgrading to 3.23: ...@@ -8749,6 +8741,10 @@ The following lists tell what you have to watch out for when upgrading to 3.23:
(-G). This may cause incompatibility problems in some cases, for example (-G). This may cause incompatibility problems in some cases, for example
in SQL scripts that use named commands without a semicolon, etc. ! in SQL scripts that use named commands without a semicolon, etc. !
Long format commands still work from the first line. Long format commands still work from the first line.
@item
If you are using the @code{german} character sort order, you must repair
all your tables with @code{isamchk -r}, as we have made some changes in
the sort order!
@item The default return type of @code{IF} will now depend on both arguments @item The default return type of @code{IF} will now depend on both arguments
and not only the first argument. and not only the first argument.
@item @code{AUTO_INCREMENT} will not work with negative numbers. @item @code{AUTO_INCREMENT} will not work with negative numbers.
...@@ -18570,7 +18566,8 @@ The status variables listed above have the following meaning: ...@@ -18570,7 +18566,8 @@ The status variables listed above have the following meaning:
@item @code{Bytes_received} @tab Number of bytes received from the client @item @code{Bytes_received} @tab Number of bytes received from the client
@item @code{Bytes_sent} @tab Number of bytes received from the client @item @code{Bytes_sent} @tab Number of bytes received from the client
@item @code{Connections} @tab Number of connection attempts to the @strong{MySQL} server. @item @code{Connections} @tab Number of connection attempts to the @strong{MySQL} server.
@item @code{Created_tmp_tables} @tab Number of implicit temporary tables that have been created while executing statements. @item @code{Created_tmp_disk_tables} @tab Number of implicit temporary tables on disk that have been created while executing statements.
@item @code{Created_tmp_tables} @tab Number of implicit temporary tables in memory that have been created while executing statements.
@item @code{Delayed_insert_threads} @tab Number of delayed insert handler threads in use. @item @code{Delayed_insert_threads} @tab Number of delayed insert handler threads in use.
@item @code{Delayed_writes} @tab Number of rows written with @code{INSERT DELAYED}. @item @code{Delayed_writes} @tab Number of rows written with @code{INSERT DELAYED}.
@item @code{Delayed_errors} @tab Number of rows written with @code{INSERT DELAYED} for which some error occurred (probably @code{duplicate key}). @item @code{Delayed_errors} @tab Number of rows written with @code{INSERT DELAYED} for which some error occurred (probably @code{duplicate key}).
...@@ -35808,6 +35805,8 @@ though, so 3.23 is not released as a stable version yet. ...@@ -35808,6 +35805,8 @@ though, so 3.23 is not released as a stable version yet.
@appendixsubsec Changes in release 3.23.24 @appendixsubsec Changes in release 3.23.24
@itemize @bullet @itemize @bullet
@item @item
Added mysqld variable @code{created_tmp_disk_tables}.
@item
To make it possibly to reliable dump and restore tables with To make it possibly to reliable dump and restore tables with
@code{TIMESTAMP(X)} columns, @code{MySQL} now reports columns with X @code{TIMESTAMP(X)} columns, @code{MySQL} now reports columns with X
other than 14 or 8 to be strings. other than 14 or 8 to be strings.
...@@ -428,7 +428,8 @@ extern char mysql_data_home[2],server_version[50],max_sort_char, ...@@ -428,7 +428,8 @@ extern char mysql_data_home[2],server_version[50],max_sort_char,
extern my_string mysql_unix_port,mysql_tmpdir; extern my_string mysql_unix_port,mysql_tmpdir;
extern const char *first_keyword, *localhost; extern const char *first_keyword, *localhost;
extern ulong refresh_version,flush_version, thread_id,query_id,opened_tables, extern ulong refresh_version,flush_version, thread_id,query_id,opened_tables,
created_tmp_tables, aborted_threads,aborted_connects, created_tmp_tables, created_tmp_disk_tables,
aborted_threads,aborted_connects,
delayed_insert_timeout, delayed_insert_timeout,
delayed_insert_limit, delayed_queue_size, delayed_insert_limit, delayed_queue_size,
delayed_insert_threads, delayed_insert_writes, delayed_insert_threads, delayed_insert_writes,
......
...@@ -205,7 +205,8 @@ ulong query_id=1L,long_query_count,long_query_time,aborted_threads, ...@@ -205,7 +205,8 @@ ulong query_id=1L,long_query_count,long_query_time,aborted_threads,
aborted_connects,delayed_insert_timeout,delayed_insert_limit, aborted_connects,delayed_insert_timeout,delayed_insert_limit,
delayed_queue_size,delayed_insert_threads,delayed_insert_writes, delayed_queue_size,delayed_insert_threads,delayed_insert_writes,
delayed_rows_in_use,delayed_insert_errors,flush_time; delayed_rows_in_use,delayed_insert_errors,flush_time;
ulong specialflag=0,opened_tables=0,created_tmp_tables=0; ulong specialflag=0,opened_tables=0,created_tmp_tables=0,
created_tmp_disk_tables=0;
ulong max_connections,max_insert_delayed_threads,max_used_connections, ulong max_connections,max_insert_delayed_threads,max_used_connections,
max_connect_errors; max_connect_errors;
ulong thread_id=1L,current_pid; ulong thread_id=1L,current_pid;
...@@ -2411,6 +2412,7 @@ struct show_var_st status_vars[]= { ...@@ -2411,6 +2412,7 @@ struct show_var_st status_vars[]= {
{"Bytes_received", (char*) &bytes_received, SHOW_LONG}, {"Bytes_received", (char*) &bytes_received, SHOW_LONG},
{"Bytes_sent", (char*) &bytes_sent, SHOW_LONG}, {"Bytes_sent", (char*) &bytes_sent, SHOW_LONG},
{"Connections", (char*) &thread_id, SHOW_LONG_CONST}, {"Connections", (char*) &thread_id, SHOW_LONG_CONST},
{"Created_tmp_disk_tables", (char*) &created_tmp_disk_tables,SHOW_LONG},
{"Created_tmp_tables", (char*) &created_tmp_tables, SHOW_LONG}, {"Created_tmp_tables", (char*) &created_tmp_tables, SHOW_LONG},
{"Delayed_insert_threads", (char*) &delayed_insert_threads, SHOW_LONG}, {"Delayed_insert_threads", (char*) &delayed_insert_threads, SHOW_LONG},
{"Delayed_writes", (char*) &delayed_insert_writes, SHOW_LONG}, {"Delayed_writes", (char*) &delayed_insert_writes, SHOW_LONG},
......
...@@ -3161,7 +3161,7 @@ create_tmp_table(THD *thd,TMP_TABLE_PARAM *param,List<Item> &fields, ...@@ -3161,7 +3161,7 @@ create_tmp_table(THD *thd,TMP_TABLE_PARAM *param,List<Item> &fields,
(int) distinct, (int) save_sum_fields, (int) distinct, (int) save_sum_fields,
(int) allow_distinct_limit,test(group))); (int) allow_distinct_limit,test(group)));
created_tmp_tables++; // Global, but should be safe statistic_increment(created_tmp_tables, &LOCK_status);
sprintf(path,"%s%s%lx_%lx_%x",mysql_tmpdir,tmp_file_prefix,current_pid, sprintf(path,"%s%s%lx_%lx_%x",mysql_tmpdir,tmp_file_prefix,current_pid,
thd->thread_id, thd->tmp_table++); thd->thread_id, thd->tmp_table++);
if (group) if (group)
...@@ -3681,6 +3681,7 @@ bool create_myisam_from_heap(TABLE *table, TMP_TABLE_PARAM *param, int error, ...@@ -3681,6 +3681,7 @@ bool create_myisam_from_heap(TABLE *table, TMP_TABLE_PARAM *param, int error,
save_proc_info=thd->proc_info; save_proc_info=thd->proc_info;
thd->proc_info="converting HEAP to MyISAM"; thd->proc_info="converting HEAP to MyISAM";
statistic_increment(created_tmp_disk_tables, &LOCK_status);
if (create_myisam_tmp_table(&new_table,param, if (create_myisam_tmp_table(&new_table,param,
thd->lex.options | thd->options)) thd->lex.options | thd->options))
goto err2; goto err2;
...@@ -3849,13 +3850,13 @@ sub_select_cache(JOIN *join,JOIN_TAB *join_tab,bool end_of_records) ...@@ -3849,13 +3850,13 @@ sub_select_cache(JOIN *join,JOIN_TAB *join_tab,bool end_of_records)
return error; /* purecov: inspected */ return error; /* purecov: inspected */
return sub_select(join,join_tab,end_of_records); return sub_select(join,join_tab,end_of_records);
} }
if (join->thd->killed) // If aborted by user
{
my_error(ER_SERVER_SHUTDOWN,MYF(0)); /* purecov: inspected */
return -2; /* purecov: inspected */
}
if (join_tab->use_quick != 2 || test_if_quick_select(join_tab) <= 0) if (join_tab->use_quick != 2 || test_if_quick_select(join_tab) <= 0)
{ {
if (join->thd->killed)
{
my_error(ER_SERVER_SHUTDOWN,MYF(0)); /* purecov: inspected */
return -2; // Aborted by user /* purecov: inspected */
}
if (!store_record_in_cache(&join_tab->cache)) if (!store_record_in_cache(&join_tab->cache))
return 0; // There is more room in cache return 0; // There is more room in cache
return flush_cached_records(join,join_tab,FALSE); return flush_cached_records(join,join_tab,FALSE);
......
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