mariadb/client/mysqlcheck.c

629 lines
19 KiB
C
Raw Normal View History

Update copyright Fixed memory leak on shutdown (Affects the embedded version & MyODBC) client/client_priv.h: Update copyright client/completion_hash.cc: Update copyright client/completion_hash.h: Update copyright client/connect_test.c: Update copyright client/errmsg.c: Update copyright client/get_password.c: Update copyright client/insert_test.c: Update copyright client/list_test.c: Update copyright client/my_readline.h: Update copyright client/mysql.cc: Update copyright client/mysqladmin.c: Update copyright client/mysqlbinlog.cc: Update copyright client/mysqlcheck.c: Update copyright client/mysqldump.c: Update copyright client/mysqlimport.c: Update copyright client/mysqlmanager-pwgen.c: Update copyright client/mysqlmanagerc.c: Update copyright client/mysqlshow.c: Update copyright client/mysqltest.c: Update copyright client/password.c: Update copyright client/readline.cc: Update copyright client/select_test.c: Update copyright client/showdb_test.c: Update copyright client/sql_string.cc: Update copyright client/sql_string.h: Update copyright client/ssl_test.c: Update copyright client/thimble.cc: Update copyright client/thread_test.c: Update copyright div/deadlock_test.c: Update copyright extra/comp_err.c: Update copyright extra/my_print_defaults.c: Update copyright extra/perror.c: Update copyright extra/replace.c: Update copyright extra/resolve_stack_dump.c: Update copyright extra/resolveip.c: Update copyright fs/database.c: Update copyright fs/libmysqlfs.c: Update copyright fs/mysqlcorbafs.c: Update copyright fs/mysqlcorbafs.h: Update copyright fs/mysqlcorbafs_test.c: Update copyright heap/_check.c: Update copyright heap/_rectest.c: Update copyright heap/heapdef.h: Update copyright heap/hp_block.c: Update copyright heap/hp_clear.c: Update copyright heap/hp_close.c: Update copyright heap/hp_create.c: Update copyright heap/hp_delete.c: Update copyright heap/hp_extra.c: Update copyright heap/hp_hash.c: Update copyright heap/hp_info.c: Update copyright heap/hp_open.c: Update copyright heap/hp_panic.c: Update copyright heap/hp_rename.c: Update copyright heap/hp_rfirst.c: Update copyright heap/hp_rkey.c: Update copyright heap/hp_rlast.c: Update copyright heap/hp_rnext.c: Update copyright heap/hp_rprev.c: Update copyright heap/hp_rrnd.c: Update copyright heap/hp_rsame.c: Update copyright heap/hp_scan.c: Update copyright heap/hp_static.c: Update copyright heap/hp_test1.c: Update copyright heap/hp_test2.c: Update copyright heap/hp_update.c: Update copyright heap/hp_write.c: Update copyright include/config-win.h: Update copyright include/dbug.h: Update copyright include/errmsg.h: Update copyright include/ft_global.h: Update copyright include/getopt.h: Update copyright include/hash.h: Update copyright include/heap.h: Update copyright include/m_ctype.h: Update copyright include/m_string.h: Update copyright include/md5.h: Update copyright include/merge.h: Update copyright include/my_alarm.h: Update copyright include/my_base.h: Update copyright include/my_bitmap.h: Update copyright include/my_dir.h: Update copyright include/my_global.h: Update copyright include/my_list.h: Update copyright include/my_net.h: Update copyright include/my_no_pthread.h: Update copyright include/my_nosys.h: Update copyright include/my_pthread.h: Update copyright include/my_sys.h: Update copyright include/my_tree.h: Update copyright include/myisam.h: Update copyright include/myisammrg.h: Update copyright include/myisampack.h: Update copyright include/mysql.h: Update copyright include/mysql_com.h: Update copyright include/mysql_embed.h: Update copyright include/mysqld_error.h: Update copyright include/mysys_err.h: Update copyright include/nisam.h: Update copyright include/queues.h: Update copyright include/raid.h: Update copyright include/sslopt-case.h: Update copyright include/sslopt-longopts.h: Update copyright include/sslopt-usage.h: Update copyright include/sslopt-vars.h: Update copyright include/t_ctype.h: Update copyright include/thr_alarm.h: Update copyright include/thr_lock.h: Update copyright include/violite.h: Update copyright isam/_cache.c: Update copyright isam/_dbug.c: Update copyright isam/_key.c: Update copyright isam/_locking.c: Update copyright isam/_packrec.c: Update copyright isam/_page.c: Update copyright isam/_search.c: Update copyright isam/_statrec.c: Update copyright isam/changed.c: Update copyright isam/close.c: Update copyright isam/create.c: Update copyright isam/delete.c: Update copyright isam/extra.c: Update copyright isam/info.c: Update copyright isam/isamchk.c: Update copyright isam/isamdef.h: Update copyright isam/log.c: Update copyright isam/open.c: Update copyright isam/panic.c: Update copyright isam/range.c: Update copyright isam/rfirst.c: Update copyright isam/rkey.c: Update copyright isam/rlast.c: Update copyright isam/rnext.c: Update copyright isam/rprev.c: Update copyright isam/rrnd.c: Update copyright isam/rsame.c: Update copyright isam/rsamepos.c: Update copyright isam/sort.c: Update copyright isam/static.c: Update copyright isam/test1.c: Update copyright isam/test2.c: Update copyright isam/test3.c: Update copyright isam/update.c: Update copyright isam/write.c: Update copyright libmysql/conf_to_src.c: Update copyright libmysql/dll.c: Update copyright libmysql/errmsg.c: Update copyright libmysql/get_password.c: Update copyright libmysql/libmysql.c: Update copyright libmysql/manager.c: Update copyright libmysql/net.c: Update copyright libmysql/password.c: Update copyright libmysqld/lib_sql.cc: Update copyright libmysqld/lib_vio.c: Update copyright libmysqld/libmysqld.c: Update copyright merge/mrg_close.c: Update copyright merge/mrg_create.c: Update copyright merge/mrg_def.h: Update copyright merge/mrg_delete.c: Update copyright merge/mrg_extra.c: Update copyright merge/mrg_info.c: Update copyright merge/mrg_locking.c: Update copyright merge/mrg_open.c: Update copyright merge/mrg_panic.c: Update copyright merge/mrg_rrnd.c: Update copyright merge/mrg_rsame.c: Update copyright merge/mrg_static.c: Update copyright merge/mrg_update.c: Update copyright myisam/ft_boolean_search.c: Update copyright myisam/ft_dump.c: Update copyright myisam/ft_eval.h: Update copyright myisam/ft_static.c: Update copyright myisam/ft_stem.c: Update copyright myisam/ft_stopwords.c: Update copyright myisam/ft_test1.h: Update copyright myisam/mi_cache.c: Update copyright myisam/mi_changed.c: Update copyright myisam/mi_check.c: Update copyright myisam/mi_checksum.c: Update copyright myisam/mi_close.c: Update copyright myisam/mi_create.c: Update copyright myisam/mi_dbug.c: Update copyright myisam/mi_delete.c: Update copyright myisam/mi_delete_all.c: Update copyright myisam/mi_delete_table.c: Update copyright myisam/mi_dynrec.c: Update copyright myisam/mi_extra.c: Update copyright myisam/mi_info.c: Update copyright myisam/mi_key.c: Update copyright myisam/mi_locking.c: Update copyright myisam/mi_log.c: Update copyright myisam/mi_open.c: Update copyright myisam/mi_packrec.c: Update copyright myisam/mi_page.c: Update copyright myisam/mi_panic.c: Update copyright myisam/mi_range.c: Update copyright myisam/mi_rename.c: Update copyright myisam/mi_rfirst.c: Update copyright myisam/mi_rlast.c: Update copyright myisam/mi_rnext_same.c: Update copyright myisam/mi_rrnd.c: Update copyright myisam/mi_rsame.c: Update copyright myisam/mi_rsamepos.c: Update copyright myisam/mi_scan.c: Update copyright myisam/mi_search.c: Update copyright myisam/mi_static.c: Update copyright myisam/mi_statrec.c: Update copyright myisam/mi_test1.c: Update copyright myisam/mi_test2.c: Update copyright myisam/mi_test3.c: Update copyright myisam/mi_unique.c: Update copyright myisam/mi_update.c: Update copyright myisam/mi_write.c: Update copyright myisam/myisamchk.c: Update copyright myisam/myisampack.c: Update copyright myisammrg/myrg_close.c: Update copyright myisammrg/myrg_create.c: Update copyright myisammrg/myrg_def.h: Update copyright myisammrg/myrg_delete.c: Update copyright myisammrg/myrg_locking.c: Update copyright myisammrg/myrg_open.c: Update copyright myisammrg/myrg_panic.c: Update copyright myisammrg/myrg_rsame.c: Update copyright myisammrg/myrg_static.c: Update copyright myisammrg/myrg_update.c: Update copyright myisammrg/myrg_write.c: Update copyright mysql-test/r/gcc296.result: Update of benchmark results mysql-test/r/innodb.result: Update of benchmark results mysql-test/r/join_outer.result: Update of benchmark results mysql-test/r/myisam.result: Update of benchmark results mysys/array.c: Update copyright mysys/charset.c: Fix for restart of character sets mysys/checksum.c: Update copyright mysys/default.c: Update copyright mysys/errors.c: Update copyright mysys/getopt.c: Cleanup mysys/getvar.c: Update copyright mysys/hash.c: Update copyright mysys/list.c: Update copyright mysys/make-conf.c: Update copyright mysys/md5.c: Update copyright mysys/mf_brkhant.c: Update copyright mysys/mf_cache.c: Update copyright mysys/mf_casecnv.c: Update copyright mysys/mf_dirname.c: Update copyright mysys/mf_fn_ext.c: Update copyright mysys/mf_format.c: Update copyright mysys/mf_getdate.c: Update copyright mysys/mf_iocache.c: Update copyright mysys/mf_iocache2.c: Update copyright mysys/mf_keycache.c: Update copyright mysys/mf_loadpath.c: Update copyright mysys/mf_pack.c: Update copyright mysys/mf_path.c: Update copyright mysys/mf_qsort.c: Update copyright mysys/mf_qsort2.c: Update copyright mysys/mf_radix.c: Update copyright mysys/mf_same.c: Update copyright mysys/mf_sleep.c: Update copyright mysys/mf_sort.c: Update copyright mysys/mf_soundex.c: Update copyright mysys/mf_stripp.c: Update copyright mysys/mf_tempfile.c: Update copyright mysys/mf_unixpath.c: Update copyright mysys/mf_util.c: Update copyright mysys/mf_wcomp.c: Update copyright mysys/mf_wfile.c: Update copyright mysys/mulalloc.c: Update copyright mysys/my_alarm.c: Update copyright mysys/my_alloc.c: Update copyright mysys/my_append.c: Update copyright mysys/my_bit.c: Update copyright mysys/my_bitmap.c: Update copyright mysys/my_chsize.c: Update copyright mysys/my_clock.c: Update copyright mysys/my_compress.c: Update copyright mysys/my_copy.c: Update copyright mysys/my_create.c: Update copyright mysys/my_delete.c: Update copyright mysys/my_div.c: Update copyright mysys/my_dup.c: Update copyright mysys/my_error.c: Update copyright mysys/my_fopen.c: Update copyright mysys/my_fstream.c: Update copyright mysys/my_getwd.c: Update copyright mysys/my_init.c: Free 'once_alloc' memory at shutdown. mysys/my_lib.c: Update copyright mysys/my_lock.c: Update copyright mysys/my_lockmem.c: Update copyright mysys/my_lread.c: Update copyright mysys/my_lwrite.c: Update copyright mysys/my_malloc.c: Update copyright mysys/my_messnc.c: Update copyright mysys/my_mkdir.c: Update copyright mysys/my_net.c: Update copyright mysys/my_once.c: Update copyright mysys/my_open.c: Update copyright mysys/my_pread.c: Update copyright mysys/my_pthread.c: Update copyright mysys/my_quick.c: Update copyright mysys/my_read.c: Update copyright mysys/my_realloc.c: Update copyright mysys/my_redel.c: Update copyright mysys/my_rename.c: Update copyright mysys/my_seek.c: Update copyright mysys/my_static.c: Update copyright mysys/my_static.h: Update copyright mysys/my_symlink.c: Update copyright mysys/my_symlink2.c: Update copyright mysys/my_tempnam.c: Update copyright mysys/my_thr_init.c: Update copyright mysys/my_vsnprintf.c: Update copyright mysys/my_wincond.c: Update copyright mysys/my_winthread.c: Update copyright mysys/my_write.c: Update copyright mysys/mysys_priv.h: Update copyright mysys/ptr_cmp.c: Update copyright mysys/queues.c: Update copyright mysys/raid.cc: Update copyright mysys/safemalloc.c: Update copyright mysys/string.c: Update copyright mysys/test_charset.c: Update copyright mysys/test_dir.c: Update copyright mysys/test_fn.c: Update copyright mysys/testhash.c: Update copyright mysys/thr_alarm.c: Update copyright mysys/thr_lock.c: Update copyright mysys/thr_mutex.c: Update copyright mysys/thr_rwlock.c: Update copyright mysys/tree.c: Update copyright mysys/typelib.c: Update copyright pstack/debug.c: Update copyright pstack/debug.h: Update copyright pstack/demangle.h: Update copyright pstack/ieee.c: Update copyright pstack/ieee.h: Update copyright pstack/pstack.c: Update copyright readline/bind.c: Cleanup empty lines readline/complete.c: Cleanup empty lines readline/display.c: Cleanup empty lines readline/funmap.c: Cleanup empty lines readline/histexpand.c: Cleanup empty lines readline/histfile.c: Cleanup empty lines readline/history.c: Cleanup empty lines readline/history.h: Cleanup empty lines readline/input.c: Cleanup empty lines readline/kill.c: Cleanup empty lines readline/readline.c: Cleanup empty lines readline/readline.h: Cleanup empty lines readline/vi_mode.c: Cleanup empty lines sql/cache_manager.cc: Update copyright sql/cache_manager.h: Update copyright sql/convert.cc: Update copyright sql/custom_conf.h: Update copyright sql/derror.cc: Update copyright sql/field.cc: Update copyright sql/field.h: Update copyright sql/field_conv.cc: Update copyright sql/filesort.cc: Update copyright sql/frm_crypt.cc: Update copyright sql/ha_berkeley.cc: Update copyright sql/ha_heap.cc: Update copyright sql/ha_heap.h: Update copyright sql/ha_innobase.cc: Update copyright sql/ha_isam.cc: Update copyright sql/ha_isam.h: Update copyright sql/ha_isammrg.cc: Update copyright sql/ha_isammrg.h: Update copyright sql/ha_myisam.cc: Update copyright sql/handler.cc: Update copyright sql/hash_filo.cc: Update copyright sql/hash_filo.h: Update copyright sql/hostname.cc: Update copyright sql/init.cc: Update copyright sql/item.cc: Update copyright sql/item.h: Update copyright sql/item_buff.cc: Update copyright sql/item_cmpfunc.cc: Update copyright sql/item_cmpfunc.h: Update copyright sql/item_create.cc: Update copyright sql/item_create.h: Update copyright sql/item_func.cc: Update copyright sql/item_strfunc.cc: Update copyright sql/item_sum.cc: Update copyright sql/item_sum.h: Update copyright sql/item_timefunc.cc: Update copyright sql/item_timefunc.h: Update copyright sql/item_uniq.cc: Update copyright sql/item_uniq.h: Update copyright sql/key.cc: Update copyright sql/lex_symbol.h: Update copyright sql/lock.cc: Update copyright sql/log.cc: Update copyright sql/log_event.cc: Update copyright sql/log_event.h: Update copyright sql/matherr.c: Update copyright sql/mf_iocache.cc: Update copyright sql/mini_client.cc: Update copyright sql/mini_client.h: Update copyright sql/my_lock.c: Update copyright sql/mysqld.cc: Update copyright sql/net_pkg.cc: Update copyright sql/net_serv.cc: Update copyright sql/opt_sum.cc: Update copyright sql/password.c: Update copyright sql/procedure.cc: Update copyright sql/procedure.h: Update copyright sql/records.cc: Update copyright sql/repl_failsafe.cc: Update copyright sql/slave.cc: Update copyright sql/slave.h: Update copyright sql/sql_acl.cc: Update copyright sql/sql_acl.h: Update copyright sql/sql_analyse.cc: Update copyright sql/sql_analyse.h: Update copyright sql/sql_base.cc: Update copyright sql/sql_cache.cc: Update copyright sql/sql_class.cc: Update copyright sql/sql_class.h: Update copyright sql/sql_crypt.cc: Update copyright sql/sql_crypt.h: Update copyright sql/sql_db.cc: Update copyright sql/sql_delete.cc: Update copyright sql/sql_handler.cc: Update copyright sql/sql_insert.cc: Update copyright sql/sql_lex.cc: Update copyright sql/sql_lex.h: Update copyright sql/sql_list.cc: Update copyright sql/sql_list.h: Update copyright sql/sql_load.cc: Update copyright sql/sql_map.cc: Update copyright sql/sql_map.h: Update copyright sql/sql_parse.cc: Update copyright sql/sql_rename.cc: Update copyright sql/sql_repl.cc: Update copyright sql/sql_select.h: Update copyright sql/sql_string.cc: Update copyright sql/sql_string.h: Update copyright sql/sql_table.cc: Update copyright sql/sql_test.cc: Update copyright sql/sql_udf.cc: Update copyright sql/sql_udf.h: Update copyright sql/stacktrace.c: Update copyright sql/structs.h: Update copyright sql/table.cc: Update copyright sql/table.h: Update copyright sql/thr_malloc.cc: Update copyright sql/time.cc: Update copyright sql/udf_example.cc: Update copyright sql/uniques.cc: Update copyright sql/unireg.cc: Update copyright sql/unireg.h: Update copyright strings/atof.c: Update copyright strings/bchange.c: Update copyright strings/bcmp.c: Update copyright strings/bcopy-duff.c: Update copyright strings/bfill.c: Update copyright strings/bmove.c: Update copyright strings/bmove512.c: Update copyright strings/bmove_upp.c: Update copyright strings/bzero.c: Update copyright strings/conf_to_src.c: Update copyright strings/ctype-big5.c: Update copyright strings/ctype-czech.c: Update copyright strings/ctype-euc_kr.c: Update copyright strings/ctype-gb2312.c: Update copyright strings/ctype-gbk.c: Update copyright strings/ctype-latin1_de.c: Update copyright strings/ctype-sjis.c: Update copyright strings/ctype-tis620.c: Update copyright strings/ctype-ujis.c: Update copyright strings/ctype.c: Update copyright strings/do_ctype.c: Update copyright strings/int2str.c: Update copyright strings/is_prefix.c: Update copyright strings/llstr.c: Update copyright strings/longlong2str.c: Update copyright strings/memcmp.c: Update copyright strings/memcpy.c: Update copyright strings/memset.c: Update copyright strings/r_strinstr.c: Update copyright strings/str2int.c: Update copyright strings/str_test.c: Update copyright strings/strappend.c: Update copyright strings/strcat.c: Update copyright strings/strcend.c: Update copyright strings/strchr.c: Update copyright strings/strcmp.c: Update copyright strings/strcont.c: Update copyright strings/strend.c: Update copyright strings/strfill.c: Update copyright strings/strings-not-used.h: Update copyright strings/strinstr.c: Update copyright strings/strlen.c: Update copyright strings/strmake.c: Update copyright strings/strmov.c: Update copyright strings/strnlen.c: Update copyright strings/strnmov.c: Update copyright strings/strrchr.c: Update copyright strings/strstr.c: Update copyright strings/strto.c: Update copyright strings/strtol.c: Update copyright strings/strtoll.c: Update copyright strings/strtoul.c: Update copyright strings/strtoull.c: Update copyright strings/strxmov.c: Update copyright strings/strxnmov.c: Update copyright strings/t_ctype.h: Update copyright strings/udiv.c: Update copyright tools/mysqlmanager.c: Update copyright vio/test-ssl.c: Update copyright vio/test-sslclient.c: Update copyright vio/test-sslserver.c: Update copyright vio/vio.c: Update copyright vio/viosocket.c: Update copyright vio/viossl.c: Update copyright vio/viosslfactories.c: Update copyright vio/viotest-ssl.c: Update copyright
2001-12-06 13:10:51 +01:00
/* Copyright (C) 2000 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
/* By Jani Tolonen, 2001-04-20, MySQL Development Team */
Added useful exit error code for programs using my_getopt in case of an error in option handling. This can sometimes be useful in scripts. Changed some exit code names and corresponding numbers. Fixed a bug in mysqld.cc, in replication related options. Added a global flag in my_getopt, which can be set by any program that is using my_getopt, which tells whether the client should print the error message itself, or whether my_getopt should do it. The default is that my_getopt will print the error messages. client/mysql.cc: Added useful exit error code for programs using my_getopt in case of an error in option handling. This can sometimes be useful in scripts. client/mysqladmin.c: Added useful exit error code for programs using my_getopt in case of an error in option handling. This can sometimes be useful in scripts. client/mysqlbinlog.cc: Added useful exit error code for programs using my_getopt in case of an error in option handling. This can sometimes be useful in scripts. client/mysqlcheck.c: Added useful exit error code for programs using my_getopt in case of an error in option handling. This can sometimes be useful in scripts. client/mysqldump.c: Added useful exit error code for programs using my_getopt in case of an error in option handling. This can sometimes be useful in scripts. client/mysqlimport.c: Added useful exit error code for programs using my_getopt in case of an error in option handling. This can sometimes be useful in scripts. client/mysqlmanager-pwgen.c: Added useful exit error code for programs using my_getopt in case of an error in option handling. This can sometimes be useful in scripts. client/mysqlmanagerc.c: Added useful exit error code for programs using my_getopt in case of an error in option handling. This can sometimes be useful in scripts. client/mysqlshow.c: Added useful exit error code for programs using my_getopt in case of an error in option handling. This can sometimes be useful in scripts. client/mysqltest.c: Added useful exit error code for programs using my_getopt in case of an error in option handling. This can sometimes be useful in scripts. client/thread_test.c: Added useful exit error code for programs using my_getopt in case of an error in option handling. This can sometimes be useful in scripts. extra/my_print_defaults.c: Added useful exit error code for programs using my_getopt in case of an error in option handling. This can sometimes be useful in scripts. extra/mysql_install.c: Added useful exit error code for programs using my_getopt in case of an error in option handling. This can sometimes be useful in scripts. extra/perror.c: Added useful exit error code for programs using my_getopt in case of an error in option handling. This can sometimes be useful in scripts. extra/resolve_stack_dump.c: Added useful exit error code for programs using my_getopt in case of an error in option handling. This can sometimes be useful in scripts. extra/resolveip.c: Added useful exit error code for programs using my_getopt in case of an error in option handling. This can sometimes be useful in scripts. include/my_getopt.h: Added global (flag) variable which tells my_getopt whether to print errors or just silently exit with proper error code. include/mysys_err.h: Changed exit code names and corresponding numbers. isam/isamchk.c: Added useful exit error code for programs using my_getopt in case of an error in option handling. This can sometimes be useful in scripts. isam/pack_isam.c: Added useful exit error code for programs using my_getopt in case of an error in option handling. This can sometimes be useful in scripts. myisam/ft_dump.c: Added useful exit error code for programs using my_getopt in case of an error in option handling. This can sometimes be useful in scripts. myisam/ft_eval.c: Added useful exit error code for programs using my_getopt in case of an error in option handling. This can sometimes be useful in scripts. myisam/ft_test1.c: Added useful exit error code for programs using my_getopt in case of an error in option handling. This can sometimes be useful in scripts. myisam/mi_test1.c: Added useful exit error code for programs using my_getopt in case of an error in option handling. This can sometimes be useful in scripts. myisam/myisamchk.c: Added useful exit error code for programs using my_getopt in case of an error in option handling. This can sometimes be useful in scripts. myisam/myisampack.c: Added useful exit error code for programs using my_getopt in case of an error in option handling. This can sometimes be useful in scripts. mysys/my_getopt.c: Changed exit code names and corresponding numbers. Added a flag for checking whether my_getopt should print the error message, or whether it should be printed by the client itself. sql/gen_lex_hash.cc: Added useful exit error code for programs using my_getopt in case of an error in option handling. This can sometimes be useful in scripts. sql/mysqld.cc: Added useful exit error code for programs using my_getopt in case of an error in option handling. This can sometimes be useful in scripts. Fixed a bug when compiling in non-debug mode, some replication related options were not enabled while they should be. This made 'make test' to fail in rpl000010 when --with-debug was not used. tools/mysqlmanager.c: Added useful exit error code for programs using my_getopt in case of an error in option handling. This can sometimes be useful in scripts.
2002-05-29 14:07:30 +02:00
#define CHECK_VERSION "2.4"
#include "client_priv.h"
#include <m_ctype.h>
#include "mysql_version.h"
#include "mysqld_error.h"
#include "sslopt-vars.h"
/* Exit codes */
#define EX_USAGE 1
#define EX_MYSQLERR 2
static MYSQL mysql_connection, *sock = 0;
static my_bool opt_alldbs = 0, opt_check_only_changed = 0, opt_extended = 0,
opt_compress = 0, opt_databases = 0, opt_fast = 0,
opt_medium_check = 0, opt_quick = 0, opt_all_in_1 = 0,
opt_silent = 0, opt_auto_repair = 0, ignore_errors = 0,
tty_password = 0;
static uint verbose = 0, opt_mysql_port=0;
static my_string opt_mysql_unix_port = 0;
static char *opt_password = 0, *current_user = 0, *default_charset = 0,
*current_host = 0;
static int first_error = 0;
DYNAMIC_ARRAY tables4repair;
enum operations {DO_CHECK, DO_REPAIR, DO_ANALYZE, DO_OPTIMIZE};
static struct my_option my_long_options[] =
{
{"all-databases", 'A',
"Check 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,
0, 0},
{"analyze", 'a', "Analyze given tables.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0,
0, 0, 0, 0},
{"all-in-1", '1',
"Instead of making one query for each table, execute all queries in 1 query separately for each database. Table names will be in a comma separeted list.",
(gptr*) &opt_all_in_1, (gptr*) &opt_all_in_1, 0, GET_BOOL, NO_ARG, 0, 0, 0,
0, 0, 0},
{"auto-repair", OPT_AUTO_REPAIR,
"If a checked table is corrupted, automatically fix it. Repairing will be done after all tables have been checked, if corrupted ones were found.",
(gptr*) &opt_auto_repair, (gptr*) &opt_auto_repair, 0, GET_BOOL, NO_ARG, 0,
0, 0, 0, 0, 0},
{"character-sets-dir", OPT_CHARSETS_DIR,
"Directory where character sets are", (gptr*) &charsets_dir,
(gptr*) &charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"check", 'c', "Check table for errors", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0,
0, 0, 0, 0},
{"check-only-changed", 'C',
"Check only tables that have changed since last check or haven't been closed properly.",
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
{"compress", OPT_COMPRESS, "Use compression in server/client protocol.",
(gptr*) &opt_compress, (gptr*) &opt_compress, 0, GET_BOOL, NO_ARG, 0, 0, 0,
0, 0, 0},
{"databases", 'B',
"To check several databases. Note the difference in usage; In this case no tables are given. All name arguments are regarded as databasenames.",
(gptr*) &opt_databases, (gptr*) &opt_databases, 0, GET_BOOL, NO_ARG,
0, 0, 0, 0, 0, 0},
{"debug", '#', "Output debug log. Often this is 'd:t:o,filename'",
0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
{"default-character-set", OPT_DEFAULT_CHARSET,
"Set the default character set", (gptr*) &default_charset,
(gptr*) &default_charset, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"fast",'F', "Check only tables that hasn't been closed properly",
(gptr*) &opt_fast, (gptr*) &opt_fast, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0,
0},
{"force", 'f', "Continue even if we get an sql-error.",
(gptr*) &ignore_errors, (gptr*) &ignore_errors, 0, GET_BOOL, NO_ARG, 0, 0,
0, 0, 0, 0},
{"extended", 'e',
"If you are using this option with CHECK TABLE, it will ensure that the table is 100 percent consistent, but will take a long time. If you are using this option with REPAIR TABLE, it will run an extended repair on the table, which may not only take a long time to execute, but may produce a lot of garbage rows also!",
(gptr*) &opt_extended, (gptr*) &opt_extended, 0, GET_BOOL, NO_ARG, 0, 0, 0,
0, 0, 0},
{"help", '?', "Display this help message and exit.", 0, 0, 0, GET_NO_ARG,
NO_ARG, 0, 0, 0, 0, 0, 0},
{"host",'h', "Connect to host.", (gptr*) &current_host,
(gptr*) &current_host, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"medium-check", 'm',
"Faster than extended-check, but only finds 99.99 percent of all errors. Should be good enough for most cases.",
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
{"optimize", 'o', "Optimize table.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0,
0, 0},
{"password", 'p',
"Password to use when connecting to server. If password is not given it's solicited on the tty.",
0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
#ifdef __WIN__
{"pipe", 'W', "Use named pipes to connect to server.", 0, 0, 0, GET_NO_ARG,
NO_ARG, 0, 0, 0, 0, 0, 0},
#endif
{"port", 'P', "Port number to use for connection.", (gptr*) &opt_mysql_port,
(gptr*) &opt_mysql_port, 0, GET_UINT, REQUIRED_ARG, MYSQL_PORT, 0, 0, 0, 0,
0},
{"quick", 'q',
"If you are using this option with CHECK TABLE, it prevents the check from scanning the rows to check for wrong links. This is the fastest check. If you are using this option with REPAIR TABLE, it will try to repair only the index tree. This is the fastest repair method for a table.",
(gptr*) &opt_quick, (gptr*) &opt_quick, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0,
0},
{"repair", 'r',
"Can fix almost anything except unique keys that aren't unique.",
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
{"silent", 's', "Print only error messages.", (gptr*) &opt_silent,
(gptr*) &opt_silent, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"socket", 'S', "Socket file to use for connection.",
(gptr*) &opt_mysql_unix_port, (gptr*) &opt_mysql_unix_port, 0, GET_STR,
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
#include "sslopt-longopts.h"
{"tables", OPT_TABLES, "Overrides option --databases (-B).", 0, 0, 0,
GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
#ifndef DONT_ALLOW_USER_CHANGE
{"user", 'u', "User for login if not current user.", (gptr*) &current_user,
(gptr*) &current_user, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
#endif
{"verbose", 'v', "Print info about the various stages.", 0, 0, 0, GET_NO_ARG,
NO_ARG, 0, 0, 0, 0, 0, 0},
{"version", 'V', "Output version information and exit.", 0, 0, 0, GET_NO_ARG,
NO_ARG, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
};
static const char *load_default_groups[] = { "mysqlcheck", "client", 0 };
static void print_version(void);
static void usage(void);
static int get_options(int *argc, char ***argv);
static int process_all_databases();
static int process_databases(char **db_names);
static int process_selected_tables(char *db, char **table_names, int tables);
static int process_all_tables_in_db(char *database);
static int use_db(char *database);
static int handle_request_for_tables(char *tables, uint length);
static int dbConnect(char *host, char *user,char *passwd);
static void dbDisconnect(char *host);
static void DBerror(MYSQL *mysql, const char *when);
static void safe_exit(int error);
static void print_result();
int what_to_do = 0;
static void print_version(void)
{
printf("%s Ver %s Distrib %s, for %s (%s)\n", my_progname, CHECK_VERSION,
MYSQL_SERVER_VERSION, SYSTEM_TYPE, MACHINE_TYPE);
} /* print_version */
static void usage(void)
{
print_version();
puts("By Jani Tolonen, 2001-04-20, MySQL Development Team\n");
puts("This software comes with ABSOLUTELY NO WARRANTY. This is free software,\n");
puts("and you are welcome to modify and redistribute it under the GPL license.\n");
puts("This program can be used to CHECK (-c,-m,-C), REPAIR (-r), ANALYZE (-a)");
puts("or OPTIMIZE (-o) tables. Some of the options (like -e or -q) can be");
puts("used same time. It works on MyISAM and in some cases on BDB tables.");
puts("Please consult the MySQL manual for latest information about the");
puts("above. The options -c,-r,-a and -o are exclusive to each other, which");
puts("means that the last option will be used, if several was specified.\n");
puts("The option -c will be used by default, if none was specified. You");
puts("can change the default behavior by making a symbolic link, or");
puts("copying this file somewhere with another name, the alternatives are:");
puts("mysqlrepair: The default option will be -r");
puts("mysqlanalyze: The default option will be -a");
puts("mysqloptimize: The default option will be -o\n");
printf("Usage: %s [OPTIONS] database [tables]\n", my_progname);
printf("OR %s [OPTIONS] --databases DB1 [DB2 DB3...]\n",
my_progname);
printf("OR %s [OPTIONS] --all-databases\n", my_progname);
print_defaults("my", load_default_groups);
my_print_help(my_long_options);
my_print_variables(my_long_options);
} /* usage */
Update copyright Fixed memory leak on shutdown (Affects the embedded version & MyODBC) client/client_priv.h: Update copyright client/completion_hash.cc: Update copyright client/completion_hash.h: Update copyright client/connect_test.c: Update copyright client/errmsg.c: Update copyright client/get_password.c: Update copyright client/insert_test.c: Update copyright client/list_test.c: Update copyright client/my_readline.h: Update copyright client/mysql.cc: Update copyright client/mysqladmin.c: Update copyright client/mysqlbinlog.cc: Update copyright client/mysqlcheck.c: Update copyright client/mysqldump.c: Update copyright client/mysqlimport.c: Update copyright client/mysqlmanager-pwgen.c: Update copyright client/mysqlmanagerc.c: Update copyright client/mysqlshow.c: Update copyright client/mysqltest.c: Update copyright client/password.c: Update copyright client/readline.cc: Update copyright client/select_test.c: Update copyright client/showdb_test.c: Update copyright client/sql_string.cc: Update copyright client/sql_string.h: Update copyright client/ssl_test.c: Update copyright client/thimble.cc: Update copyright client/thread_test.c: Update copyright div/deadlock_test.c: Update copyright extra/comp_err.c: Update copyright extra/my_print_defaults.c: Update copyright extra/perror.c: Update copyright extra/replace.c: Update copyright extra/resolve_stack_dump.c: Update copyright extra/resolveip.c: Update copyright fs/database.c: Update copyright fs/libmysqlfs.c: Update copyright fs/mysqlcorbafs.c: Update copyright fs/mysqlcorbafs.h: Update copyright fs/mysqlcorbafs_test.c: Update copyright heap/_check.c: Update copyright heap/_rectest.c: Update copyright heap/heapdef.h: Update copyright heap/hp_block.c: Update copyright heap/hp_clear.c: Update copyright heap/hp_close.c: Update copyright heap/hp_create.c: Update copyright heap/hp_delete.c: Update copyright heap/hp_extra.c: Update copyright heap/hp_hash.c: Update copyright heap/hp_info.c: Update copyright heap/hp_open.c: Update copyright heap/hp_panic.c: Update copyright heap/hp_rename.c: Update copyright heap/hp_rfirst.c: Update copyright heap/hp_rkey.c: Update copyright heap/hp_rlast.c: Update copyright heap/hp_rnext.c: Update copyright heap/hp_rprev.c: Update copyright heap/hp_rrnd.c: Update copyright heap/hp_rsame.c: Update copyright heap/hp_scan.c: Update copyright heap/hp_static.c: Update copyright heap/hp_test1.c: Update copyright heap/hp_test2.c: Update copyright heap/hp_update.c: Update copyright heap/hp_write.c: Update copyright include/config-win.h: Update copyright include/dbug.h: Update copyright include/errmsg.h: Update copyright include/ft_global.h: Update copyright include/getopt.h: Update copyright include/hash.h: Update copyright include/heap.h: Update copyright include/m_ctype.h: Update copyright include/m_string.h: Update copyright include/md5.h: Update copyright include/merge.h: Update copyright include/my_alarm.h: Update copyright include/my_base.h: Update copyright include/my_bitmap.h: Update copyright include/my_dir.h: Update copyright include/my_global.h: Update copyright include/my_list.h: Update copyright include/my_net.h: Update copyright include/my_no_pthread.h: Update copyright include/my_nosys.h: Update copyright include/my_pthread.h: Update copyright include/my_sys.h: Update copyright include/my_tree.h: Update copyright include/myisam.h: Update copyright include/myisammrg.h: Update copyright include/myisampack.h: Update copyright include/mysql.h: Update copyright include/mysql_com.h: Update copyright include/mysql_embed.h: Update copyright include/mysqld_error.h: Update copyright include/mysys_err.h: Update copyright include/nisam.h: Update copyright include/queues.h: Update copyright include/raid.h: Update copyright include/sslopt-case.h: Update copyright include/sslopt-longopts.h: Update copyright include/sslopt-usage.h: Update copyright include/sslopt-vars.h: Update copyright include/t_ctype.h: Update copyright include/thr_alarm.h: Update copyright include/thr_lock.h: Update copyright include/violite.h: Update copyright isam/_cache.c: Update copyright isam/_dbug.c: Update copyright isam/_key.c: Update copyright isam/_locking.c: Update copyright isam/_packrec.c: Update copyright isam/_page.c: Update copyright isam/_search.c: Update copyright isam/_statrec.c: Update copyright isam/changed.c: Update copyright isam/close.c: Update copyright isam/create.c: Update copyright isam/delete.c: Update copyright isam/extra.c: Update copyright isam/info.c: Update copyright isam/isamchk.c: Update copyright isam/isamdef.h: Update copyright isam/log.c: Update copyright isam/open.c: Update copyright isam/panic.c: Update copyright isam/range.c: Update copyright isam/rfirst.c: Update copyright isam/rkey.c: Update copyright isam/rlast.c: Update copyright isam/rnext.c: Update copyright isam/rprev.c: Update copyright isam/rrnd.c: Update copyright isam/rsame.c: Update copyright isam/rsamepos.c: Update copyright isam/sort.c: Update copyright isam/static.c: Update copyright isam/test1.c: Update copyright isam/test2.c: Update copyright isam/test3.c: Update copyright isam/update.c: Update copyright isam/write.c: Update copyright libmysql/conf_to_src.c: Update copyright libmysql/dll.c: Update copyright libmysql/errmsg.c: Update copyright libmysql/get_password.c: Update copyright libmysql/libmysql.c: Update copyright libmysql/manager.c: Update copyright libmysql/net.c: Update copyright libmysql/password.c: Update copyright libmysqld/lib_sql.cc: Update copyright libmysqld/lib_vio.c: Update copyright libmysqld/libmysqld.c: Update copyright merge/mrg_close.c: Update copyright merge/mrg_create.c: Update copyright merge/mrg_def.h: Update copyright merge/mrg_delete.c: Update copyright merge/mrg_extra.c: Update copyright merge/mrg_info.c: Update copyright merge/mrg_locking.c: Update copyright merge/mrg_open.c: Update copyright merge/mrg_panic.c: Update copyright merge/mrg_rrnd.c: Update copyright merge/mrg_rsame.c: Update copyright merge/mrg_static.c: Update copyright merge/mrg_update.c: Update copyright myisam/ft_boolean_search.c: Update copyright myisam/ft_dump.c: Update copyright myisam/ft_eval.h: Update copyright myisam/ft_static.c: Update copyright myisam/ft_stem.c: Update copyright myisam/ft_stopwords.c: Update copyright myisam/ft_test1.h: Update copyright myisam/mi_cache.c: Update copyright myisam/mi_changed.c: Update copyright myisam/mi_check.c: Update copyright myisam/mi_checksum.c: Update copyright myisam/mi_close.c: Update copyright myisam/mi_create.c: Update copyright myisam/mi_dbug.c: Update copyright myisam/mi_delete.c: Update copyright myisam/mi_delete_all.c: Update copyright myisam/mi_delete_table.c: Update copyright myisam/mi_dynrec.c: Update copyright myisam/mi_extra.c: Update copyright myisam/mi_info.c: Update copyright myisam/mi_key.c: Update copyright myisam/mi_locking.c: Update copyright myisam/mi_log.c: Update copyright myisam/mi_open.c: Update copyright myisam/mi_packrec.c: Update copyright myisam/mi_page.c: Update copyright myisam/mi_panic.c: Update copyright myisam/mi_range.c: Update copyright myisam/mi_rename.c: Update copyright myisam/mi_rfirst.c: Update copyright myisam/mi_rlast.c: Update copyright myisam/mi_rnext_same.c: Update copyright myisam/mi_rrnd.c: Update copyright myisam/mi_rsame.c: Update copyright myisam/mi_rsamepos.c: Update copyright myisam/mi_scan.c: Update copyright myisam/mi_search.c: Update copyright myisam/mi_static.c: Update copyright myisam/mi_statrec.c: Update copyright myisam/mi_test1.c: Update copyright myisam/mi_test2.c: Update copyright myisam/mi_test3.c: Update copyright myisam/mi_unique.c: Update copyright myisam/mi_update.c: Update copyright myisam/mi_write.c: Update copyright myisam/myisamchk.c: Update copyright myisam/myisampack.c: Update copyright myisammrg/myrg_close.c: Update copyright myisammrg/myrg_create.c: Update copyright myisammrg/myrg_def.h: Update copyright myisammrg/myrg_delete.c: Update copyright myisammrg/myrg_locking.c: Update copyright myisammrg/myrg_open.c: Update copyright myisammrg/myrg_panic.c: Update copyright myisammrg/myrg_rsame.c: Update copyright myisammrg/myrg_static.c: Update copyright myisammrg/myrg_update.c: Update copyright myisammrg/myrg_write.c: Update copyright mysql-test/r/gcc296.result: Update of benchmark results mysql-test/r/innodb.result: Update of benchmark results mysql-test/r/join_outer.result: Update of benchmark results mysql-test/r/myisam.result: Update of benchmark results mysys/array.c: Update copyright mysys/charset.c: Fix for restart of character sets mysys/checksum.c: Update copyright mysys/default.c: Update copyright mysys/errors.c: Update copyright mysys/getopt.c: Cleanup mysys/getvar.c: Update copyright mysys/hash.c: Update copyright mysys/list.c: Update copyright mysys/make-conf.c: Update copyright mysys/md5.c: Update copyright mysys/mf_brkhant.c: Update copyright mysys/mf_cache.c: Update copyright mysys/mf_casecnv.c: Update copyright mysys/mf_dirname.c: Update copyright mysys/mf_fn_ext.c: Update copyright mysys/mf_format.c: Update copyright mysys/mf_getdate.c: Update copyright mysys/mf_iocache.c: Update copyright mysys/mf_iocache2.c: Update copyright mysys/mf_keycache.c: Update copyright mysys/mf_loadpath.c: Update copyright mysys/mf_pack.c: Update copyright mysys/mf_path.c: Update copyright mysys/mf_qsort.c: Update copyright mysys/mf_qsort2.c: Update copyright mysys/mf_radix.c: Update copyright mysys/mf_same.c: Update copyright mysys/mf_sleep.c: Update copyright mysys/mf_sort.c: Update copyright mysys/mf_soundex.c: Update copyright mysys/mf_stripp.c: Update copyright mysys/mf_tempfile.c: Update copyright mysys/mf_unixpath.c: Update copyright mysys/mf_util.c: Update copyright mysys/mf_wcomp.c: Update copyright mysys/mf_wfile.c: Update copyright mysys/mulalloc.c: Update copyright mysys/my_alarm.c: Update copyright mysys/my_alloc.c: Update copyright mysys/my_append.c: Update copyright mysys/my_bit.c: Update copyright mysys/my_bitmap.c: Update copyright mysys/my_chsize.c: Update copyright mysys/my_clock.c: Update copyright mysys/my_compress.c: Update copyright mysys/my_copy.c: Update copyright mysys/my_create.c: Update copyright mysys/my_delete.c: Update copyright mysys/my_div.c: Update copyright mysys/my_dup.c: Update copyright mysys/my_error.c: Update copyright mysys/my_fopen.c: Update copyright mysys/my_fstream.c: Update copyright mysys/my_getwd.c: Update copyright mysys/my_init.c: Free 'once_alloc' memory at shutdown. mysys/my_lib.c: Update copyright mysys/my_lock.c: Update copyright mysys/my_lockmem.c: Update copyright mysys/my_lread.c: Update copyright mysys/my_lwrite.c: Update copyright mysys/my_malloc.c: Update copyright mysys/my_messnc.c: Update copyright mysys/my_mkdir.c: Update copyright mysys/my_net.c: Update copyright mysys/my_once.c: Update copyright mysys/my_open.c: Update copyright mysys/my_pread.c: Update copyright mysys/my_pthread.c: Update copyright mysys/my_quick.c: Update copyright mysys/my_read.c: Update copyright mysys/my_realloc.c: Update copyright mysys/my_redel.c: Update copyright mysys/my_rename.c: Update copyright mysys/my_seek.c: Update copyright mysys/my_static.c: Update copyright mysys/my_static.h: Update copyright mysys/my_symlink.c: Update copyright mysys/my_symlink2.c: Update copyright mysys/my_tempnam.c: Update copyright mysys/my_thr_init.c: Update copyright mysys/my_vsnprintf.c: Update copyright mysys/my_wincond.c: Update copyright mysys/my_winthread.c: Update copyright mysys/my_write.c: Update copyright mysys/mysys_priv.h: Update copyright mysys/ptr_cmp.c: Update copyright mysys/queues.c: Update copyright mysys/raid.cc: Update copyright mysys/safemalloc.c: Update copyright mysys/string.c: Update copyright mysys/test_charset.c: Update copyright mysys/test_dir.c: Update copyright mysys/test_fn.c: Update copyright mysys/testhash.c: Update copyright mysys/thr_alarm.c: Update copyright mysys/thr_lock.c: Update copyright mysys/thr_mutex.c: Update copyright mysys/thr_rwlock.c: Update copyright mysys/tree.c: Update copyright mysys/typelib.c: Update copyright pstack/debug.c: Update copyright pstack/debug.h: Update copyright pstack/demangle.h: Update copyright pstack/ieee.c: Update copyright pstack/ieee.h: Update copyright pstack/pstack.c: Update copyright readline/bind.c: Cleanup empty lines readline/complete.c: Cleanup empty lines readline/display.c: Cleanup empty lines readline/funmap.c: Cleanup empty lines readline/histexpand.c: Cleanup empty lines readline/histfile.c: Cleanup empty lines readline/history.c: Cleanup empty lines readline/history.h: Cleanup empty lines readline/input.c: Cleanup empty lines readline/kill.c: Cleanup empty lines readline/readline.c: Cleanup empty lines readline/readline.h: Cleanup empty lines readline/vi_mode.c: Cleanup empty lines sql/cache_manager.cc: Update copyright sql/cache_manager.h: Update copyright sql/convert.cc: Update copyright sql/custom_conf.h: Update copyright sql/derror.cc: Update copyright sql/field.cc: Update copyright sql/field.h: Update copyright sql/field_conv.cc: Update copyright sql/filesort.cc: Update copyright sql/frm_crypt.cc: Update copyright sql/ha_berkeley.cc: Update copyright sql/ha_heap.cc: Update copyright sql/ha_heap.h: Update copyright sql/ha_innobase.cc: Update copyright sql/ha_isam.cc: Update copyright sql/ha_isam.h: Update copyright sql/ha_isammrg.cc: Update copyright sql/ha_isammrg.h: Update copyright sql/ha_myisam.cc: Update copyright sql/handler.cc: Update copyright sql/hash_filo.cc: Update copyright sql/hash_filo.h: Update copyright sql/hostname.cc: Update copyright sql/init.cc: Update copyright sql/item.cc: Update copyright sql/item.h: Update copyright sql/item_buff.cc: Update copyright sql/item_cmpfunc.cc: Update copyright sql/item_cmpfunc.h: Update copyright sql/item_create.cc: Update copyright sql/item_create.h: Update copyright sql/item_func.cc: Update copyright sql/item_strfunc.cc: Update copyright sql/item_sum.cc: Update copyright sql/item_sum.h: Update copyright sql/item_timefunc.cc: Update copyright sql/item_timefunc.h: Update copyright sql/item_uniq.cc: Update copyright sql/item_uniq.h: Update copyright sql/key.cc: Update copyright sql/lex_symbol.h: Update copyright sql/lock.cc: Update copyright sql/log.cc: Update copyright sql/log_event.cc: Update copyright sql/log_event.h: Update copyright sql/matherr.c: Update copyright sql/mf_iocache.cc: Update copyright sql/mini_client.cc: Update copyright sql/mini_client.h: Update copyright sql/my_lock.c: Update copyright sql/mysqld.cc: Update copyright sql/net_pkg.cc: Update copyright sql/net_serv.cc: Update copyright sql/opt_sum.cc: Update copyright sql/password.c: Update copyright sql/procedure.cc: Update copyright sql/procedure.h: Update copyright sql/records.cc: Update copyright sql/repl_failsafe.cc: Update copyright sql/slave.cc: Update copyright sql/slave.h: Update copyright sql/sql_acl.cc: Update copyright sql/sql_acl.h: Update copyright sql/sql_analyse.cc: Update copyright sql/sql_analyse.h: Update copyright sql/sql_base.cc: Update copyright sql/sql_cache.cc: Update copyright sql/sql_class.cc: Update copyright sql/sql_class.h: Update copyright sql/sql_crypt.cc: Update copyright sql/sql_crypt.h: Update copyright sql/sql_db.cc: Update copyright sql/sql_delete.cc: Update copyright sql/sql_handler.cc: Update copyright sql/sql_insert.cc: Update copyright sql/sql_lex.cc: Update copyright sql/sql_lex.h: Update copyright sql/sql_list.cc: Update copyright sql/sql_list.h: Update copyright sql/sql_load.cc: Update copyright sql/sql_map.cc: Update copyright sql/sql_map.h: Update copyright sql/sql_parse.cc: Update copyright sql/sql_rename.cc: Update copyright sql/sql_repl.cc: Update copyright sql/sql_select.h: Update copyright sql/sql_string.cc: Update copyright sql/sql_string.h: Update copyright sql/sql_table.cc: Update copyright sql/sql_test.cc: Update copyright sql/sql_udf.cc: Update copyright sql/sql_udf.h: Update copyright sql/stacktrace.c: Update copyright sql/structs.h: Update copyright sql/table.cc: Update copyright sql/table.h: Update copyright sql/thr_malloc.cc: Update copyright sql/time.cc: Update copyright sql/udf_example.cc: Update copyright sql/uniques.cc: Update copyright sql/unireg.cc: Update copyright sql/unireg.h: Update copyright strings/atof.c: Update copyright strings/bchange.c: Update copyright strings/bcmp.c: Update copyright strings/bcopy-duff.c: Update copyright strings/bfill.c: Update copyright strings/bmove.c: Update copyright strings/bmove512.c: Update copyright strings/bmove_upp.c: Update copyright strings/bzero.c: Update copyright strings/conf_to_src.c: Update copyright strings/ctype-big5.c: Update copyright strings/ctype-czech.c: Update copyright strings/ctype-euc_kr.c: Update copyright strings/ctype-gb2312.c: Update copyright strings/ctype-gbk.c: Update copyright strings/ctype-latin1_de.c: Update copyright strings/ctype-sjis.c: Update copyright strings/ctype-tis620.c: Update copyright strings/ctype-ujis.c: Update copyright strings/ctype.c: Update copyright strings/do_ctype.c: Update copyright strings/int2str.c: Update copyright strings/is_prefix.c: Update copyright strings/llstr.c: Update copyright strings/longlong2str.c: Update copyright strings/memcmp.c: Update copyright strings/memcpy.c: Update copyright strings/memset.c: Update copyright strings/r_strinstr.c: Update copyright strings/str2int.c: Update copyright strings/str_test.c: Update copyright strings/strappend.c: Update copyright strings/strcat.c: Update copyright strings/strcend.c: Update copyright strings/strchr.c: Update copyright strings/strcmp.c: Update copyright strings/strcont.c: Update copyright strings/strend.c: Update copyright strings/strfill.c: Update copyright strings/strings-not-used.h: Update copyright strings/strinstr.c: Update copyright strings/strlen.c: Update copyright strings/strmake.c: Update copyright strings/strmov.c: Update copyright strings/strnlen.c: Update copyright strings/strnmov.c: Update copyright strings/strrchr.c: Update copyright strings/strstr.c: Update copyright strings/strto.c: Update copyright strings/strtol.c: Update copyright strings/strtoll.c: Update copyright strings/strtoul.c: Update copyright strings/strtoull.c: Update copyright strings/strxmov.c: Update copyright strings/strxnmov.c: Update copyright strings/t_ctype.h: Update copyright strings/udiv.c: Update copyright tools/mysqlmanager.c: Update copyright vio/test-ssl.c: Update copyright vio/test-sslclient.c: Update copyright vio/test-sslserver.c: Update copyright vio/vio.c: Update copyright vio/viosocket.c: Update copyright vio/viossl.c: Update copyright vio/viosslfactories.c: Update copyright vio/viotest-ssl.c: Update copyright
2001-12-06 13:10:51 +01:00
static my_bool
get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
char *argument)
{
switch(optid) {
case 'a':
what_to_do = DO_ANALYZE;
break;
case 'c':
what_to_do = DO_CHECK;
break;
case 'C':
what_to_do = DO_CHECK;
opt_check_only_changed = 1;
break;
case 'I': /* Fall through */
case '?':
usage();
exit(0);
case 'm':
what_to_do = DO_CHECK;
opt_medium_check = 1;
break;
case 'o':
what_to_do = DO_OPTIMIZE;
break;
case 'p':
if (argument)
{
char *start = argument;
my_free(opt_password, MYF(MY_ALLOW_ZERO_PTR));
opt_password = my_strdup(argument, MYF(MY_FAE));
while (*argument) *argument++= 'x'; /* Destroy argument */
if (*start)
start[1] = 0; /* Cut length of argument */
}
else
tty_password = 1;
break;
case 'r':
what_to_do = DO_REPAIR;
break;
case 'W':
#ifdef __WIN__
opt_mysql_unix_port = MYSQL_NAMEDPIPE;
#endif
break;
case '#':
DBUG_PUSH(argument ? argument : "d:t:o");
break;
case OPT_TABLES:
opt_databases = 0;
break;
case 'v':
verbose++;
break;
case 'V': print_version(); exit(0);
}
return 0;
}
static int get_options(int *argc, char ***argv)
{
int ho_error;
if (*argc == 1)
{
usage();
exit(0);
}
load_defaults("my", load_default_groups, argc, argv);
if ((ho_error=handle_options(argc, argv, my_long_options, get_one_option)))
Added useful exit error code for programs using my_getopt in case of an error in option handling. This can sometimes be useful in scripts. Changed some exit code names and corresponding numbers. Fixed a bug in mysqld.cc, in replication related options. Added a global flag in my_getopt, which can be set by any program that is using my_getopt, which tells whether the client should print the error message itself, or whether my_getopt should do it. The default is that my_getopt will print the error messages. client/mysql.cc: Added useful exit error code for programs using my_getopt in case of an error in option handling. This can sometimes be useful in scripts. client/mysqladmin.c: Added useful exit error code for programs using my_getopt in case of an error in option handling. This can sometimes be useful in scripts. client/mysqlbinlog.cc: Added useful exit error code for programs using my_getopt in case of an error in option handling. This can sometimes be useful in scripts. client/mysqlcheck.c: Added useful exit error code for programs using my_getopt in case of an error in option handling. This can sometimes be useful in scripts. client/mysqldump.c: Added useful exit error code for programs using my_getopt in case of an error in option handling. This can sometimes be useful in scripts. client/mysqlimport.c: Added useful exit error code for programs using my_getopt in case of an error in option handling. This can sometimes be useful in scripts. client/mysqlmanager-pwgen.c: Added useful exit error code for programs using my_getopt in case of an error in option handling. This can sometimes be useful in scripts. client/mysqlmanagerc.c: Added useful exit error code for programs using my_getopt in case of an error in option handling. This can sometimes be useful in scripts. client/mysqlshow.c: Added useful exit error code for programs using my_getopt in case of an error in option handling. This can sometimes be useful in scripts. client/mysqltest.c: Added useful exit error code for programs using my_getopt in case of an error in option handling. This can sometimes be useful in scripts. client/thread_test.c: Added useful exit error code for programs using my_getopt in case of an error in option handling. This can sometimes be useful in scripts. extra/my_print_defaults.c: Added useful exit error code for programs using my_getopt in case of an error in option handling. This can sometimes be useful in scripts. extra/mysql_install.c: Added useful exit error code for programs using my_getopt in case of an error in option handling. This can sometimes be useful in scripts. extra/perror.c: Added useful exit error code for programs using my_getopt in case of an error in option handling. This can sometimes be useful in scripts. extra/resolve_stack_dump.c: Added useful exit error code for programs using my_getopt in case of an error in option handling. This can sometimes be useful in scripts. extra/resolveip.c: Added useful exit error code for programs using my_getopt in case of an error in option handling. This can sometimes be useful in scripts. include/my_getopt.h: Added global (flag) variable which tells my_getopt whether to print errors or just silently exit with proper error code. include/mysys_err.h: Changed exit code names and corresponding numbers. isam/isamchk.c: Added useful exit error code for programs using my_getopt in case of an error in option handling. This can sometimes be useful in scripts. isam/pack_isam.c: Added useful exit error code for programs using my_getopt in case of an error in option handling. This can sometimes be useful in scripts. myisam/ft_dump.c: Added useful exit error code for programs using my_getopt in case of an error in option handling. This can sometimes be useful in scripts. myisam/ft_eval.c: Added useful exit error code for programs using my_getopt in case of an error in option handling. This can sometimes be useful in scripts. myisam/ft_test1.c: Added useful exit error code for programs using my_getopt in case of an error in option handling. This can sometimes be useful in scripts. myisam/mi_test1.c: Added useful exit error code for programs using my_getopt in case of an error in option handling. This can sometimes be useful in scripts. myisam/myisamchk.c: Added useful exit error code for programs using my_getopt in case of an error in option handling. This can sometimes be useful in scripts. myisam/myisampack.c: Added useful exit error code for programs using my_getopt in case of an error in option handling. This can sometimes be useful in scripts. mysys/my_getopt.c: Changed exit code names and corresponding numbers. Added a flag for checking whether my_getopt should print the error message, or whether it should be printed by the client itself. sql/gen_lex_hash.cc: Added useful exit error code for programs using my_getopt in case of an error in option handling. This can sometimes be useful in scripts. sql/mysqld.cc: Added useful exit error code for programs using my_getopt in case of an error in option handling. This can sometimes be useful in scripts. Fixed a bug when compiling in non-debug mode, some replication related options were not enabled while they should be. This made 'make test' to fail in rpl000010 when --with-debug was not used. tools/mysqlmanager.c: Added useful exit error code for programs using my_getopt in case of an error in option handling. This can sometimes be useful in scripts.
2002-05-29 14:07:30 +02:00
exit(ho_error);
if (!what_to_do)
{
int pnlen = strlen(my_progname);
if (pnlen < 6) /* name too short */
what_to_do = DO_CHECK;
else if (!strcmp("repair", my_progname + pnlen - 6))
what_to_do = DO_REPAIR;
else if (!strcmp("analyze", my_progname + pnlen - 7))
what_to_do = DO_ANALYZE;
else if (!strcmp("optimize", my_progname + pnlen - 8))
what_to_do = DO_OPTIMIZE;
else
what_to_do = DO_CHECK;
}
if (default_charset)
{
if (set_default_charset_by_name(default_charset, MYF(MY_WME)))
exit(1);
}
if (*argc > 0 && opt_alldbs)
{
printf("You should give only options, no arguments at all, with option\n");
printf("--all-databases. Please see %s --help for more information.\n",
my_progname);
return 1;
}
if (*argc < 1 && !opt_alldbs)
{
printf("You forgot to give the arguments! Please see %s --help\n",
my_progname);
printf("for more information.\n");
return 1;
}
if (tty_password)
opt_password = get_tty_password(NullS);
return(0);
} /* get_options */
static int process_all_databases()
{
MYSQL_ROW row;
MYSQL_RES *tableres;
int result = 0;
if (mysql_query(sock, "SHOW DATABASES") ||
!(tableres = mysql_store_result(sock)))
{
my_printf_error(0, "Error: Couldn't execute 'SHOW DATABASES': %s",
MYF(0), mysql_error(sock));
return 1;
}
while ((row = mysql_fetch_row(tableres)))
{
if (process_all_tables_in_db(row[0]))
result = 1;
}
return result;
}
/* process_all_databases */
static int process_databases(char **db_names)
{
int result = 0;
for ( ; *db_names ; db_names++)
{
if (process_all_tables_in_db(*db_names))
result = 1;
}
return result;
} /* process_databases */
static int process_selected_tables(char *db, char **table_names, int tables)
{
if (use_db(db))
return 1;
if (opt_all_in_1)
{
char *table_names_comma_sep, *end;
int i, tot_length = 0;
for (i = 0; i < tables; i++)
tot_length += strlen(*(table_names + i)) + 1;
Update copyright Fixed memory leak on shutdown (Affects the embedded version & MyODBC) client/client_priv.h: Update copyright client/completion_hash.cc: Update copyright client/completion_hash.h: Update copyright client/connect_test.c: Update copyright client/errmsg.c: Update copyright client/get_password.c: Update copyright client/insert_test.c: Update copyright client/list_test.c: Update copyright client/my_readline.h: Update copyright client/mysql.cc: Update copyright client/mysqladmin.c: Update copyright client/mysqlbinlog.cc: Update copyright client/mysqlcheck.c: Update copyright client/mysqldump.c: Update copyright client/mysqlimport.c: Update copyright client/mysqlmanager-pwgen.c: Update copyright client/mysqlmanagerc.c: Update copyright client/mysqlshow.c: Update copyright client/mysqltest.c: Update copyright client/password.c: Update copyright client/readline.cc: Update copyright client/select_test.c: Update copyright client/showdb_test.c: Update copyright client/sql_string.cc: Update copyright client/sql_string.h: Update copyright client/ssl_test.c: Update copyright client/thimble.cc: Update copyright client/thread_test.c: Update copyright div/deadlock_test.c: Update copyright extra/comp_err.c: Update copyright extra/my_print_defaults.c: Update copyright extra/perror.c: Update copyright extra/replace.c: Update copyright extra/resolve_stack_dump.c: Update copyright extra/resolveip.c: Update copyright fs/database.c: Update copyright fs/libmysqlfs.c: Update copyright fs/mysqlcorbafs.c: Update copyright fs/mysqlcorbafs.h: Update copyright fs/mysqlcorbafs_test.c: Update copyright heap/_check.c: Update copyright heap/_rectest.c: Update copyright heap/heapdef.h: Update copyright heap/hp_block.c: Update copyright heap/hp_clear.c: Update copyright heap/hp_close.c: Update copyright heap/hp_create.c: Update copyright heap/hp_delete.c: Update copyright heap/hp_extra.c: Update copyright heap/hp_hash.c: Update copyright heap/hp_info.c: Update copyright heap/hp_open.c: Update copyright heap/hp_panic.c: Update copyright heap/hp_rename.c: Update copyright heap/hp_rfirst.c: Update copyright heap/hp_rkey.c: Update copyright heap/hp_rlast.c: Update copyright heap/hp_rnext.c: Update copyright heap/hp_rprev.c: Update copyright heap/hp_rrnd.c: Update copyright heap/hp_rsame.c: Update copyright heap/hp_scan.c: Update copyright heap/hp_static.c: Update copyright heap/hp_test1.c: Update copyright heap/hp_test2.c: Update copyright heap/hp_update.c: Update copyright heap/hp_write.c: Update copyright include/config-win.h: Update copyright include/dbug.h: Update copyright include/errmsg.h: Update copyright include/ft_global.h: Update copyright include/getopt.h: Update copyright include/hash.h: Update copyright include/heap.h: Update copyright include/m_ctype.h: Update copyright include/m_string.h: Update copyright include/md5.h: Update copyright include/merge.h: Update copyright include/my_alarm.h: Update copyright include/my_base.h: Update copyright include/my_bitmap.h: Update copyright include/my_dir.h: Update copyright include/my_global.h: Update copyright include/my_list.h: Update copyright include/my_net.h: Update copyright include/my_no_pthread.h: Update copyright include/my_nosys.h: Update copyright include/my_pthread.h: Update copyright include/my_sys.h: Update copyright include/my_tree.h: Update copyright include/myisam.h: Update copyright include/myisammrg.h: Update copyright include/myisampack.h: Update copyright include/mysql.h: Update copyright include/mysql_com.h: Update copyright include/mysql_embed.h: Update copyright include/mysqld_error.h: Update copyright include/mysys_err.h: Update copyright include/nisam.h: Update copyright include/queues.h: Update copyright include/raid.h: Update copyright include/sslopt-case.h: Update copyright include/sslopt-longopts.h: Update copyright include/sslopt-usage.h: Update copyright include/sslopt-vars.h: Update copyright include/t_ctype.h: Update copyright include/thr_alarm.h: Update copyright include/thr_lock.h: Update copyright include/violite.h: Update copyright isam/_cache.c: Update copyright isam/_dbug.c: Update copyright isam/_key.c: Update copyright isam/_locking.c: Update copyright isam/_packrec.c: Update copyright isam/_page.c: Update copyright isam/_search.c: Update copyright isam/_statrec.c: Update copyright isam/changed.c: Update copyright isam/close.c: Update copyright isam/create.c: Update copyright isam/delete.c: Update copyright isam/extra.c: Update copyright isam/info.c: Update copyright isam/isamchk.c: Update copyright isam/isamdef.h: Update copyright isam/log.c: Update copyright isam/open.c: Update copyright isam/panic.c: Update copyright isam/range.c: Update copyright isam/rfirst.c: Update copyright isam/rkey.c: Update copyright isam/rlast.c: Update copyright isam/rnext.c: Update copyright isam/rprev.c: Update copyright isam/rrnd.c: Update copyright isam/rsame.c: Update copyright isam/rsamepos.c: Update copyright isam/sort.c: Update copyright isam/static.c: Update copyright isam/test1.c: Update copyright isam/test2.c: Update copyright isam/test3.c: Update copyright isam/update.c: Update copyright isam/write.c: Update copyright libmysql/conf_to_src.c: Update copyright libmysql/dll.c: Update copyright libmysql/errmsg.c: Update copyright libmysql/get_password.c: Update copyright libmysql/libmysql.c: Update copyright libmysql/manager.c: Update copyright libmysql/net.c: Update copyright libmysql/password.c: Update copyright libmysqld/lib_sql.cc: Update copyright libmysqld/lib_vio.c: Update copyright libmysqld/libmysqld.c: Update copyright merge/mrg_close.c: Update copyright merge/mrg_create.c: Update copyright merge/mrg_def.h: Update copyright merge/mrg_delete.c: Update copyright merge/mrg_extra.c: Update copyright merge/mrg_info.c: Update copyright merge/mrg_locking.c: Update copyright merge/mrg_open.c: Update copyright merge/mrg_panic.c: Update copyright merge/mrg_rrnd.c: Update copyright merge/mrg_rsame.c: Update copyright merge/mrg_static.c: Update copyright merge/mrg_update.c: Update copyright myisam/ft_boolean_search.c: Update copyright myisam/ft_dump.c: Update copyright myisam/ft_eval.h: Update copyright myisam/ft_static.c: Update copyright myisam/ft_stem.c: Update copyright myisam/ft_stopwords.c: Update copyright myisam/ft_test1.h: Update copyright myisam/mi_cache.c: Update copyright myisam/mi_changed.c: Update copyright myisam/mi_check.c: Update copyright myisam/mi_checksum.c: Update copyright myisam/mi_close.c: Update copyright myisam/mi_create.c: Update copyright myisam/mi_dbug.c: Update copyright myisam/mi_delete.c: Update copyright myisam/mi_delete_all.c: Update copyright myisam/mi_delete_table.c: Update copyright myisam/mi_dynrec.c: Update copyright myisam/mi_extra.c: Update copyright myisam/mi_info.c: Update copyright myisam/mi_key.c: Update copyright myisam/mi_locking.c: Update copyright myisam/mi_log.c: Update copyright myisam/mi_open.c: Update copyright myisam/mi_packrec.c: Update copyright myisam/mi_page.c: Update copyright myisam/mi_panic.c: Update copyright myisam/mi_range.c: Update copyright myisam/mi_rename.c: Update copyright myisam/mi_rfirst.c: Update copyright myisam/mi_rlast.c: Update copyright myisam/mi_rnext_same.c: Update copyright myisam/mi_rrnd.c: Update copyright myisam/mi_rsame.c: Update copyright myisam/mi_rsamepos.c: Update copyright myisam/mi_scan.c: Update copyright myisam/mi_search.c: Update copyright myisam/mi_static.c: Update copyright myisam/mi_statrec.c: Update copyright myisam/mi_test1.c: Update copyright myisam/mi_test2.c: Update copyright myisam/mi_test3.c: Update copyright myisam/mi_unique.c: Update copyright myisam/mi_update.c: Update copyright myisam/mi_write.c: Update copyright myisam/myisamchk.c: Update copyright myisam/myisampack.c: Update copyright myisammrg/myrg_close.c: Update copyright myisammrg/myrg_create.c: Update copyright myisammrg/myrg_def.h: Update copyright myisammrg/myrg_delete.c: Update copyright myisammrg/myrg_locking.c: Update copyright myisammrg/myrg_open.c: Update copyright myisammrg/myrg_panic.c: Update copyright myisammrg/myrg_rsame.c: Update copyright myisammrg/myrg_static.c: Update copyright myisammrg/myrg_update.c: Update copyright myisammrg/myrg_write.c: Update copyright mysql-test/r/gcc296.result: Update of benchmark results mysql-test/r/innodb.result: Update of benchmark results mysql-test/r/join_outer.result: Update of benchmark results mysql-test/r/myisam.result: Update of benchmark results mysys/array.c: Update copyright mysys/charset.c: Fix for restart of character sets mysys/checksum.c: Update copyright mysys/default.c: Update copyright mysys/errors.c: Update copyright mysys/getopt.c: Cleanup mysys/getvar.c: Update copyright mysys/hash.c: Update copyright mysys/list.c: Update copyright mysys/make-conf.c: Update copyright mysys/md5.c: Update copyright mysys/mf_brkhant.c: Update copyright mysys/mf_cache.c: Update copyright mysys/mf_casecnv.c: Update copyright mysys/mf_dirname.c: Update copyright mysys/mf_fn_ext.c: Update copyright mysys/mf_format.c: Update copyright mysys/mf_getdate.c: Update copyright mysys/mf_iocache.c: Update copyright mysys/mf_iocache2.c: Update copyright mysys/mf_keycache.c: Update copyright mysys/mf_loadpath.c: Update copyright mysys/mf_pack.c: Update copyright mysys/mf_path.c: Update copyright mysys/mf_qsort.c: Update copyright mysys/mf_qsort2.c: Update copyright mysys/mf_radix.c: Update copyright mysys/mf_same.c: Update copyright mysys/mf_sleep.c: Update copyright mysys/mf_sort.c: Update copyright mysys/mf_soundex.c: Update copyright mysys/mf_stripp.c: Update copyright mysys/mf_tempfile.c: Update copyright mysys/mf_unixpath.c: Update copyright mysys/mf_util.c: Update copyright mysys/mf_wcomp.c: Update copyright mysys/mf_wfile.c: Update copyright mysys/mulalloc.c: Update copyright mysys/my_alarm.c: Update copyright mysys/my_alloc.c: Update copyright mysys/my_append.c: Update copyright mysys/my_bit.c: Update copyright mysys/my_bitmap.c: Update copyright mysys/my_chsize.c: Update copyright mysys/my_clock.c: Update copyright mysys/my_compress.c: Update copyright mysys/my_copy.c: Update copyright mysys/my_create.c: Update copyright mysys/my_delete.c: Update copyright mysys/my_div.c: Update copyright mysys/my_dup.c: Update copyright mysys/my_error.c: Update copyright mysys/my_fopen.c: Update copyright mysys/my_fstream.c: Update copyright mysys/my_getwd.c: Update copyright mysys/my_init.c: Free 'once_alloc' memory at shutdown. mysys/my_lib.c: Update copyright mysys/my_lock.c: Update copyright mysys/my_lockmem.c: Update copyright mysys/my_lread.c: Update copyright mysys/my_lwrite.c: Update copyright mysys/my_malloc.c: Update copyright mysys/my_messnc.c: Update copyright mysys/my_mkdir.c: Update copyright mysys/my_net.c: Update copyright mysys/my_once.c: Update copyright mysys/my_open.c: Update copyright mysys/my_pread.c: Update copyright mysys/my_pthread.c: Update copyright mysys/my_quick.c: Update copyright mysys/my_read.c: Update copyright mysys/my_realloc.c: Update copyright mysys/my_redel.c: Update copyright mysys/my_rename.c: Update copyright mysys/my_seek.c: Update copyright mysys/my_static.c: Update copyright mysys/my_static.h: Update copyright mysys/my_symlink.c: Update copyright mysys/my_symlink2.c: Update copyright mysys/my_tempnam.c: Update copyright mysys/my_thr_init.c: Update copyright mysys/my_vsnprintf.c: Update copyright mysys/my_wincond.c: Update copyright mysys/my_winthread.c: Update copyright mysys/my_write.c: Update copyright mysys/mysys_priv.h: Update copyright mysys/ptr_cmp.c: Update copyright mysys/queues.c: Update copyright mysys/raid.cc: Update copyright mysys/safemalloc.c: Update copyright mysys/string.c: Update copyright mysys/test_charset.c: Update copyright mysys/test_dir.c: Update copyright mysys/test_fn.c: Update copyright mysys/testhash.c: Update copyright mysys/thr_alarm.c: Update copyright mysys/thr_lock.c: Update copyright mysys/thr_mutex.c: Update copyright mysys/thr_rwlock.c: Update copyright mysys/tree.c: Update copyright mysys/typelib.c: Update copyright pstack/debug.c: Update copyright pstack/debug.h: Update copyright pstack/demangle.h: Update copyright pstack/ieee.c: Update copyright pstack/ieee.h: Update copyright pstack/pstack.c: Update copyright readline/bind.c: Cleanup empty lines readline/complete.c: Cleanup empty lines readline/display.c: Cleanup empty lines readline/funmap.c: Cleanup empty lines readline/histexpand.c: Cleanup empty lines readline/histfile.c: Cleanup empty lines readline/history.c: Cleanup empty lines readline/history.h: Cleanup empty lines readline/input.c: Cleanup empty lines readline/kill.c: Cleanup empty lines readline/readline.c: Cleanup empty lines readline/readline.h: Cleanup empty lines readline/vi_mode.c: Cleanup empty lines sql/cache_manager.cc: Update copyright sql/cache_manager.h: Update copyright sql/convert.cc: Update copyright sql/custom_conf.h: Update copyright sql/derror.cc: Update copyright sql/field.cc: Update copyright sql/field.h: Update copyright sql/field_conv.cc: Update copyright sql/filesort.cc: Update copyright sql/frm_crypt.cc: Update copyright sql/ha_berkeley.cc: Update copyright sql/ha_heap.cc: Update copyright sql/ha_heap.h: Update copyright sql/ha_innobase.cc: Update copyright sql/ha_isam.cc: Update copyright sql/ha_isam.h: Update copyright sql/ha_isammrg.cc: Update copyright sql/ha_isammrg.h: Update copyright sql/ha_myisam.cc: Update copyright sql/handler.cc: Update copyright sql/hash_filo.cc: Update copyright sql/hash_filo.h: Update copyright sql/hostname.cc: Update copyright sql/init.cc: Update copyright sql/item.cc: Update copyright sql/item.h: Update copyright sql/item_buff.cc: Update copyright sql/item_cmpfunc.cc: Update copyright sql/item_cmpfunc.h: Update copyright sql/item_create.cc: Update copyright sql/item_create.h: Update copyright sql/item_func.cc: Update copyright sql/item_strfunc.cc: Update copyright sql/item_sum.cc: Update copyright sql/item_sum.h: Update copyright sql/item_timefunc.cc: Update copyright sql/item_timefunc.h: Update copyright sql/item_uniq.cc: Update copyright sql/item_uniq.h: Update copyright sql/key.cc: Update copyright sql/lex_symbol.h: Update copyright sql/lock.cc: Update copyright sql/log.cc: Update copyright sql/log_event.cc: Update copyright sql/log_event.h: Update copyright sql/matherr.c: Update copyright sql/mf_iocache.cc: Update copyright sql/mini_client.cc: Update copyright sql/mini_client.h: Update copyright sql/my_lock.c: Update copyright sql/mysqld.cc: Update copyright sql/net_pkg.cc: Update copyright sql/net_serv.cc: Update copyright sql/opt_sum.cc: Update copyright sql/password.c: Update copyright sql/procedure.cc: Update copyright sql/procedure.h: Update copyright sql/records.cc: Update copyright sql/repl_failsafe.cc: Update copyright sql/slave.cc: Update copyright sql/slave.h: Update copyright sql/sql_acl.cc: Update copyright sql/sql_acl.h: Update copyright sql/sql_analyse.cc: Update copyright sql/sql_analyse.h: Update copyright sql/sql_base.cc: Update copyright sql/sql_cache.cc: Update copyright sql/sql_class.cc: Update copyright sql/sql_class.h: Update copyright sql/sql_crypt.cc: Update copyright sql/sql_crypt.h: Update copyright sql/sql_db.cc: Update copyright sql/sql_delete.cc: Update copyright sql/sql_handler.cc: Update copyright sql/sql_insert.cc: Update copyright sql/sql_lex.cc: Update copyright sql/sql_lex.h: Update copyright sql/sql_list.cc: Update copyright sql/sql_list.h: Update copyright sql/sql_load.cc: Update copyright sql/sql_map.cc: Update copyright sql/sql_map.h: Update copyright sql/sql_parse.cc: Update copyright sql/sql_rename.cc: Update copyright sql/sql_repl.cc: Update copyright sql/sql_select.h: Update copyright sql/sql_string.cc: Update copyright sql/sql_string.h: Update copyright sql/sql_table.cc: Update copyright sql/sql_test.cc: Update copyright sql/sql_udf.cc: Update copyright sql/sql_udf.h: Update copyright sql/stacktrace.c: Update copyright sql/structs.h: Update copyright sql/table.cc: Update copyright sql/table.h: Update copyright sql/thr_malloc.cc: Update copyright sql/time.cc: Update copyright sql/udf_example.cc: Update copyright sql/uniques.cc: Update copyright sql/unireg.cc: Update copyright sql/unireg.h: Update copyright strings/atof.c: Update copyright strings/bchange.c: Update copyright strings/bcmp.c: Update copyright strings/bcopy-duff.c: Update copyright strings/bfill.c: Update copyright strings/bmove.c: Update copyright strings/bmove512.c: Update copyright strings/bmove_upp.c: Update copyright strings/bzero.c: Update copyright strings/conf_to_src.c: Update copyright strings/ctype-big5.c: Update copyright strings/ctype-czech.c: Update copyright strings/ctype-euc_kr.c: Update copyright strings/ctype-gb2312.c: Update copyright strings/ctype-gbk.c: Update copyright strings/ctype-latin1_de.c: Update copyright strings/ctype-sjis.c: Update copyright strings/ctype-tis620.c: Update copyright strings/ctype-ujis.c: Update copyright strings/ctype.c: Update copyright strings/do_ctype.c: Update copyright strings/int2str.c: Update copyright strings/is_prefix.c: Update copyright strings/llstr.c: Update copyright strings/longlong2str.c: Update copyright strings/memcmp.c: Update copyright strings/memcpy.c: Update copyright strings/memset.c: Update copyright strings/r_strinstr.c: Update copyright strings/str2int.c: Update copyright strings/str_test.c: Update copyright strings/strappend.c: Update copyright strings/strcat.c: Update copyright strings/strcend.c: Update copyright strings/strchr.c: Update copyright strings/strcmp.c: Update copyright strings/strcont.c: Update copyright strings/strend.c: Update copyright strings/strfill.c: Update copyright strings/strings-not-used.h: Update copyright strings/strinstr.c: Update copyright strings/strlen.c: Update copyright strings/strmake.c: Update copyright strings/strmov.c: Update copyright strings/strnlen.c: Update copyright strings/strnmov.c: Update copyright strings/strrchr.c: Update copyright strings/strstr.c: Update copyright strings/strto.c: Update copyright strings/strtol.c: Update copyright strings/strtoll.c: Update copyright strings/strtoul.c: Update copyright strings/strtoull.c: Update copyright strings/strxmov.c: Update copyright strings/strxnmov.c: Update copyright strings/t_ctype.h: Update copyright strings/udiv.c: Update copyright tools/mysqlmanager.c: Update copyright vio/test-ssl.c: Update copyright vio/test-sslclient.c: Update copyright vio/test-sslserver.c: Update copyright vio/vio.c: Update copyright vio/viosocket.c: Update copyright vio/viossl.c: Update copyright vio/viosslfactories.c: Update copyright vio/viotest-ssl.c: Update copyright
2001-12-06 13:10:51 +01:00
if (!(table_names_comma_sep = (char *)
my_malloc((sizeof(char) * tot_length) + 1, MYF(MY_WME))))
return 1;
for (end = table_names_comma_sep + 1; tables > 0;
tables--, table_names++)
{
end = strmov(end, *table_names);
*end++= ',';
}
*--end = 0;
handle_request_for_tables(table_names_comma_sep + 1, tot_length - 1);
my_free(table_names_comma_sep, MYF(0));
}
else
for (; tables > 0; tables--, table_names++)
handle_request_for_tables(*table_names, strlen(*table_names));
return 0;
} /* process_selected_tables */
static int process_all_tables_in_db(char *database)
{
MYSQL_RES *res;
MYSQL_ROW row;
LINT_INIT(res);
if (use_db(database))
return 1;
if (!(mysql_query(sock, "SHOW TABLES") ||
(res = mysql_store_result(sock))))
return 1;
Update copyright Fixed memory leak on shutdown (Affects the embedded version & MyODBC) client/client_priv.h: Update copyright client/completion_hash.cc: Update copyright client/completion_hash.h: Update copyright client/connect_test.c: Update copyright client/errmsg.c: Update copyright client/get_password.c: Update copyright client/insert_test.c: Update copyright client/list_test.c: Update copyright client/my_readline.h: Update copyright client/mysql.cc: Update copyright client/mysqladmin.c: Update copyright client/mysqlbinlog.cc: Update copyright client/mysqlcheck.c: Update copyright client/mysqldump.c: Update copyright client/mysqlimport.c: Update copyright client/mysqlmanager-pwgen.c: Update copyright client/mysqlmanagerc.c: Update copyright client/mysqlshow.c: Update copyright client/mysqltest.c: Update copyright client/password.c: Update copyright client/readline.cc: Update copyright client/select_test.c: Update copyright client/showdb_test.c: Update copyright client/sql_string.cc: Update copyright client/sql_string.h: Update copyright client/ssl_test.c: Update copyright client/thimble.cc: Update copyright client/thread_test.c: Update copyright div/deadlock_test.c: Update copyright extra/comp_err.c: Update copyright extra/my_print_defaults.c: Update copyright extra/perror.c: Update copyright extra/replace.c: Update copyright extra/resolve_stack_dump.c: Update copyright extra/resolveip.c: Update copyright fs/database.c: Update copyright fs/libmysqlfs.c: Update copyright fs/mysqlcorbafs.c: Update copyright fs/mysqlcorbafs.h: Update copyright fs/mysqlcorbafs_test.c: Update copyright heap/_check.c: Update copyright heap/_rectest.c: Update copyright heap/heapdef.h: Update copyright heap/hp_block.c: Update copyright heap/hp_clear.c: Update copyright heap/hp_close.c: Update copyright heap/hp_create.c: Update copyright heap/hp_delete.c: Update copyright heap/hp_extra.c: Update copyright heap/hp_hash.c: Update copyright heap/hp_info.c: Update copyright heap/hp_open.c: Update copyright heap/hp_panic.c: Update copyright heap/hp_rename.c: Update copyright heap/hp_rfirst.c: Update copyright heap/hp_rkey.c: Update copyright heap/hp_rlast.c: Update copyright heap/hp_rnext.c: Update copyright heap/hp_rprev.c: Update copyright heap/hp_rrnd.c: Update copyright heap/hp_rsame.c: Update copyright heap/hp_scan.c: Update copyright heap/hp_static.c: Update copyright heap/hp_test1.c: Update copyright heap/hp_test2.c: Update copyright heap/hp_update.c: Update copyright heap/hp_write.c: Update copyright include/config-win.h: Update copyright include/dbug.h: Update copyright include/errmsg.h: Update copyright include/ft_global.h: Update copyright include/getopt.h: Update copyright include/hash.h: Update copyright include/heap.h: Update copyright include/m_ctype.h: Update copyright include/m_string.h: Update copyright include/md5.h: Update copyright include/merge.h: Update copyright include/my_alarm.h: Update copyright include/my_base.h: Update copyright include/my_bitmap.h: Update copyright include/my_dir.h: Update copyright include/my_global.h: Update copyright include/my_list.h: Update copyright include/my_net.h: Update copyright include/my_no_pthread.h: Update copyright include/my_nosys.h: Update copyright include/my_pthread.h: Update copyright include/my_sys.h: Update copyright include/my_tree.h: Update copyright include/myisam.h: Update copyright include/myisammrg.h: Update copyright include/myisampack.h: Update copyright include/mysql.h: Update copyright include/mysql_com.h: Update copyright include/mysql_embed.h: Update copyright include/mysqld_error.h: Update copyright include/mysys_err.h: Update copyright include/nisam.h: Update copyright include/queues.h: Update copyright include/raid.h: Update copyright include/sslopt-case.h: Update copyright include/sslopt-longopts.h: Update copyright include/sslopt-usage.h: Update copyright include/sslopt-vars.h: Update copyright include/t_ctype.h: Update copyright include/thr_alarm.h: Update copyright include/thr_lock.h: Update copyright include/violite.h: Update copyright isam/_cache.c: Update copyright isam/_dbug.c: Update copyright isam/_key.c: Update copyright isam/_locking.c: Update copyright isam/_packrec.c: Update copyright isam/_page.c: Update copyright isam/_search.c: Update copyright isam/_statrec.c: Update copyright isam/changed.c: Update copyright isam/close.c: Update copyright isam/create.c: Update copyright isam/delete.c: Update copyright isam/extra.c: Update copyright isam/info.c: Update copyright isam/isamchk.c: Update copyright isam/isamdef.h: Update copyright isam/log.c: Update copyright isam/open.c: Update copyright isam/panic.c: Update copyright isam/range.c: Update copyright isam/rfirst.c: Update copyright isam/rkey.c: Update copyright isam/rlast.c: Update copyright isam/rnext.c: Update copyright isam/rprev.c: Update copyright isam/rrnd.c: Update copyright isam/rsame.c: Update copyright isam/rsamepos.c: Update copyright isam/sort.c: Update copyright isam/static.c: Update copyright isam/test1.c: Update copyright isam/test2.c: Update copyright isam/test3.c: Update copyright isam/update.c: Update copyright isam/write.c: Update copyright libmysql/conf_to_src.c: Update copyright libmysql/dll.c: Update copyright libmysql/errmsg.c: Update copyright libmysql/get_password.c: Update copyright libmysql/libmysql.c: Update copyright libmysql/manager.c: Update copyright libmysql/net.c: Update copyright libmysql/password.c: Update copyright libmysqld/lib_sql.cc: Update copyright libmysqld/lib_vio.c: Update copyright libmysqld/libmysqld.c: Update copyright merge/mrg_close.c: Update copyright merge/mrg_create.c: Update copyright merge/mrg_def.h: Update copyright merge/mrg_delete.c: Update copyright merge/mrg_extra.c: Update copyright merge/mrg_info.c: Update copyright merge/mrg_locking.c: Update copyright merge/mrg_open.c: Update copyright merge/mrg_panic.c: Update copyright merge/mrg_rrnd.c: Update copyright merge/mrg_rsame.c: Update copyright merge/mrg_static.c: Update copyright merge/mrg_update.c: Update copyright myisam/ft_boolean_search.c: Update copyright myisam/ft_dump.c: Update copyright myisam/ft_eval.h: Update copyright myisam/ft_static.c: Update copyright myisam/ft_stem.c: Update copyright myisam/ft_stopwords.c: Update copyright myisam/ft_test1.h: Update copyright myisam/mi_cache.c: Update copyright myisam/mi_changed.c: Update copyright myisam/mi_check.c: Update copyright myisam/mi_checksum.c: Update copyright myisam/mi_close.c: Update copyright myisam/mi_create.c: Update copyright myisam/mi_dbug.c: Update copyright myisam/mi_delete.c: Update copyright myisam/mi_delete_all.c: Update copyright myisam/mi_delete_table.c: Update copyright myisam/mi_dynrec.c: Update copyright myisam/mi_extra.c: Update copyright myisam/mi_info.c: Update copyright myisam/mi_key.c: Update copyright myisam/mi_locking.c: Update copyright myisam/mi_log.c: Update copyright myisam/mi_open.c: Update copyright myisam/mi_packrec.c: Update copyright myisam/mi_page.c: Update copyright myisam/mi_panic.c: Update copyright myisam/mi_range.c: Update copyright myisam/mi_rename.c: Update copyright myisam/mi_rfirst.c: Update copyright myisam/mi_rlast.c: Update copyright myisam/mi_rnext_same.c: Update copyright myisam/mi_rrnd.c: Update copyright myisam/mi_rsame.c: Update copyright myisam/mi_rsamepos.c: Update copyright myisam/mi_scan.c: Update copyright myisam/mi_search.c: Update copyright myisam/mi_static.c: Update copyright myisam/mi_statrec.c: Update copyright myisam/mi_test1.c: Update copyright myisam/mi_test2.c: Update copyright myisam/mi_test3.c: Update copyright myisam/mi_unique.c: Update copyright myisam/mi_update.c: Update copyright myisam/mi_write.c: Update copyright myisam/myisamchk.c: Update copyright myisam/myisampack.c: Update copyright myisammrg/myrg_close.c: Update copyright myisammrg/myrg_create.c: Update copyright myisammrg/myrg_def.h: Update copyright myisammrg/myrg_delete.c: Update copyright myisammrg/myrg_locking.c: Update copyright myisammrg/myrg_open.c: Update copyright myisammrg/myrg_panic.c: Update copyright myisammrg/myrg_rsame.c: Update copyright myisammrg/myrg_static.c: Update copyright myisammrg/myrg_update.c: Update copyright myisammrg/myrg_write.c: Update copyright mysql-test/r/gcc296.result: Update of benchmark results mysql-test/r/innodb.result: Update of benchmark results mysql-test/r/join_outer.result: Update of benchmark results mysql-test/r/myisam.result: Update of benchmark results mysys/array.c: Update copyright mysys/charset.c: Fix for restart of character sets mysys/checksum.c: Update copyright mysys/default.c: Update copyright mysys/errors.c: Update copyright mysys/getopt.c: Cleanup mysys/getvar.c: Update copyright mysys/hash.c: Update copyright mysys/list.c: Update copyright mysys/make-conf.c: Update copyright mysys/md5.c: Update copyright mysys/mf_brkhant.c: Update copyright mysys/mf_cache.c: Update copyright mysys/mf_casecnv.c: Update copyright mysys/mf_dirname.c: Update copyright mysys/mf_fn_ext.c: Update copyright mysys/mf_format.c: Update copyright mysys/mf_getdate.c: Update copyright mysys/mf_iocache.c: Update copyright mysys/mf_iocache2.c: Update copyright mysys/mf_keycache.c: Update copyright mysys/mf_loadpath.c: Update copyright mysys/mf_pack.c: Update copyright mysys/mf_path.c: Update copyright mysys/mf_qsort.c: Update copyright mysys/mf_qsort2.c: Update copyright mysys/mf_radix.c: Update copyright mysys/mf_same.c: Update copyright mysys/mf_sleep.c: Update copyright mysys/mf_sort.c: Update copyright mysys/mf_soundex.c: Update copyright mysys/mf_stripp.c: Update copyright mysys/mf_tempfile.c: Update copyright mysys/mf_unixpath.c: Update copyright mysys/mf_util.c: Update copyright mysys/mf_wcomp.c: Update copyright mysys/mf_wfile.c: Update copyright mysys/mulalloc.c: Update copyright mysys/my_alarm.c: Update copyright mysys/my_alloc.c: Update copyright mysys/my_append.c: Update copyright mysys/my_bit.c: Update copyright mysys/my_bitmap.c: Update copyright mysys/my_chsize.c: Update copyright mysys/my_clock.c: Update copyright mysys/my_compress.c: Update copyright mysys/my_copy.c: Update copyright mysys/my_create.c: Update copyright mysys/my_delete.c: Update copyright mysys/my_div.c: Update copyright mysys/my_dup.c: Update copyright mysys/my_error.c: Update copyright mysys/my_fopen.c: Update copyright mysys/my_fstream.c: Update copyright mysys/my_getwd.c: Update copyright mysys/my_init.c: Free 'once_alloc' memory at shutdown. mysys/my_lib.c: Update copyright mysys/my_lock.c: Update copyright mysys/my_lockmem.c: Update copyright mysys/my_lread.c: Update copyright mysys/my_lwrite.c: Update copyright mysys/my_malloc.c: Update copyright mysys/my_messnc.c: Update copyright mysys/my_mkdir.c: Update copyright mysys/my_net.c: Update copyright mysys/my_once.c: Update copyright mysys/my_open.c: Update copyright mysys/my_pread.c: Update copyright mysys/my_pthread.c: Update copyright mysys/my_quick.c: Update copyright mysys/my_read.c: Update copyright mysys/my_realloc.c: Update copyright mysys/my_redel.c: Update copyright mysys/my_rename.c: Update copyright mysys/my_seek.c: Update copyright mysys/my_static.c: Update copyright mysys/my_static.h: Update copyright mysys/my_symlink.c: Update copyright mysys/my_symlink2.c: Update copyright mysys/my_tempnam.c: Update copyright mysys/my_thr_init.c: Update copyright mysys/my_vsnprintf.c: Update copyright mysys/my_wincond.c: Update copyright mysys/my_winthread.c: Update copyright mysys/my_write.c: Update copyright mysys/mysys_priv.h: Update copyright mysys/ptr_cmp.c: Update copyright mysys/queues.c: Update copyright mysys/raid.cc: Update copyright mysys/safemalloc.c: Update copyright mysys/string.c: Update copyright mysys/test_charset.c: Update copyright mysys/test_dir.c: Update copyright mysys/test_fn.c: Update copyright mysys/testhash.c: Update copyright mysys/thr_alarm.c: Update copyright mysys/thr_lock.c: Update copyright mysys/thr_mutex.c: Update copyright mysys/thr_rwlock.c: Update copyright mysys/tree.c: Update copyright mysys/typelib.c: Update copyright pstack/debug.c: Update copyright pstack/debug.h: Update copyright pstack/demangle.h: Update copyright pstack/ieee.c: Update copyright pstack/ieee.h: Update copyright pstack/pstack.c: Update copyright readline/bind.c: Cleanup empty lines readline/complete.c: Cleanup empty lines readline/display.c: Cleanup empty lines readline/funmap.c: Cleanup empty lines readline/histexpand.c: Cleanup empty lines readline/histfile.c: Cleanup empty lines readline/history.c: Cleanup empty lines readline/history.h: Cleanup empty lines readline/input.c: Cleanup empty lines readline/kill.c: Cleanup empty lines readline/readline.c: Cleanup empty lines readline/readline.h: Cleanup empty lines readline/vi_mode.c: Cleanup empty lines sql/cache_manager.cc: Update copyright sql/cache_manager.h: Update copyright sql/convert.cc: Update copyright sql/custom_conf.h: Update copyright sql/derror.cc: Update copyright sql/field.cc: Update copyright sql/field.h: Update copyright sql/field_conv.cc: Update copyright sql/filesort.cc: Update copyright sql/frm_crypt.cc: Update copyright sql/ha_berkeley.cc: Update copyright sql/ha_heap.cc: Update copyright sql/ha_heap.h: Update copyright sql/ha_innobase.cc: Update copyright sql/ha_isam.cc: Update copyright sql/ha_isam.h: Update copyright sql/ha_isammrg.cc: Update copyright sql/ha_isammrg.h: Update copyright sql/ha_myisam.cc: Update copyright sql/handler.cc: Update copyright sql/hash_filo.cc: Update copyright sql/hash_filo.h: Update copyright sql/hostname.cc: Update copyright sql/init.cc: Update copyright sql/item.cc: Update copyright sql/item.h: Update copyright sql/item_buff.cc: Update copyright sql/item_cmpfunc.cc: Update copyright sql/item_cmpfunc.h: Update copyright sql/item_create.cc: Update copyright sql/item_create.h: Update copyright sql/item_func.cc: Update copyright sql/item_strfunc.cc: Update copyright sql/item_sum.cc: Update copyright sql/item_sum.h: Update copyright sql/item_timefunc.cc: Update copyright sql/item_timefunc.h: Update copyright sql/item_uniq.cc: Update copyright sql/item_uniq.h: Update copyright sql/key.cc: Update copyright sql/lex_symbol.h: Update copyright sql/lock.cc: Update copyright sql/log.cc: Update copyright sql/log_event.cc: Update copyright sql/log_event.h: Update copyright sql/matherr.c: Update copyright sql/mf_iocache.cc: Update copyright sql/mini_client.cc: Update copyright sql/mini_client.h: Update copyright sql/my_lock.c: Update copyright sql/mysqld.cc: Update copyright sql/net_pkg.cc: Update copyright sql/net_serv.cc: Update copyright sql/opt_sum.cc: Update copyright sql/password.c: Update copyright sql/procedure.cc: Update copyright sql/procedure.h: Update copyright sql/records.cc: Update copyright sql/repl_failsafe.cc: Update copyright sql/slave.cc: Update copyright sql/slave.h: Update copyright sql/sql_acl.cc: Update copyright sql/sql_acl.h: Update copyright sql/sql_analyse.cc: Update copyright sql/sql_analyse.h: Update copyright sql/sql_base.cc: Update copyright sql/sql_cache.cc: Update copyright sql/sql_class.cc: Update copyright sql/sql_class.h: Update copyright sql/sql_crypt.cc: Update copyright sql/sql_crypt.h: Update copyright sql/sql_db.cc: Update copyright sql/sql_delete.cc: Update copyright sql/sql_handler.cc: Update copyright sql/sql_insert.cc: Update copyright sql/sql_lex.cc: Update copyright sql/sql_lex.h: Update copyright sql/sql_list.cc: Update copyright sql/sql_list.h: Update copyright sql/sql_load.cc: Update copyright sql/sql_map.cc: Update copyright sql/sql_map.h: Update copyright sql/sql_parse.cc: Update copyright sql/sql_rename.cc: Update copyright sql/sql_repl.cc: Update copyright sql/sql_select.h: Update copyright sql/sql_string.cc: Update copyright sql/sql_string.h: Update copyright sql/sql_table.cc: Update copyright sql/sql_test.cc: Update copyright sql/sql_udf.cc: Update copyright sql/sql_udf.h: Update copyright sql/stacktrace.c: Update copyright sql/structs.h: Update copyright sql/table.cc: Update copyright sql/table.h: Update copyright sql/thr_malloc.cc: Update copyright sql/time.cc: Update copyright sql/udf_example.cc: Update copyright sql/uniques.cc: Update copyright sql/unireg.cc: Update copyright sql/unireg.h: Update copyright strings/atof.c: Update copyright strings/bchange.c: Update copyright strings/bcmp.c: Update copyright strings/bcopy-duff.c: Update copyright strings/bfill.c: Update copyright strings/bmove.c: Update copyright strings/bmove512.c: Update copyright strings/bmove_upp.c: Update copyright strings/bzero.c: Update copyright strings/conf_to_src.c: Update copyright strings/ctype-big5.c: Update copyright strings/ctype-czech.c: Update copyright strings/ctype-euc_kr.c: Update copyright strings/ctype-gb2312.c: Update copyright strings/ctype-gbk.c: Update copyright strings/ctype-latin1_de.c: Update copyright strings/ctype-sjis.c: Update copyright strings/ctype-tis620.c: Update copyright strings/ctype-ujis.c: Update copyright strings/ctype.c: Update copyright strings/do_ctype.c: Update copyright strings/int2str.c: Update copyright strings/is_prefix.c: Update copyright strings/llstr.c: Update copyright strings/longlong2str.c: Update copyright strings/memcmp.c: Update copyright strings/memcpy.c: Update copyright strings/memset.c: Update copyright strings/r_strinstr.c: Update copyright strings/str2int.c: Update copyright strings/str_test.c: Update copyright strings/strappend.c: Update copyright strings/strcat.c: Update copyright strings/strcend.c: Update copyright strings/strchr.c: Update copyright strings/strcmp.c: Update copyright strings/strcont.c: Update copyright strings/strend.c: Update copyright strings/strfill.c: Update copyright strings/strings-not-used.h: Update copyright strings/strinstr.c: Update copyright strings/strlen.c: Update copyright strings/strmake.c: Update copyright strings/strmov.c: Update copyright strings/strnlen.c: Update copyright strings/strnmov.c: Update copyright strings/strrchr.c: Update copyright strings/strstr.c: Update copyright strings/strto.c: Update copyright strings/strtol.c: Update copyright strings/strtoll.c: Update copyright strings/strtoul.c: Update copyright strings/strtoull.c: Update copyright strings/strxmov.c: Update copyright strings/strxnmov.c: Update copyright strings/t_ctype.h: Update copyright strings/udiv.c: Update copyright tools/mysqlmanager.c: Update copyright vio/test-ssl.c: Update copyright vio/test-sslclient.c: Update copyright vio/test-sslserver.c: Update copyright vio/vio.c: Update copyright vio/viosocket.c: Update copyright vio/viossl.c: Update copyright vio/viosslfactories.c: Update copyright vio/viotest-ssl.c: Update copyright
2001-12-06 13:10:51 +01:00
if (opt_all_in_1)
{
char *tables, *end;
uint tot_length = 0;
while ((row = mysql_fetch_row(res)))
tot_length += strlen(row[0]) + 1;
mysql_data_seek(res, 0);
Update copyright Fixed memory leak on shutdown (Affects the embedded version & MyODBC) client/client_priv.h: Update copyright client/completion_hash.cc: Update copyright client/completion_hash.h: Update copyright client/connect_test.c: Update copyright client/errmsg.c: Update copyright client/get_password.c: Update copyright client/insert_test.c: Update copyright client/list_test.c: Update copyright client/my_readline.h: Update copyright client/mysql.cc: Update copyright client/mysqladmin.c: Update copyright client/mysqlbinlog.cc: Update copyright client/mysqlcheck.c: Update copyright client/mysqldump.c: Update copyright client/mysqlimport.c: Update copyright client/mysqlmanager-pwgen.c: Update copyright client/mysqlmanagerc.c: Update copyright client/mysqlshow.c: Update copyright client/mysqltest.c: Update copyright client/password.c: Update copyright client/readline.cc: Update copyright client/select_test.c: Update copyright client/showdb_test.c: Update copyright client/sql_string.cc: Update copyright client/sql_string.h: Update copyright client/ssl_test.c: Update copyright client/thimble.cc: Update copyright client/thread_test.c: Update copyright div/deadlock_test.c: Update copyright extra/comp_err.c: Update copyright extra/my_print_defaults.c: Update copyright extra/perror.c: Update copyright extra/replace.c: Update copyright extra/resolve_stack_dump.c: Update copyright extra/resolveip.c: Update copyright fs/database.c: Update copyright fs/libmysqlfs.c: Update copyright fs/mysqlcorbafs.c: Update copyright fs/mysqlcorbafs.h: Update copyright fs/mysqlcorbafs_test.c: Update copyright heap/_check.c: Update copyright heap/_rectest.c: Update copyright heap/heapdef.h: Update copyright heap/hp_block.c: Update copyright heap/hp_clear.c: Update copyright heap/hp_close.c: Update copyright heap/hp_create.c: Update copyright heap/hp_delete.c: Update copyright heap/hp_extra.c: Update copyright heap/hp_hash.c: Update copyright heap/hp_info.c: Update copyright heap/hp_open.c: Update copyright heap/hp_panic.c: Update copyright heap/hp_rename.c: Update copyright heap/hp_rfirst.c: Update copyright heap/hp_rkey.c: Update copyright heap/hp_rlast.c: Update copyright heap/hp_rnext.c: Update copyright heap/hp_rprev.c: Update copyright heap/hp_rrnd.c: Update copyright heap/hp_rsame.c: Update copyright heap/hp_scan.c: Update copyright heap/hp_static.c: Update copyright heap/hp_test1.c: Update copyright heap/hp_test2.c: Update copyright heap/hp_update.c: Update copyright heap/hp_write.c: Update copyright include/config-win.h: Update copyright include/dbug.h: Update copyright include/errmsg.h: Update copyright include/ft_global.h: Update copyright include/getopt.h: Update copyright include/hash.h: Update copyright include/heap.h: Update copyright include/m_ctype.h: Update copyright include/m_string.h: Update copyright include/md5.h: Update copyright include/merge.h: Update copyright include/my_alarm.h: Update copyright include/my_base.h: Update copyright include/my_bitmap.h: Update copyright include/my_dir.h: Update copyright include/my_global.h: Update copyright include/my_list.h: Update copyright include/my_net.h: Update copyright include/my_no_pthread.h: Update copyright include/my_nosys.h: Update copyright include/my_pthread.h: Update copyright include/my_sys.h: Update copyright include/my_tree.h: Update copyright include/myisam.h: Update copyright include/myisammrg.h: Update copyright include/myisampack.h: Update copyright include/mysql.h: Update copyright include/mysql_com.h: Update copyright include/mysql_embed.h: Update copyright include/mysqld_error.h: Update copyright include/mysys_err.h: Update copyright include/nisam.h: Update copyright include/queues.h: Update copyright include/raid.h: Update copyright include/sslopt-case.h: Update copyright include/sslopt-longopts.h: Update copyright include/sslopt-usage.h: Update copyright include/sslopt-vars.h: Update copyright include/t_ctype.h: Update copyright include/thr_alarm.h: Update copyright include/thr_lock.h: Update copyright include/violite.h: Update copyright isam/_cache.c: Update copyright isam/_dbug.c: Update copyright isam/_key.c: Update copyright isam/_locking.c: Update copyright isam/_packrec.c: Update copyright isam/_page.c: Update copyright isam/_search.c: Update copyright isam/_statrec.c: Update copyright isam/changed.c: Update copyright isam/close.c: Update copyright isam/create.c: Update copyright isam/delete.c: Update copyright isam/extra.c: Update copyright isam/info.c: Update copyright isam/isamchk.c: Update copyright isam/isamdef.h: Update copyright isam/log.c: Update copyright isam/open.c: Update copyright isam/panic.c: Update copyright isam/range.c: Update copyright isam/rfirst.c: Update copyright isam/rkey.c: Update copyright isam/rlast.c: Update copyright isam/rnext.c: Update copyright isam/rprev.c: Update copyright isam/rrnd.c: Update copyright isam/rsame.c: Update copyright isam/rsamepos.c: Update copyright isam/sort.c: Update copyright isam/static.c: Update copyright isam/test1.c: Update copyright isam/test2.c: Update copyright isam/test3.c: Update copyright isam/update.c: Update copyright isam/write.c: Update copyright libmysql/conf_to_src.c: Update copyright libmysql/dll.c: Update copyright libmysql/errmsg.c: Update copyright libmysql/get_password.c: Update copyright libmysql/libmysql.c: Update copyright libmysql/manager.c: Update copyright libmysql/net.c: Update copyright libmysql/password.c: Update copyright libmysqld/lib_sql.cc: Update copyright libmysqld/lib_vio.c: Update copyright libmysqld/libmysqld.c: Update copyright merge/mrg_close.c: Update copyright merge/mrg_create.c: Update copyright merge/mrg_def.h: Update copyright merge/mrg_delete.c: Update copyright merge/mrg_extra.c: Update copyright merge/mrg_info.c: Update copyright merge/mrg_locking.c: Update copyright merge/mrg_open.c: Update copyright merge/mrg_panic.c: Update copyright merge/mrg_rrnd.c: Update copyright merge/mrg_rsame.c: Update copyright merge/mrg_static.c: Update copyright merge/mrg_update.c: Update copyright myisam/ft_boolean_search.c: Update copyright myisam/ft_dump.c: Update copyright myisam/ft_eval.h: Update copyright myisam/ft_static.c: Update copyright myisam/ft_stem.c: Update copyright myisam/ft_stopwords.c: Update copyright myisam/ft_test1.h: Update copyright myisam/mi_cache.c: Update copyright myisam/mi_changed.c: Update copyright myisam/mi_check.c: Update copyright myisam/mi_checksum.c: Update copyright myisam/mi_close.c: Update copyright myisam/mi_create.c: Update copyright myisam/mi_dbug.c: Update copyright myisam/mi_delete.c: Update copyright myisam/mi_delete_all.c: Update copyright myisam/mi_delete_table.c: Update copyright myisam/mi_dynrec.c: Update copyright myisam/mi_extra.c: Update copyright myisam/mi_info.c: Update copyright myisam/mi_key.c: Update copyright myisam/mi_locking.c: Update copyright myisam/mi_log.c: Update copyright myisam/mi_open.c: Update copyright myisam/mi_packrec.c: Update copyright myisam/mi_page.c: Update copyright myisam/mi_panic.c: Update copyright myisam/mi_range.c: Update copyright myisam/mi_rename.c: Update copyright myisam/mi_rfirst.c: Update copyright myisam/mi_rlast.c: Update copyright myisam/mi_rnext_same.c: Update copyright myisam/mi_rrnd.c: Update copyright myisam/mi_rsame.c: Update copyright myisam/mi_rsamepos.c: Update copyright myisam/mi_scan.c: Update copyright myisam/mi_search.c: Update copyright myisam/mi_static.c: Update copyright myisam/mi_statrec.c: Update copyright myisam/mi_test1.c: Update copyright myisam/mi_test2.c: Update copyright myisam/mi_test3.c: Update copyright myisam/mi_unique.c: Update copyright myisam/mi_update.c: Update copyright myisam/mi_write.c: Update copyright myisam/myisamchk.c: Update copyright myisam/myisampack.c: Update copyright myisammrg/myrg_close.c: Update copyright myisammrg/myrg_create.c: Update copyright myisammrg/myrg_def.h: Update copyright myisammrg/myrg_delete.c: Update copyright myisammrg/myrg_locking.c: Update copyright myisammrg/myrg_open.c: Update copyright myisammrg/myrg_panic.c: Update copyright myisammrg/myrg_rsame.c: Update copyright myisammrg/myrg_static.c: Update copyright myisammrg/myrg_update.c: Update copyright myisammrg/myrg_write.c: Update copyright mysql-test/r/gcc296.result: Update of benchmark results mysql-test/r/innodb.result: Update of benchmark results mysql-test/r/join_outer.result: Update of benchmark results mysql-test/r/myisam.result: Update of benchmark results mysys/array.c: Update copyright mysys/charset.c: Fix for restart of character sets mysys/checksum.c: Update copyright mysys/default.c: Update copyright mysys/errors.c: Update copyright mysys/getopt.c: Cleanup mysys/getvar.c: Update copyright mysys/hash.c: Update copyright mysys/list.c: Update copyright mysys/make-conf.c: Update copyright mysys/md5.c: Update copyright mysys/mf_brkhant.c: Update copyright mysys/mf_cache.c: Update copyright mysys/mf_casecnv.c: Update copyright mysys/mf_dirname.c: Update copyright mysys/mf_fn_ext.c: Update copyright mysys/mf_format.c: Update copyright mysys/mf_getdate.c: Update copyright mysys/mf_iocache.c: Update copyright mysys/mf_iocache2.c: Update copyright mysys/mf_keycache.c: Update copyright mysys/mf_loadpath.c: Update copyright mysys/mf_pack.c: Update copyright mysys/mf_path.c: Update copyright mysys/mf_qsort.c: Update copyright mysys/mf_qsort2.c: Update copyright mysys/mf_radix.c: Update copyright mysys/mf_same.c: Update copyright mysys/mf_sleep.c: Update copyright mysys/mf_sort.c: Update copyright mysys/mf_soundex.c: Update copyright mysys/mf_stripp.c: Update copyright mysys/mf_tempfile.c: Update copyright mysys/mf_unixpath.c: Update copyright mysys/mf_util.c: Update copyright mysys/mf_wcomp.c: Update copyright mysys/mf_wfile.c: Update copyright mysys/mulalloc.c: Update copyright mysys/my_alarm.c: Update copyright mysys/my_alloc.c: Update copyright mysys/my_append.c: Update copyright mysys/my_bit.c: Update copyright mysys/my_bitmap.c: Update copyright mysys/my_chsize.c: Update copyright mysys/my_clock.c: Update copyright mysys/my_compress.c: Update copyright mysys/my_copy.c: Update copyright mysys/my_create.c: Update copyright mysys/my_delete.c: Update copyright mysys/my_div.c: Update copyright mysys/my_dup.c: Update copyright mysys/my_error.c: Update copyright mysys/my_fopen.c: Update copyright mysys/my_fstream.c: Update copyright mysys/my_getwd.c: Update copyright mysys/my_init.c: Free 'once_alloc' memory at shutdown. mysys/my_lib.c: Update copyright mysys/my_lock.c: Update copyright mysys/my_lockmem.c: Update copyright mysys/my_lread.c: Update copyright mysys/my_lwrite.c: Update copyright mysys/my_malloc.c: Update copyright mysys/my_messnc.c: Update copyright mysys/my_mkdir.c: Update copyright mysys/my_net.c: Update copyright mysys/my_once.c: Update copyright mysys/my_open.c: Update copyright mysys/my_pread.c: Update copyright mysys/my_pthread.c: Update copyright mysys/my_quick.c: Update copyright mysys/my_read.c: Update copyright mysys/my_realloc.c: Update copyright mysys/my_redel.c: Update copyright mysys/my_rename.c: Update copyright mysys/my_seek.c: Update copyright mysys/my_static.c: Update copyright mysys/my_static.h: Update copyright mysys/my_symlink.c: Update copyright mysys/my_symlink2.c: Update copyright mysys/my_tempnam.c: Update copyright mysys/my_thr_init.c: Update copyright mysys/my_vsnprintf.c: Update copyright mysys/my_wincond.c: Update copyright mysys/my_winthread.c: Update copyright mysys/my_write.c: Update copyright mysys/mysys_priv.h: Update copyright mysys/ptr_cmp.c: Update copyright mysys/queues.c: Update copyright mysys/raid.cc: Update copyright mysys/safemalloc.c: Update copyright mysys/string.c: Update copyright mysys/test_charset.c: Update copyright mysys/test_dir.c: Update copyright mysys/test_fn.c: Update copyright mysys/testhash.c: Update copyright mysys/thr_alarm.c: Update copyright mysys/thr_lock.c: Update copyright mysys/thr_mutex.c: Update copyright mysys/thr_rwlock.c: Update copyright mysys/tree.c: Update copyright mysys/typelib.c: Update copyright pstack/debug.c: Update copyright pstack/debug.h: Update copyright pstack/demangle.h: Update copyright pstack/ieee.c: Update copyright pstack/ieee.h: Update copyright pstack/pstack.c: Update copyright readline/bind.c: Cleanup empty lines readline/complete.c: Cleanup empty lines readline/display.c: Cleanup empty lines readline/funmap.c: Cleanup empty lines readline/histexpand.c: Cleanup empty lines readline/histfile.c: Cleanup empty lines readline/history.c: Cleanup empty lines readline/history.h: Cleanup empty lines readline/input.c: Cleanup empty lines readline/kill.c: Cleanup empty lines readline/readline.c: Cleanup empty lines readline/readline.h: Cleanup empty lines readline/vi_mode.c: Cleanup empty lines sql/cache_manager.cc: Update copyright sql/cache_manager.h: Update copyright sql/convert.cc: Update copyright sql/custom_conf.h: Update copyright sql/derror.cc: Update copyright sql/field.cc: Update copyright sql/field.h: Update copyright sql/field_conv.cc: Update copyright sql/filesort.cc: Update copyright sql/frm_crypt.cc: Update copyright sql/ha_berkeley.cc: Update copyright sql/ha_heap.cc: Update copyright sql/ha_heap.h: Update copyright sql/ha_innobase.cc: Update copyright sql/ha_isam.cc: Update copyright sql/ha_isam.h: Update copyright sql/ha_isammrg.cc: Update copyright sql/ha_isammrg.h: Update copyright sql/ha_myisam.cc: Update copyright sql/handler.cc: Update copyright sql/hash_filo.cc: Update copyright sql/hash_filo.h: Update copyright sql/hostname.cc: Update copyright sql/init.cc: Update copyright sql/item.cc: Update copyright sql/item.h: Update copyright sql/item_buff.cc: Update copyright sql/item_cmpfunc.cc: Update copyright sql/item_cmpfunc.h: Update copyright sql/item_create.cc: Update copyright sql/item_create.h: Update copyright sql/item_func.cc: Update copyright sql/item_strfunc.cc: Update copyright sql/item_sum.cc: Update copyright sql/item_sum.h: Update copyright sql/item_timefunc.cc: Update copyright sql/item_timefunc.h: Update copyright sql/item_uniq.cc: Update copyright sql/item_uniq.h: Update copyright sql/key.cc: Update copyright sql/lex_symbol.h: Update copyright sql/lock.cc: Update copyright sql/log.cc: Update copyright sql/log_event.cc: Update copyright sql/log_event.h: Update copyright sql/matherr.c: Update copyright sql/mf_iocache.cc: Update copyright sql/mini_client.cc: Update copyright sql/mini_client.h: Update copyright sql/my_lock.c: Update copyright sql/mysqld.cc: Update copyright sql/net_pkg.cc: Update copyright sql/net_serv.cc: Update copyright sql/opt_sum.cc: Update copyright sql/password.c: Update copyright sql/procedure.cc: Update copyright sql/procedure.h: Update copyright sql/records.cc: Update copyright sql/repl_failsafe.cc: Update copyright sql/slave.cc: Update copyright sql/slave.h: Update copyright sql/sql_acl.cc: Update copyright sql/sql_acl.h: Update copyright sql/sql_analyse.cc: Update copyright sql/sql_analyse.h: Update copyright sql/sql_base.cc: Update copyright sql/sql_cache.cc: Update copyright sql/sql_class.cc: Update copyright sql/sql_class.h: Update copyright sql/sql_crypt.cc: Update copyright sql/sql_crypt.h: Update copyright sql/sql_db.cc: Update copyright sql/sql_delete.cc: Update copyright sql/sql_handler.cc: Update copyright sql/sql_insert.cc: Update copyright sql/sql_lex.cc: Update copyright sql/sql_lex.h: Update copyright sql/sql_list.cc: Update copyright sql/sql_list.h: Update copyright sql/sql_load.cc: Update copyright sql/sql_map.cc: Update copyright sql/sql_map.h: Update copyright sql/sql_parse.cc: Update copyright sql/sql_rename.cc: Update copyright sql/sql_repl.cc: Update copyright sql/sql_select.h: Update copyright sql/sql_string.cc: Update copyright sql/sql_string.h: Update copyright sql/sql_table.cc: Update copyright sql/sql_test.cc: Update copyright sql/sql_udf.cc: Update copyright sql/sql_udf.h: Update copyright sql/stacktrace.c: Update copyright sql/structs.h: Update copyright sql/table.cc: Update copyright sql/table.h: Update copyright sql/thr_malloc.cc: Update copyright sql/time.cc: Update copyright sql/udf_example.cc: Update copyright sql/uniques.cc: Update copyright sql/unireg.cc: Update copyright sql/unireg.h: Update copyright strings/atof.c: Update copyright strings/bchange.c: Update copyright strings/bcmp.c: Update copyright strings/bcopy-duff.c: Update copyright strings/bfill.c: Update copyright strings/bmove.c: Update copyright strings/bmove512.c: Update copyright strings/bmove_upp.c: Update copyright strings/bzero.c: Update copyright strings/conf_to_src.c: Update copyright strings/ctype-big5.c: Update copyright strings/ctype-czech.c: Update copyright strings/ctype-euc_kr.c: Update copyright strings/ctype-gb2312.c: Update copyright strings/ctype-gbk.c: Update copyright strings/ctype-latin1_de.c: Update copyright strings/ctype-sjis.c: Update copyright strings/ctype-tis620.c: Update copyright strings/ctype-ujis.c: Update copyright strings/ctype.c: Update copyright strings/do_ctype.c: Update copyright strings/int2str.c: Update copyright strings/is_prefix.c: Update copyright strings/llstr.c: Update copyright strings/longlong2str.c: Update copyright strings/memcmp.c: Update copyright strings/memcpy.c: Update copyright strings/memset.c: Update copyright strings/r_strinstr.c: Update copyright strings/str2int.c: Update copyright strings/str_test.c: Update copyright strings/strappend.c: Update copyright strings/strcat.c: Update copyright strings/strcend.c: Update copyright strings/strchr.c: Update copyright strings/strcmp.c: Update copyright strings/strcont.c: Update copyright strings/strend.c: Update copyright strings/strfill.c: Update copyright strings/strings-not-used.h: Update copyright strings/strinstr.c: Update copyright strings/strlen.c: Update copyright strings/strmake.c: Update copyright strings/strmov.c: Update copyright strings/strnlen.c: Update copyright strings/strnmov.c: Update copyright strings/strrchr.c: Update copyright strings/strstr.c: Update copyright strings/strto.c: Update copyright strings/strtol.c: Update copyright strings/strtoll.c: Update copyright strings/strtoul.c: Update copyright strings/strtoull.c: Update copyright strings/strxmov.c: Update copyright strings/strxnmov.c: Update copyright strings/t_ctype.h: Update copyright strings/udiv.c: Update copyright tools/mysqlmanager.c: Update copyright vio/test-ssl.c: Update copyright vio/test-sslclient.c: Update copyright vio/test-sslserver.c: Update copyright vio/vio.c: Update copyright vio/viosocket.c: Update copyright vio/viossl.c: Update copyright vio/viosslfactories.c: Update copyright vio/viotest-ssl.c: Update copyright
2001-12-06 13:10:51 +01:00
if (!(tables=(char *) my_malloc(sizeof(char)*tot_length+1, MYF(MY_WME))))
{
mysql_free_result(res);
return 1;
}
for (end = tables + 1; (row = mysql_fetch_row(res)) ;)
{
end = strmov(end, row[0]);
*end++= ',';
}
*--end = 0;
if (tot_length)
handle_request_for_tables(tables + 1, tot_length - 1);
my_free(tables, MYF(0));
}
else
{
while ((row = mysql_fetch_row(res)))
handle_request_for_tables(row[0], strlen(row[0]));
}
mysql_free_result(res);
return 0;
} /* process_all_tables_in_db */
static int use_db(char *database)
{
if (mysql_select_db(sock, database))
{
DBerror(sock, "when selecting the database");
return 1;
}
return 0;
} /* use_db */
static int handle_request_for_tables(char *tables, uint length)
{
Fixed bug in mysqlcheck when using --fast Fixed problem when converting bigint to double. Fixed bug in count(distinct null) Fixed bug with empty BDB tables. BitKeeper/deleted/.del-ATIS-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg~dd306b2e583ebde4: Delete: sql-bench/Results/ATIS-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg BitKeeper/deleted/.del-RUN-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg~11038a44f73070e7: Delete: sql-bench/Results/RUN-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg BitKeeper/deleted/.del-alter-table-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg~662b96bc66bc91b6: Delete: sql-bench/Results/alter-table-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg BitKeeper/deleted/.del-big-tables-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg~788ad492867b1226: Delete: sql-bench/Results/big-tables-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg BitKeeper/deleted/.del-connect-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg~5316add301edb60: Delete: sql-bench/Results/connect-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg BitKeeper/deleted/.del-create-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg~26e09af61f88d8c9: Delete: sql-bench/Results/create-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg BitKeeper/deleted/.del-insert-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg~fd2699adb3190d07: Delete: sql-bench/Results/insert-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg BitKeeper/deleted/.del-select-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg~b01175ad38fd12b6: Delete: sql-bench/Results/select-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg BitKeeper/deleted/.del-wisconsin-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg~8ba598d217450157: Delete: sql-bench/Results/wisconsin-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg Docs/manual.texi: Changelog + update to Linux section client/mysqlcheck.c: Fixed bug when using --fast --check --auto-repair --fast will not anymore repair tables that had warnings but where ok. mysql-test/r/bdb.result: New test case mysql-test/r/bigint.result: New test case mysql-test/r/count_distinct.result: New test case mysql-test/t/bdb.test: New test case mysql-test/t/bigint.test: New test case mysql-test/t/count_distinct.test: New test case sql-bench/Comments/postgres.benchmark: Update for PostgreSQL 7.1.2 sql-bench/graph-compare-results.sh: Fixed colors for mysql --fast tests sql/field.cc: Fixed problem when converting bigint to double. sql/item_sum.cc: Fixed bug in count(distinct null) sql/item_sum.h: Fixed bug in count(distinct null) sql/mysqlbinlog.cc: Fixed typo sql/sql_base.cc: cleanup sql/sql_select.cc: Fixed bug with empty BDB tables. sql/time.cc: Removed warning when reading timestamps with sub seconds.
2001-06-19 13:30:12 +02:00
char *query, *end, options[100], message[100];
const char *op = 0;
options[0] = 0;
Fixed bug in mysqlcheck when using --fast Fixed problem when converting bigint to double. Fixed bug in count(distinct null) Fixed bug with empty BDB tables. BitKeeper/deleted/.del-ATIS-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg~dd306b2e583ebde4: Delete: sql-bench/Results/ATIS-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg BitKeeper/deleted/.del-RUN-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg~11038a44f73070e7: Delete: sql-bench/Results/RUN-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg BitKeeper/deleted/.del-alter-table-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg~662b96bc66bc91b6: Delete: sql-bench/Results/alter-table-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg BitKeeper/deleted/.del-big-tables-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg~788ad492867b1226: Delete: sql-bench/Results/big-tables-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg BitKeeper/deleted/.del-connect-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg~5316add301edb60: Delete: sql-bench/Results/connect-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg BitKeeper/deleted/.del-create-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg~26e09af61f88d8c9: Delete: sql-bench/Results/create-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg BitKeeper/deleted/.del-insert-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg~fd2699adb3190d07: Delete: sql-bench/Results/insert-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg BitKeeper/deleted/.del-select-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg~b01175ad38fd12b6: Delete: sql-bench/Results/select-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg BitKeeper/deleted/.del-wisconsin-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg~8ba598d217450157: Delete: sql-bench/Results/wisconsin-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg Docs/manual.texi: Changelog + update to Linux section client/mysqlcheck.c: Fixed bug when using --fast --check --auto-repair --fast will not anymore repair tables that had warnings but where ok. mysql-test/r/bdb.result: New test case mysql-test/r/bigint.result: New test case mysql-test/r/count_distinct.result: New test case mysql-test/t/bdb.test: New test case mysql-test/t/bigint.test: New test case mysql-test/t/count_distinct.test: New test case sql-bench/Comments/postgres.benchmark: Update for PostgreSQL 7.1.2 sql-bench/graph-compare-results.sh: Fixed colors for mysql --fast tests sql/field.cc: Fixed problem when converting bigint to double. sql/item_sum.cc: Fixed bug in count(distinct null) sql/item_sum.h: Fixed bug in count(distinct null) sql/mysqlbinlog.cc: Fixed typo sql/sql_base.cc: cleanup sql/sql_select.cc: Fixed bug with empty BDB tables. sql/time.cc: Removed warning when reading timestamps with sub seconds.
2001-06-19 13:30:12 +02:00
end = options;
switch (what_to_do) {
case DO_CHECK:
op = "CHECK";
Fixed bug in mysqlcheck when using --fast Fixed problem when converting bigint to double. Fixed bug in count(distinct null) Fixed bug with empty BDB tables. BitKeeper/deleted/.del-ATIS-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg~dd306b2e583ebde4: Delete: sql-bench/Results/ATIS-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg BitKeeper/deleted/.del-RUN-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg~11038a44f73070e7: Delete: sql-bench/Results/RUN-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg BitKeeper/deleted/.del-alter-table-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg~662b96bc66bc91b6: Delete: sql-bench/Results/alter-table-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg BitKeeper/deleted/.del-big-tables-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg~788ad492867b1226: Delete: sql-bench/Results/big-tables-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg BitKeeper/deleted/.del-connect-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg~5316add301edb60: Delete: sql-bench/Results/connect-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg BitKeeper/deleted/.del-create-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg~26e09af61f88d8c9: Delete: sql-bench/Results/create-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg BitKeeper/deleted/.del-insert-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg~fd2699adb3190d07: Delete: sql-bench/Results/insert-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg BitKeeper/deleted/.del-select-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg~b01175ad38fd12b6: Delete: sql-bench/Results/select-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg BitKeeper/deleted/.del-wisconsin-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg~8ba598d217450157: Delete: sql-bench/Results/wisconsin-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg Docs/manual.texi: Changelog + update to Linux section client/mysqlcheck.c: Fixed bug when using --fast --check --auto-repair --fast will not anymore repair tables that had warnings but where ok. mysql-test/r/bdb.result: New test case mysql-test/r/bigint.result: New test case mysql-test/r/count_distinct.result: New test case mysql-test/t/bdb.test: New test case mysql-test/t/bigint.test: New test case mysql-test/t/count_distinct.test: New test case sql-bench/Comments/postgres.benchmark: Update for PostgreSQL 7.1.2 sql-bench/graph-compare-results.sh: Fixed colors for mysql --fast tests sql/field.cc: Fixed problem when converting bigint to double. sql/item_sum.cc: Fixed bug in count(distinct null) sql/item_sum.h: Fixed bug in count(distinct null) sql/mysqlbinlog.cc: Fixed typo sql/sql_base.cc: cleanup sql/sql_select.cc: Fixed bug with empty BDB tables. sql/time.cc: Removed warning when reading timestamps with sub seconds.
2001-06-19 13:30:12 +02:00
if (opt_quick) end = strmov(end, " QUICK");
if (opt_fast) end = strmov(end, " FAST");
if (opt_medium_check) end = strmov(end, " MEDIUM"); /* Default */
if (opt_extended) end = strmov(end, " EXTENDED");
if (opt_check_only_changed) end = strmov(end, " CHANGED");
break;
case DO_REPAIR:
op = "REPAIR";
Fixed bug in mysqlcheck when using --fast Fixed problem when converting bigint to double. Fixed bug in count(distinct null) Fixed bug with empty BDB tables. BitKeeper/deleted/.del-ATIS-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg~dd306b2e583ebde4: Delete: sql-bench/Results/ATIS-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg BitKeeper/deleted/.del-RUN-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg~11038a44f73070e7: Delete: sql-bench/Results/RUN-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg BitKeeper/deleted/.del-alter-table-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg~662b96bc66bc91b6: Delete: sql-bench/Results/alter-table-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg BitKeeper/deleted/.del-big-tables-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg~788ad492867b1226: Delete: sql-bench/Results/big-tables-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg BitKeeper/deleted/.del-connect-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg~5316add301edb60: Delete: sql-bench/Results/connect-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg BitKeeper/deleted/.del-create-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg~26e09af61f88d8c9: Delete: sql-bench/Results/create-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg BitKeeper/deleted/.del-insert-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg~fd2699adb3190d07: Delete: sql-bench/Results/insert-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg BitKeeper/deleted/.del-select-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg~b01175ad38fd12b6: Delete: sql-bench/Results/select-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg BitKeeper/deleted/.del-wisconsin-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg~8ba598d217450157: Delete: sql-bench/Results/wisconsin-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg Docs/manual.texi: Changelog + update to Linux section client/mysqlcheck.c: Fixed bug when using --fast --check --auto-repair --fast will not anymore repair tables that had warnings but where ok. mysql-test/r/bdb.result: New test case mysql-test/r/bigint.result: New test case mysql-test/r/count_distinct.result: New test case mysql-test/t/bdb.test: New test case mysql-test/t/bigint.test: New test case mysql-test/t/count_distinct.test: New test case sql-bench/Comments/postgres.benchmark: Update for PostgreSQL 7.1.2 sql-bench/graph-compare-results.sh: Fixed colors for mysql --fast tests sql/field.cc: Fixed problem when converting bigint to double. sql/item_sum.cc: Fixed bug in count(distinct null) sql/item_sum.h: Fixed bug in count(distinct null) sql/mysqlbinlog.cc: Fixed typo sql/sql_base.cc: cleanup sql/sql_select.cc: Fixed bug with empty BDB tables. sql/time.cc: Removed warning when reading timestamps with sub seconds.
2001-06-19 13:30:12 +02:00
if (opt_quick) end = strmov(end, " QUICK");
if (opt_extended) end = strmov(end, " EXTENDED");
break;
case DO_ANALYZE:
op = "ANALYZE";
break;
case DO_OPTIMIZE:
op = "OPTIMIZE";
break;
}
if (!(query =(char *) my_malloc((sizeof(char)*(length+110)), MYF(MY_WME))))
return 1;
sprintf(query, "%s TABLE `%s` %s", op, tables, options);
if (mysql_query(sock, query))
{
sprintf(message, "when executing '%s TABLE `%s` %s", op, tables,options);
Fixed bug in mysqlcheck when using --fast Fixed problem when converting bigint to double. Fixed bug in count(distinct null) Fixed bug with empty BDB tables. BitKeeper/deleted/.del-ATIS-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg~dd306b2e583ebde4: Delete: sql-bench/Results/ATIS-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg BitKeeper/deleted/.del-RUN-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg~11038a44f73070e7: Delete: sql-bench/Results/RUN-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg BitKeeper/deleted/.del-alter-table-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg~662b96bc66bc91b6: Delete: sql-bench/Results/alter-table-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg BitKeeper/deleted/.del-big-tables-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg~788ad492867b1226: Delete: sql-bench/Results/big-tables-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg BitKeeper/deleted/.del-connect-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg~5316add301edb60: Delete: sql-bench/Results/connect-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg BitKeeper/deleted/.del-create-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg~26e09af61f88d8c9: Delete: sql-bench/Results/create-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg BitKeeper/deleted/.del-insert-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg~fd2699adb3190d07: Delete: sql-bench/Results/insert-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg BitKeeper/deleted/.del-select-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg~b01175ad38fd12b6: Delete: sql-bench/Results/select-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg BitKeeper/deleted/.del-wisconsin-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg~8ba598d217450157: Delete: sql-bench/Results/wisconsin-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg Docs/manual.texi: Changelog + update to Linux section client/mysqlcheck.c: Fixed bug when using --fast --check --auto-repair --fast will not anymore repair tables that had warnings but where ok. mysql-test/r/bdb.result: New test case mysql-test/r/bigint.result: New test case mysql-test/r/count_distinct.result: New test case mysql-test/t/bdb.test: New test case mysql-test/t/bigint.test: New test case mysql-test/t/count_distinct.test: New test case sql-bench/Comments/postgres.benchmark: Update for PostgreSQL 7.1.2 sql-bench/graph-compare-results.sh: Fixed colors for mysql --fast tests sql/field.cc: Fixed problem when converting bigint to double. sql/item_sum.cc: Fixed bug in count(distinct null) sql/item_sum.h: Fixed bug in count(distinct null) sql/mysqlbinlog.cc: Fixed typo sql/sql_base.cc: cleanup sql/sql_select.cc: Fixed bug with empty BDB tables. sql/time.cc: Removed warning when reading timestamps with sub seconds.
2001-06-19 13:30:12 +02:00
DBerror(sock, message);
return 1;
}
print_result();
my_free(query, MYF(0));
return 0;
}
static void print_result()
{
MYSQL_RES *res;
MYSQL_ROW row;
char prev[NAME_LEN*2+2];
Fixed bug in mysqlcheck when using --fast Fixed problem when converting bigint to double. Fixed bug in count(distinct null) Fixed bug with empty BDB tables. BitKeeper/deleted/.del-ATIS-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg~dd306b2e583ebde4: Delete: sql-bench/Results/ATIS-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg BitKeeper/deleted/.del-RUN-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg~11038a44f73070e7: Delete: sql-bench/Results/RUN-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg BitKeeper/deleted/.del-alter-table-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg~662b96bc66bc91b6: Delete: sql-bench/Results/alter-table-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg BitKeeper/deleted/.del-big-tables-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg~788ad492867b1226: Delete: sql-bench/Results/big-tables-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg BitKeeper/deleted/.del-connect-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg~5316add301edb60: Delete: sql-bench/Results/connect-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg BitKeeper/deleted/.del-create-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg~26e09af61f88d8c9: Delete: sql-bench/Results/create-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg BitKeeper/deleted/.del-insert-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg~fd2699adb3190d07: Delete: sql-bench/Results/insert-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg BitKeeper/deleted/.del-select-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg~b01175ad38fd12b6: Delete: sql-bench/Results/select-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg BitKeeper/deleted/.del-wisconsin-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg~8ba598d217450157: Delete: sql-bench/Results/wisconsin-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg Docs/manual.texi: Changelog + update to Linux section client/mysqlcheck.c: Fixed bug when using --fast --check --auto-repair --fast will not anymore repair tables that had warnings but where ok. mysql-test/r/bdb.result: New test case mysql-test/r/bigint.result: New test case mysql-test/r/count_distinct.result: New test case mysql-test/t/bdb.test: New test case mysql-test/t/bigint.test: New test case mysql-test/t/count_distinct.test: New test case sql-bench/Comments/postgres.benchmark: Update for PostgreSQL 7.1.2 sql-bench/graph-compare-results.sh: Fixed colors for mysql --fast tests sql/field.cc: Fixed problem when converting bigint to double. sql/item_sum.cc: Fixed bug in count(distinct null) sql/item_sum.h: Fixed bug in count(distinct null) sql/mysqlbinlog.cc: Fixed typo sql/sql_base.cc: cleanup sql/sql_select.cc: Fixed bug with empty BDB tables. sql/time.cc: Removed warning when reading timestamps with sub seconds.
2001-06-19 13:30:12 +02:00
uint i;
my_bool found_error=0;
res = mysql_use_result(sock);
prev[0] = '\0';
for (i = 0; (row = mysql_fetch_row(res)); i++)
{
int changed = strcmp(prev, row[0]);
Fixed bug in mysqlcheck when using --fast Fixed problem when converting bigint to double. Fixed bug in count(distinct null) Fixed bug with empty BDB tables. BitKeeper/deleted/.del-ATIS-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg~dd306b2e583ebde4: Delete: sql-bench/Results/ATIS-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg BitKeeper/deleted/.del-RUN-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg~11038a44f73070e7: Delete: sql-bench/Results/RUN-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg BitKeeper/deleted/.del-alter-table-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg~662b96bc66bc91b6: Delete: sql-bench/Results/alter-table-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg BitKeeper/deleted/.del-big-tables-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg~788ad492867b1226: Delete: sql-bench/Results/big-tables-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg BitKeeper/deleted/.del-connect-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg~5316add301edb60: Delete: sql-bench/Results/connect-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg BitKeeper/deleted/.del-create-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg~26e09af61f88d8c9: Delete: sql-bench/Results/create-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg BitKeeper/deleted/.del-insert-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg~fd2699adb3190d07: Delete: sql-bench/Results/insert-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg BitKeeper/deleted/.del-select-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg~b01175ad38fd12b6: Delete: sql-bench/Results/select-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg BitKeeper/deleted/.del-wisconsin-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg~8ba598d217450157: Delete: sql-bench/Results/wisconsin-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg Docs/manual.texi: Changelog + update to Linux section client/mysqlcheck.c: Fixed bug when using --fast --check --auto-repair --fast will not anymore repair tables that had warnings but where ok. mysql-test/r/bdb.result: New test case mysql-test/r/bigint.result: New test case mysql-test/r/count_distinct.result: New test case mysql-test/t/bdb.test: New test case mysql-test/t/bigint.test: New test case mysql-test/t/count_distinct.test: New test case sql-bench/Comments/postgres.benchmark: Update for PostgreSQL 7.1.2 sql-bench/graph-compare-results.sh: Fixed colors for mysql --fast tests sql/field.cc: Fixed problem when converting bigint to double. sql/item_sum.cc: Fixed bug in count(distinct null) sql/item_sum.h: Fixed bug in count(distinct null) sql/mysqlbinlog.cc: Fixed typo sql/sql_base.cc: cleanup sql/sql_select.cc: Fixed bug with empty BDB tables. sql/time.cc: Removed warning when reading timestamps with sub seconds.
2001-06-19 13:30:12 +02:00
my_bool status = !strcmp(row[2], "status");
if (status)
{
if (found_error)
{
if (what_to_do != DO_REPAIR && opt_auto_repair &&
(!opt_fast || strcmp(row[3],"OK")))
insert_dynamic(&tables4repair, row[0]);
}
found_error=0;
if (opt_silent)
continue;
}
if (status && changed)
printf("%-50s %s", row[0], row[3]);
else if (!status && changed)
{
printf("%s\n%-9s: %s", row[0], row[2], row[3]);
Fixed bug in mysqlcheck when using --fast Fixed problem when converting bigint to double. Fixed bug in count(distinct null) Fixed bug with empty BDB tables. BitKeeper/deleted/.del-ATIS-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg~dd306b2e583ebde4: Delete: sql-bench/Results/ATIS-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg BitKeeper/deleted/.del-RUN-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg~11038a44f73070e7: Delete: sql-bench/Results/RUN-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg BitKeeper/deleted/.del-alter-table-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg~662b96bc66bc91b6: Delete: sql-bench/Results/alter-table-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg BitKeeper/deleted/.del-big-tables-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg~788ad492867b1226: Delete: sql-bench/Results/big-tables-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg BitKeeper/deleted/.del-connect-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg~5316add301edb60: Delete: sql-bench/Results/connect-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg BitKeeper/deleted/.del-create-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg~26e09af61f88d8c9: Delete: sql-bench/Results/create-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg BitKeeper/deleted/.del-insert-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg~fd2699adb3190d07: Delete: sql-bench/Results/insert-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg BitKeeper/deleted/.del-select-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg~b01175ad38fd12b6: Delete: sql-bench/Results/select-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg BitKeeper/deleted/.del-wisconsin-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg~8ba598d217450157: Delete: sql-bench/Results/wisconsin-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg Docs/manual.texi: Changelog + update to Linux section client/mysqlcheck.c: Fixed bug when using --fast --check --auto-repair --fast will not anymore repair tables that had warnings but where ok. mysql-test/r/bdb.result: New test case mysql-test/r/bigint.result: New test case mysql-test/r/count_distinct.result: New test case mysql-test/t/bdb.test: New test case mysql-test/t/bigint.test: New test case mysql-test/t/count_distinct.test: New test case sql-bench/Comments/postgres.benchmark: Update for PostgreSQL 7.1.2 sql-bench/graph-compare-results.sh: Fixed colors for mysql --fast tests sql/field.cc: Fixed problem when converting bigint to double. sql/item_sum.cc: Fixed bug in count(distinct null) sql/item_sum.h: Fixed bug in count(distinct null) sql/mysqlbinlog.cc: Fixed typo sql/sql_base.cc: cleanup sql/sql_select.cc: Fixed bug with empty BDB tables. sql/time.cc: Removed warning when reading timestamps with sub seconds.
2001-06-19 13:30:12 +02:00
found_error=1;
}
else
printf("%-9s: %s", row[2], row[3]);
strmov(prev, row[0]);
putchar('\n');
}
mysql_free_result(res);
}
static int dbConnect(char *host, char *user, char *passwd)
{
DBUG_ENTER("dbConnect");
if (verbose)
{
fprintf(stderr, "# Connecting to %s...\n", host ? host : "localhost");
}
mysql_init(&mysql_connection);
if (opt_compress)
mysql_options(&mysql_connection, MYSQL_OPT_COMPRESS, NullS);
#ifdef HAVE_OPENSSL
if (opt_ssl_key || opt_ssl_cert || opt_ssl_ca || opt_ssl_capath ||
opt_ssl_cipher)
opt_use_ssl= 1;
if (opt_use_ssl)
mysql_ssl_set(&mysql_connection, opt_ssl_key, opt_ssl_cert, opt_ssl_ca,
SSL compiles and works as far as can see. Continue testing.. Docs/manual.ja.texi: e-mail address fixed include/mysqld_error.h: Added 3 new errormessages related to SSL mysql-test/install_test_db.sh: SSL fix scripts/mysql_install_db.sh: mysql.user table changes to conform SSL ACL sql/lex.h: Fixed GRANT+SSL clause sql/share/czech/errmsg.txt: Added 3 new errormessages related to SSL sql/share/danish/errmsg.txt: Added 3 new errormessages related to SSL sql/share/dutch/errmsg.txt: Added 3 new errormessages related to SSL sql/share/english/errmsg.txt: Added 3 new errormessages related to SSL sql/share/estonian/errmsg.txt: Added 3 new errormessages related to SSL sql/share/french/errmsg.txt: Added 3 new errormessages related to SSL sql/share/german/errmsg.txt: Added 3 new errormessages related to SSL sql/share/greek/errmsg.txt: Added 3 new errormessages related to SSL sql/share/hungarian/errmsg.txt: Added 3 new errormessages related to SSL sql/share/italian/errmsg.txt: Added 3 new errormessages related to SSL sql/share/japanese/errmsg.txt: Added 3 new errormessages related to SSL sql/share/korean/errmsg.txt: Added 3 new errormessages related to SSL sql/share/norwegian-ny/errmsg.txt: Added 3 new errormessages related to SSL sql/share/norwegian/errmsg.txt: Added 3 new errormessages related to SSL sql/share/polish/errmsg.txt: Added 3 new errormessages related to SSL sql/share/portuguese/errmsg.txt: Added 3 new errormessages related to SSL sql/share/romanian/errmsg.txt: Added 3 new errormessages related to SSL sql/share/russian/errmsg.txt: Added 3 new errormessages related to SSL sql/share/slovak/errmsg.txt: Added 3 new errormessages related to SSL sql/share/spanish/errmsg.txt: Added 3 new errormessages related to SSL sql/share/swedish/errmsg.txt: Added 3 new errormessages related to SSL sql/share/ukrainian/errmsg.txt: Added 3 new errormessages related to SSL Docs/manual.texi: SSL fixes BUILD/compile-pentium-max: SSL was missing here acinclude.m4: typo fix alignment fix client/mysql.cc: SSL fixes client/mysqladmin.c: SSL fixes client/mysqlcheck.c: SSL fixes client/mysqldump.c: SSL fixes client/mysqlimport.c: SSL fixes client/mysqlshow.c: SSL fixes include/mysql.h: SSL fixes include/sslopt-case.h: SSL fixes include/sslopt-longopts.h: SSL fixes include/sslopt-usage.h: SSL fixes include/sslopt-vars.h: SSL fixes include/violite.h: SSL fixes cleanups libmysql/libmysql.c: SSL fixes libmysqld/lib_sql.cc: SSL fixes sql/mini_client.cc: SSL fixes sql/mysqld.cc: SSL fixes cleanup new variables to SHOW STATUS sql/sql_acl.cc: SSL fixes sql/sql_acl.h: SSL fixes sql/sql_lex.h: SSL fixes sql/sql_parse.cc: SSL fixes sql/sql_show.cc: New functions added sql/structs.h: New functions added vio/test-ssl.c: SSL fixes vio/test-sslclient.c: SSL fixes vio/test-sslserver.c: SSL fixes vio/viosocket.c: SSL fixes vio/viossl.c: SSL fixes cleanup vio/viosslfactories.c: SSL fixes sql/sql_yacc.yy: SSL fixes
2001-09-30 04:46:20 +02:00
opt_ssl_capath, opt_ssl_cipher);
#endif
if (!(sock = mysql_real_connect(&mysql_connection, host, user, passwd,
NULL, opt_mysql_port, opt_mysql_unix_port, 0)))
{
DBerror(&mysql_connection, "when trying to connect");
return 1;
}
return 0;
} /* dbConnect */
static void dbDisconnect(char *host)
{
if (verbose)
fprintf(stderr, "# Disconnecting from %s...\n", host ? host : "localhost");
mysql_close(sock);
} /* dbDisconnect */
static void DBerror(MYSQL *mysql, const char *when)
{
DBUG_ENTER("DBerror");
my_printf_error(0,"Got error: %d: %s %s", MYF(0),
mysql_errno(mysql), mysql_error(mysql), when);
safe_exit(EX_MYSQLERR);
DBUG_VOID_RETURN;
} /* DBerror */
static void safe_exit(int error)
{
if (!first_error)
first_error= error;
if (ignore_errors)
return;
if (sock)
mysql_close(sock);
exit(error);
}
int main(int argc, char **argv)
{
MY_INIT(argv[0]);
/*
** Check out the args
*/
if (get_options(&argc, &argv))
{
my_end(0);
exit(EX_USAGE);
}
if (dbConnect(current_host, current_user, opt_password))
exit(EX_MYSQLERR);
if (opt_auto_repair &&
my_init_dynamic_array(&tables4repair, sizeof(char)*(NAME_LEN*2+2),16,64))
{
first_error = 1;
goto end;
}
if (opt_alldbs)
process_all_databases();
/* Only one database and selected table(s) */
else if (argc > 1 && !opt_databases)
process_selected_tables(*argv, (argv + 1), (argc - 1));
/* One or more databases, all tables */
else
process_databases(argv);
if (opt_auto_repair)
{
uint i;
if (!opt_silent && tables4repair.elements)
puts("\nRepairing tables");
what_to_do = DO_REPAIR;
for (i = 0; i < tables4repair.elements ; i++)
{
char *name= (char*) dynamic_array_ptr(&tables4repair, i);
handle_request_for_tables(name, strlen(name));
}
}
end:
dbDisconnect(current_host);
if (opt_auto_repair)
delete_dynamic(&tables4repair);
my_free(opt_password, MYF(MY_ALLOW_ZERO_PTR));
my_end(0);
return(first_error!=0);
} /* main */