diff options
author | unknown <monty@donna.mysql.com> | 2000-09-12 03:02:33 +0300 |
---|---|---|
committer | unknown <monty@donna.mysql.com> | 2000-09-12 03:02:33 +0300 |
commit | fe4cccd6a43496395ec52e9043cd4350e5eac69d (patch) | |
tree | 051686baf31e5363765879f2437ada3abea6b71b /sql/mysqld.cc | |
parent | 1dc6a46936306fbccaf19275e6f9dc4acc1e48a1 (diff) | |
download | mariadb-git-fe4cccd6a43496395ec52e9043cd4350e5eac69d.tar.gz |
Update to new root alloc, OPTIMIZE TABLE and some other changes
Docs/manual.texi:
Added chapter for binary log, updated the changelog, linux section, OPTIMIZE TABLE...
client/mysqladmin.c:
Fixed bug with pid-file handling.
client/mysqldump.c:
Version change
configure.in:
Version change
include/Makefile.am:
Fix for SCO to get sched.h removed.
include/global.h:
Increased MY_NFILE; Added thread_safe_increment
include/my_sys.h:
Better root_alloc
include/mysql.h:
Better root_alloc
include/mysys_err.h:
Fix for PREAD/PWRITE on windows
libmysql/libmysql.c:
Better root_alloc
myisam/mi_locking.c:
Fix for PREAD/PWRITE on windows
myisam/mi_static.c:
Fix for PREAD/PWRITE on windows
mysys/default.c:
Better root_alloc
mysys/errors.c:
Fix for PREAD/PWRITE on windows
mysys/my_alloc.c:
Better root_alloc
mysys/my_create.c:
Fix for PREAD/PWRITE on windows
mysys/my_fopen.c:
Fix for PREAD/PWRITE on windows
mysys/my_open.c:
Fix for PREAD/PWRITE on windows
mysys/my_pread.c:
Fix for PREAD/PWRITE on windows
mysys/tree.c:
Better root_alloc
readline/bind.c:
Removed compiler warning
readline/isearch.c:
Removed compiler warning
scripts/safe_mysqld.sh:
Allow use of MYSQL_UNIX_PORT and MYSQL_TCP_PORT
sql-bench/crash-me.sh:
Version change
sql-bench/limits/mysql-3.23.cfg:
Update to latest MySQL version
sql/filesort.cc:
Added more statistics
sql/ha_berkeley.h:
Fixed bug with ORDER BY
sql/ha_myisam.cc:
Added OPTIMIZE TABLE and cleaned up the repair code
sql/ha_myisam.h:
Added OPTIMIZE TABLE and cleaned up the repair code
sql/handler.cc:
Added OPTIMIZE TABLE and cleaned up the repair code
sql/handler.h:
Added OPTIMIZE TABLE and cleaned up the repair code
sql/item_func.cc:
Fixed comment
sql/item_timefunc.cc:
Fixed possible month bug
sql/mini_client.cc:
Use of new root_alloc
sql/mysql_priv.h:
Added OPTIMIZE TABLE and cleaned up the repair code
sql/mysqld.cc:
Added more statistics
sql/opt_range.cc:
Use of new root_alloc
sql/slave.cc:
Use of new root_alloc
sql/sql_acl.cc:
Use of new root_alloc
sql/sql_class.cc:
Use of new root_alloc
sql/sql_parse.cc:
Use of new root_alloc
sql/sql_select.cc:
Added more statistics
sql/sql_table.cc:
Added OPTIMIZE TABLE and cleaned up the repair code
sql/sql_udf.cc:
Use of new root_alloc
sql/sql_yacc.yy:
Fixed that OPTIMIZE TABLE can take many tables as arguments
sql/table.cc:
Use of new root_alloc
sql/thr_malloc.cc:
Use of new root_alloc
support-files/mysql.server.sh:
Removed usage of AWK
Diffstat (limited to 'sql/mysqld.cc')
-rw-r--r-- | sql/mysqld.cc | 37 |
1 files changed, 28 insertions, 9 deletions
diff --git a/sql/mysqld.cc b/sql/mysqld.cc index af8d66cc046..4d3dc8de519 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -145,7 +145,7 @@ static pthread_t select_thread; static pthread_t flush_thread; // Used when debugging static bool opt_log,opt_update_log,opt_bin_log,opt_slow_log,opt_noacl, opt_disable_networking=0, opt_bootstrap=0,opt_skip_show_db=0, - opt_ansi_mode; + opt_ansi_mode,opt_myisam_log=0; bool opt_sql_bin_update = 0, opt_log_slave_updates = 0; // if sql_bin_update is true, SQL_LOG_UPDATE and SQL_LOG_BIN are kept in sync, and are @@ -205,6 +205,9 @@ ulong query_id=1L,long_query_count,long_query_time,aborted_threads, aborted_connects,delayed_insert_timeout,delayed_insert_limit, delayed_queue_size,delayed_insert_threads,delayed_insert_writes, delayed_rows_in_use,delayed_insert_errors,flush_time; +ulong filesort_rows, filesort_range_count, filesort_scan_count; +ulong select_range_check_count, select_range_count, select_scan_count; +ulong select_full_range_join_count,select_full_join_count; 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, @@ -579,7 +582,7 @@ void clean_up(void) udf_free(); #endif end_key_cache(); /* This is usually freed automaticly */ - (void) ha_panic(HA_PANIC_CLOSE); /* close all tables */ + (void) ha_panic(HA_PANIC_CLOSE); /* close all tables and logs */ #ifdef USE_RAID end_raid(); #endif @@ -1481,6 +1484,8 @@ int main(int argc, char **argv) sql_print_error("Can't init databases"); exit(1); } + if (opt_myisam_log) + (void) mi_log( 1 ); ft_init_stopwords(ft_precompiled_stopwords); /* SerG */ #ifdef __WIN__ @@ -1509,7 +1514,9 @@ int main(int argc, char **argv) { select_thread_in_use=0; (void) pthread_kill(signal_thread,MYSQL_KILL_SIGNAL); +#ifndef __WIN__ (void) my_delete(pidfile_name,MYF(MY_WME)); // Not neaded anymore +#endif exit(1); } if (!opt_noacl) @@ -1643,7 +1650,9 @@ int main(int argc, char **argv) pthread_cond_wait(&COND_thread_count,&LOCK_thread_count); } (void) pthread_mutex_unlock(&LOCK_thread_count); +#ifndef __WIN__ (void) my_delete(pidfile_name,MYF(MY_WME)); // Not neaded anymore +#endif my_thread_end(); exit(0); return(0); /* purecov: deadcode */ @@ -2203,7 +2212,7 @@ static struct option long_options[] = { {"log", optional_argument, 0, 'l'}, {"language", required_argument, 0, 'L'}, {"log-bin", optional_argument, 0, (int) OPT_BIN_LOG}, - {"log-bin-index", optional_argument, 0, (int) OPT_BIN_LOG_INDEX}, + {"log-bin-index", required_argument, 0, (int) OPT_BIN_LOG_INDEX}, {"log-isam", optional_argument, 0, (int) OPT_ISAM_LOG}, {"log-update", optional_argument, 0, (int) OPT_UPDATE_LOG}, {"log-slow-queries", optional_argument, 0, (int) OPT_SLOW_QUERY_LOG}, @@ -2440,9 +2449,17 @@ struct show_var_st status_vars[]= { {"Open_streams", (char*) &my_stream_opened, SHOW_INT_CONST}, {"Opened_tables", (char*) &opened_tables, SHOW_LONG}, {"Questions", (char*) 0, SHOW_QUESTION}, + {"Select_full_join", (char*) &select_full_join_count, SHOW_LONG}, + {"Select_full_range_join", (char*) &select_full_range_join_count, SHOW_LONG}, + {"Select_range", (char*) &select_range_count, SHOW_LONG}, + {"Select_range_check", (char*) &select_range_check_count, SHOW_LONG}, + {"Select_scan", (char*) &select_scan_count, SHOW_LONG}, + {"Slave_running", (char*) &slave_running, SHOW_BOOL}, {"Slow_launch_threads", (char*) &slow_launch_threads, SHOW_LONG}, {"Slow_queries", (char*) &long_query_count, SHOW_LONG}, - {"Slave_running", (char*) &slave_running, SHOW_BOOL}, + {"Sort_range", (char*) &filesort_range_count, SHOW_LONG}, + {"Sort_rows", (char*) &filesort_rows, SHOW_LONG}, + {"Sort_scan", (char*) &filesort_scan_count, SHOW_LONG}, {"Threads_cached", (char*) &cached_thread_count, SHOW_LONG_CONST}, {"Threads_connected", (char*) &thread_count, SHOW_INT_CONST}, {"Threads_running", (char*) &thread_running, SHOW_INT_CONST}, @@ -2508,7 +2525,7 @@ static void usage(void) --log-bin-index=file File that holds the names for last binary log files\n\ --log-update[=file] Log updates to file.# where # is a unique number\n\ if not given.\n\ - --log-isam[=file] Log all isam changes to file\n\ + --log-isam[=file] Log all MyISAM changes to file\n\ --log-long-format Log some extra information to update log\n\ --low-priority-updates INSERT/DELETE/UPDATE has lower priority than selects\n\ --log-slow-queries=[file]\n\ @@ -2583,7 +2600,9 @@ The default values (after parsing the command line arguments) are:\n\n"); printf("datadir: %s\n",mysql_real_data_home); printf("tmpdir: %s\n",mysql_tmpdir); printf("language: %s\n",language); +#ifndef __WIN__ printf("pid file: %s\n",pidfile_name); +#endif if (opt_logname) printf("logfile: %s\n",opt_logname); if (opt_update_logname) @@ -2739,9 +2758,9 @@ static void get_options(int argc,char **argv) thd_startup_options|=OPTION_BIG_TABLES; break; case (int) OPT_ISAM_LOG: + opt_myisam_log=1; if (optarg) - nisam_log_filename=optarg; - (void) nisam_log(1); + myisam_log_filename=optarg; break; case (int) OPT_UPDATE_LOG: opt_update_log=1; @@ -3168,8 +3187,8 @@ static int get_service_parameters() else if ( lstrcmp(szKeyValueName, TEXT("ISAMLogFile")) == 0 ) { CHECK_KEY_TYPE( REG_SZ, szKeyValueName ); - COPY_KEY_VALUE( nisam_log_filename ); - (void) nisam_log( 1 ); + COPY_KEY_VALUE( myisam_log_filename ); + opt_myisam_log=1; } else if ( lstrcmp(szKeyValueName, TEXT("LongLogFormat")) == 0 ) { |