mariadb/sql/sql_rename.cc

183 lines
4.6 KiB
C++
Raw Normal View History

/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult 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 */
/*
Atomic rename of table; RENAME TABLE t1 to t2, tmp to t1 [,...]
*/
#include "mysql_priv.h"
FLUSH TABLE table_list Fixes for RENAME TABLE Portability fixes Docs/manual.texi: FLUSH TABLES table_list client/mysql.cc: Ia64 port client/mysqladmin.c: Ia64 port client/mysqldump.c: Ia64 port client/mysqlimport.c: Ia64 port client/mysqlshow.c: Ia64 port client/readline.cc: Ia64 port configure.in: Ia64 port include/config-win.h: Ia64 port include/thr_alarm.h: Ia64 port myisam/myisamdef.h: Ia64 port myisammrg/myrg_rkey.c: Ia64 port mysys/thr_alarm.c: Easier compile of non threaded client mysys/thr_lock.c: Easier compile of non threaded client mysys/thr_mutex.c: Easier compile of non threaded client sql-bench/crash-me.sh: Added test for RENAME + some ANSI SQL99 group functions sql-bench/limits/mysql.cfg: New run sql-bench/server-cfg.sh: Fix sql-bench/test-insert.sh: Fix sql/field.cc: Port to Ia64 sql/ha_berkeley.cc: Port to Ia64 sql/ha_myisam.cc: cleanup sql/handler.cc: Port to Ia64 sql/hostname.cc: Port to Ia64 sql/item.cc: Port to Ia64 sql/item_create.cc: Port to Ia64 sql/item_func.cc: Port to Ia64 sql/item_strfunc.cc: Port to Ia64 sql/item_timefunc.cc: Port to Ia64 sql/lock.cc: Fix for RENAME sql/log.cc: Port to Ia64 sql/log_event.h: Port to Ia64 sql/mini_client.cc: Port to Ia64 sql/mysql_priv.h: Port to Ia64 sql/mysqlbinlog.cc: Port to Ia64 sql/mysqld.cc: FLUSH TABLES table_list sql/net_pkg.cc: Port to Ia64 sql/procedure.h: Port to Ia64 sql/share/swedish/errmsg.OLD: FLUSH TABLES table_list sql/slave.cc: Port to Ia64 sql/sql_acl.cc: Port to Ia64 sql/sql_analyse.cc: Port to Ia64 sql/sql_analyse.h: Port to Ia64 sql/sql_base.cc: FLUSH TABLES table_list sql/sql_class.cc: Port to Ia64 sql/sql_class.h: Port to Ia64 sql/sql_parse.cc: Port to Ia64 sql/sql_rename.cc: Fix of RENAME sql/sql_show.cc: Port to Ia64 sql/sql_string.cc: Port to Ia64 sql/sql_string.h: Port to Ia64 sql/sql_table.cc: Fix of RENAME sql/sql_udf.cc: Port to Ia64 sql/sql_yacc.yy: FLUSH TABLES table_list sql/table.cc: Port to Ia64 sql/thr_malloc.cc: Port to Ia64 sql/time.cc: Port to Ia64 sql/unireg.cc: Port to Ia64
2000-08-21 23:18:32 +02:00
static TABLE_LIST *rename_tables(THD *thd, TABLE_LIST *table_list,
bool skip_error);
static TABLE_LIST *reverse_table_list(TABLE_LIST *table_list);
/*
Every second entry in the table_list is the original name and every
second entry is the new name.
*/
bool mysql_rename_tables(THD *thd, TABLE_LIST *table_list)
{
bool error= 1;
TABLE_LIST *ren_table= 0;
DBUG_ENTER("mysql_rename_tables");
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
/*
Avoid problems with a rename on a table that we have locked or
if the user is trying to to do this in a transcation context
*/
if (thd->locked_tables || thd->active_transaction())
{
my_error(ER_LOCK_OR_ACTIVE_TRANSACTION,MYF(0));
DBUG_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 (wait_if_global_read_lock(thd,0,1))
DBUG_RETURN(1);
VOID(pthread_mutex_lock(&LOCK_open));
if (lock_table_names(thd, table_list))
goto err;
error=0;
if ((ren_table=rename_tables(thd,table_list,0)))
{
/* Rename didn't succeed; rename back the tables in reverse order */
TABLE_LIST *table;
FLUSH TABLE table_list Fixes for RENAME TABLE Portability fixes Docs/manual.texi: FLUSH TABLES table_list client/mysql.cc: Ia64 port client/mysqladmin.c: Ia64 port client/mysqldump.c: Ia64 port client/mysqlimport.c: Ia64 port client/mysqlshow.c: Ia64 port client/readline.cc: Ia64 port configure.in: Ia64 port include/config-win.h: Ia64 port include/thr_alarm.h: Ia64 port myisam/myisamdef.h: Ia64 port myisammrg/myrg_rkey.c: Ia64 port mysys/thr_alarm.c: Easier compile of non threaded client mysys/thr_lock.c: Easier compile of non threaded client mysys/thr_mutex.c: Easier compile of non threaded client sql-bench/crash-me.sh: Added test for RENAME + some ANSI SQL99 group functions sql-bench/limits/mysql.cfg: New run sql-bench/server-cfg.sh: Fix sql-bench/test-insert.sh: Fix sql/field.cc: Port to Ia64 sql/ha_berkeley.cc: Port to Ia64 sql/ha_myisam.cc: cleanup sql/handler.cc: Port to Ia64 sql/hostname.cc: Port to Ia64 sql/item.cc: Port to Ia64 sql/item_create.cc: Port to Ia64 sql/item_func.cc: Port to Ia64 sql/item_strfunc.cc: Port to Ia64 sql/item_timefunc.cc: Port to Ia64 sql/lock.cc: Fix for RENAME sql/log.cc: Port to Ia64 sql/log_event.h: Port to Ia64 sql/mini_client.cc: Port to Ia64 sql/mysql_priv.h: Port to Ia64 sql/mysqlbinlog.cc: Port to Ia64 sql/mysqld.cc: FLUSH TABLES table_list sql/net_pkg.cc: Port to Ia64 sql/procedure.h: Port to Ia64 sql/share/swedish/errmsg.OLD: FLUSH TABLES table_list sql/slave.cc: Port to Ia64 sql/sql_acl.cc: Port to Ia64 sql/sql_analyse.cc: Port to Ia64 sql/sql_analyse.h: Port to Ia64 sql/sql_base.cc: FLUSH TABLES table_list sql/sql_class.cc: Port to Ia64 sql/sql_class.h: Port to Ia64 sql/sql_parse.cc: Port to Ia64 sql/sql_rename.cc: Fix of RENAME sql/sql_show.cc: Port to Ia64 sql/sql_string.cc: Port to Ia64 sql/sql_string.h: Port to Ia64 sql/sql_table.cc: Fix of RENAME sql/sql_udf.cc: Port to Ia64 sql/sql_yacc.yy: FLUSH TABLES table_list sql/table.cc: Port to Ia64 sql/thr_malloc.cc: Port to Ia64 sql/time.cc: Port to Ia64 sql/unireg.cc: Port to Ia64
2000-08-21 23:18:32 +02:00
/* Reverse the table list */
table_list= reverse_table_list(table_list);
/* Find the last renamed table */
FLUSH TABLE table_list Fixes for RENAME TABLE Portability fixes Docs/manual.texi: FLUSH TABLES table_list client/mysql.cc: Ia64 port client/mysqladmin.c: Ia64 port client/mysqldump.c: Ia64 port client/mysqlimport.c: Ia64 port client/mysqlshow.c: Ia64 port client/readline.cc: Ia64 port configure.in: Ia64 port include/config-win.h: Ia64 port include/thr_alarm.h: Ia64 port myisam/myisamdef.h: Ia64 port myisammrg/myrg_rkey.c: Ia64 port mysys/thr_alarm.c: Easier compile of non threaded client mysys/thr_lock.c: Easier compile of non threaded client mysys/thr_mutex.c: Easier compile of non threaded client sql-bench/crash-me.sh: Added test for RENAME + some ANSI SQL99 group functions sql-bench/limits/mysql.cfg: New run sql-bench/server-cfg.sh: Fix sql-bench/test-insert.sh: Fix sql/field.cc: Port to Ia64 sql/ha_berkeley.cc: Port to Ia64 sql/ha_myisam.cc: cleanup sql/handler.cc: Port to Ia64 sql/hostname.cc: Port to Ia64 sql/item.cc: Port to Ia64 sql/item_create.cc: Port to Ia64 sql/item_func.cc: Port to Ia64 sql/item_strfunc.cc: Port to Ia64 sql/item_timefunc.cc: Port to Ia64 sql/lock.cc: Fix for RENAME sql/log.cc: Port to Ia64 sql/log_event.h: Port to Ia64 sql/mini_client.cc: Port to Ia64 sql/mysql_priv.h: Port to Ia64 sql/mysqlbinlog.cc: Port to Ia64 sql/mysqld.cc: FLUSH TABLES table_list sql/net_pkg.cc: Port to Ia64 sql/procedure.h: Port to Ia64 sql/share/swedish/errmsg.OLD: FLUSH TABLES table_list sql/slave.cc: Port to Ia64 sql/sql_acl.cc: Port to Ia64 sql/sql_analyse.cc: Port to Ia64 sql/sql_analyse.h: Port to Ia64 sql/sql_base.cc: FLUSH TABLES table_list sql/sql_class.cc: Port to Ia64 sql/sql_class.h: Port to Ia64 sql/sql_parse.cc: Port to Ia64 sql/sql_rename.cc: Fix of RENAME sql/sql_show.cc: Port to Ia64 sql/sql_string.cc: Port to Ia64 sql/sql_string.h: Port to Ia64 sql/sql_table.cc: Fix of RENAME sql/sql_udf.cc: Port to Ia64 sql/sql_yacc.yy: FLUSH TABLES table_list sql/table.cc: Port to Ia64 sql/thr_malloc.cc: Port to Ia64 sql/time.cc: Port to Ia64 sql/unireg.cc: Port to Ia64
2000-08-21 23:18:32 +02:00
for (table=table_list ;
table->next != ren_table ;
table=table->next->next) ;
Portability fix Cleanup typos (like SKIPP -> SKIP) BUILD/compile-alpha-cxx: Fix when using InnoDB Docs/manual.texi: FreeBSD note client/mysqlmanager-pwgen.c: Portability fix include/my_base.h: Cleanup typos isam/_dynrec.c: Cleanup typos isam/_packrec.c: Cleanup typos isam/create.c: Cleanup typos isam/pack_isam.c: Cleanup typos isam/test1.c: Cleanup typos isam/test2.c: Cleanup typos libmysql/manager.c: Portability fix myisam/ft_eval.c: Cleanup typos myisam/ft_test1.c: Cleanup typos myisam/mi_create.c: Cleanup typos myisam/mi_dynrec.c: Cleanup typos myisam/mi_packrec.c: Cleanup typos myisam/mi_test1.c: Cleanup typos myisam/mi_test2.c: Cleanup typos myisam/myisampack.c: Cleanup typos sql/field.cc: Cleanup typos sql/field.h: Cleanup typos sql/filesort.cc: Cleanup typos sql/gen_lex_hash.cc: Cleanup typos sql/ha_isam.cc: Cleanup typos sql/ha_myisam.cc: Cleanup typos sql/handler.h: Cleanup typos sql/hash_filo.h: Cleanup typos sql/item.h: Cleanup typos sql/item_cmpfunc.cc: Cleanup typos sql/item_strfunc.cc: Cleanup typos sql/key.cc: Cleanup typos sql/mysqld.cc: Cleanup typos sql/opt_range.cc: Cleanup typos sql/opt_sum.cc: Cleanup typos sql/sql_acl.cc: Cleanup typos sql/sql_class.h: Cleanup typos sql/sql_insert.cc: Cleanup typos sql/sql_lex.cc: Cleanup typos sql/sql_list.h: Cleanup typos sql/sql_load.cc: Cleanup typos sql/sql_parse.cc: Cleanup typos sql/sql_rename.cc: Cleanup typos sql/sql_select.cc: Cleanup typos sql/sql_string.cc: Cleanup typos sql/sql_yacc.yy: Fix bug in last changeset sql/structs.h: Cleanup typos sql/table.cc: Cleanup typos sql/time.cc: Cleanup typos sql/unireg.h: Cleanup typos
2001-11-06 23:13:29 +01:00
table=table->next->next; // Skip error table
/* Revert to old names */
FLUSH TABLE table_list Fixes for RENAME TABLE Portability fixes Docs/manual.texi: FLUSH TABLES table_list client/mysql.cc: Ia64 port client/mysqladmin.c: Ia64 port client/mysqldump.c: Ia64 port client/mysqlimport.c: Ia64 port client/mysqlshow.c: Ia64 port client/readline.cc: Ia64 port configure.in: Ia64 port include/config-win.h: Ia64 port include/thr_alarm.h: Ia64 port myisam/myisamdef.h: Ia64 port myisammrg/myrg_rkey.c: Ia64 port mysys/thr_alarm.c: Easier compile of non threaded client mysys/thr_lock.c: Easier compile of non threaded client mysys/thr_mutex.c: Easier compile of non threaded client sql-bench/crash-me.sh: Added test for RENAME + some ANSI SQL99 group functions sql-bench/limits/mysql.cfg: New run sql-bench/server-cfg.sh: Fix sql-bench/test-insert.sh: Fix sql/field.cc: Port to Ia64 sql/ha_berkeley.cc: Port to Ia64 sql/ha_myisam.cc: cleanup sql/handler.cc: Port to Ia64 sql/hostname.cc: Port to Ia64 sql/item.cc: Port to Ia64 sql/item_create.cc: Port to Ia64 sql/item_func.cc: Port to Ia64 sql/item_strfunc.cc: Port to Ia64 sql/item_timefunc.cc: Port to Ia64 sql/lock.cc: Fix for RENAME sql/log.cc: Port to Ia64 sql/log_event.h: Port to Ia64 sql/mini_client.cc: Port to Ia64 sql/mysql_priv.h: Port to Ia64 sql/mysqlbinlog.cc: Port to Ia64 sql/mysqld.cc: FLUSH TABLES table_list sql/net_pkg.cc: Port to Ia64 sql/procedure.h: Port to Ia64 sql/share/swedish/errmsg.OLD: FLUSH TABLES table_list sql/slave.cc: Port to Ia64 sql/sql_acl.cc: Port to Ia64 sql/sql_analyse.cc: Port to Ia64 sql/sql_analyse.h: Port to Ia64 sql/sql_base.cc: FLUSH TABLES table_list sql/sql_class.cc: Port to Ia64 sql/sql_class.h: Port to Ia64 sql/sql_parse.cc: Port to Ia64 sql/sql_rename.cc: Fix of RENAME sql/sql_show.cc: Port to Ia64 sql/sql_string.cc: Port to Ia64 sql/sql_string.h: Port to Ia64 sql/sql_table.cc: Fix of RENAME sql/sql_udf.cc: Port to Ia64 sql/sql_yacc.yy: FLUSH TABLES table_list sql/table.cc: Port to Ia64 sql/thr_malloc.cc: Port to Ia64 sql/time.cc: Port to Ia64 sql/unireg.cc: Port to Ia64
2000-08-21 23:18:32 +02:00
rename_tables(thd, table, 1);
/* Revert the table list (for prepared statements) */
table_list= reverse_table_list(table_list);
error= 1;
}
/* Lets hope this doesn't fail as the result will be messy */
Remved Gemini code. BitKeeper/deleted/.del-ha_gemini.cc~5d72172d33b00c6: Delete: sql/ha_gemini.cc BitKeeper/deleted/.del-ha_gemini.h~4dfccf1929195747: Delete: sql/ha_gemini.h BitKeeper/deleted/.del-gemini.result~89b4f9cced8dfc2f: Delete: mysql-test/r/gemini.result BitKeeper/deleted/.del-gemini.test~51d0362310e55e17: Delete: mysql-test/t/gemini.test BitKeeper/deleted/.del-have_gemini.inc~42f94f0dfd0f7b18: Delete: mysql-test/include/have_gemini.inc BitKeeper/deleted/.del-have_gemini.require~206702c48b2e206b: Delete: mysql-test/r/have_gemini.require BitKeeper/deleted/.del-gemini.dat~a73393a88b124b9f: Delete: mysql-test/std_data/gemini.dat BitKeeper/deleted/.del-isolation.test~6a39e4138dd4a456: Delete: mysql-test/t/isolation.test BitKeeper/deleted/.del-isolation.result~4da11e109a3d93a9: Delete: mysql-test/r/isolation.result acinclude.m4: Remved gemini code. configure.in: Remved gemini code. libmysql/libmysql.c: Remved gemini code. mysql-test/install_test_db.sh: Remved gemini code. scripts/mysql_install_db.sh: Remved gemini code. sql/Makefile.am: Remved gemini code. sql/field.cc: Remved gemini code. sql/field.h: Remved gemini code. sql/handler.cc: Remved gemini code. sql/handler.h: Remved gemini code. sql/lex.h: Remved gemini code. sql/mysqld.cc: Remved gemini code. sql/sql_base.cc: Remved gemini code. sql/sql_class.cc: Remved gemini code. sql/sql_class.h: Remved gemini code. sql/sql_lex.h: Remved gemini code. sql/sql_parse.cc: Remved gemini code. sql/sql_rename.cc: Remved gemini code. sql/sql_table.cc: Remved gemini code. sql/sql_yacc.yy: Remved gemini code.
2001-10-10 01:50:28 +02:00
if (!error)
{
mysql_update_log.write(thd,thd->query,thd->query_length);
if (mysql_bin_log.is_open())
{
Fix for BUG#2083 "EE_ error codes (EE_DELETE, EE_WRITE) end up in the binlog, making slave stop". The problem was that during execution of the command on the master, an error can occur (for example, not space left on device, then mysqld waits and when there is space it completes successfully: so finally it worked but the error EE_WRITE remains in thd->net.last_errno and thd->net.last_error). To know if finally the command succeeded, we test the 'error' variable in every place, and if it shows no failure we reset thd->net.last_err* using the function THD::clear_error() which is backported from 4.1. A new test to see if now only real errors get to the binlog (note: the test uses "rm"). Also a bit of memory free/alloc saving in log_event.cc (do not free the whole mem_root after every query in the slave SQL thread: we can keep the initial block of it; which will be freed when the thread terminates). sql/log_event.cc: In the slave SQL thread, it's a waste to free the initial block of the mem_root after every query. We can instead keep it. It will be freed when the thread terminates (in THD::~THD()). sql/sql_acl.cc: clear the error in thd->net.last_errno as there was no error sql/sql_base.cc: clear the error in thd->net.last_errno as there was no error sql/sql_class.h: Backport of THD::clear_error() from 4.1: clears the error in thd->net.last_errno sql/sql_db.cc: clear the error in thd->net.last_errno as there was no error sql/sql_delete.cc: clear the error in thd->net.last_errno as there was no error sql/sql_insert.cc: clear the error in thd->net.last_errno as there was no error sql/sql_parse.cc: clear the error in thd->net.last_errno as there was no error sql/sql_rename.cc: clear the error in thd->net.last_errno as there was no error sql/sql_table.cc: clear the error in thd->net.last_errno as there was no error sql/sql_update.cc: clear the error in thd->net.last_errno as there was no error
2003-12-16 11:10:50 +01:00
thd->clear_error();
Put temporary files in binlog cache when using BEGIN/COMMIT Let MySQL 4.0 read 4.1 .frm files without 4.1 specific extensions New variables @@rand_seed1 and @@rand_seed2 (used by replication) DROP TEMPORARY TABLE mysql-test/r/rpl_log.result: Update of results after last replication change mysql-test/r/variables.result: Test of new variables @@rand_seed1 and @@rand_seed2 mysql-test/t/variables.test: Test of new variables @@rand_seed1 and @@rand_seed2 sql/field.cc: Let MySQL 4.0 read 4.1 .frm files without 4.1 specific extensions sql/field.h: Let MySQL 4.0 read 4.1 .frm files without 4.1 specific extensions sql/item_func.cc: Put temporary files in binlog cache when using BEGIN/COMMIT sql/log.cc: Put temporary files in binlog cache when using BEGIN/COMMIT More debug information sql/log_event.cc: Put temporary files in binlog cache when using BEGIN/COMMIT sql/log_event.h: Put temporary files in binlog cache when using BEGIN/COMMIT sql/set_var.cc: Add system variables @@rand_seed1 and @@rand_seed2 sql/set_var.h: Add system variables @@rand_seed1 and @@rand_seed2 sql/slave.cc: Put temporary files in binlog cache when using BEGIN/COMMIT sql/sql_acl.cc: Put temporary files in binlog cache when using BEGIN/COMMIT sql/sql_base.cc: Store DROP of temporary tables in binlog cache sql/sql_class.h: Put temporary files in binlog cache when using BEGIN/COMMIT sql/sql_db.cc: Put temporary files in binlog cache when using BEGIN/COMMIT sql/sql_delete.cc: Put temporary files in binlog cache when using BEGIN/COMMIT sql/sql_insert.cc: Put temporary files in binlog cache when using BEGIN/COMMIT sql/sql_lex.h: DROP TEMPORARY TABLE sql/sql_load.cc: Put temporary files in binlog cache when using BEGIN/COMMIT sql/sql_parse.cc: Put temporary files in binlog cache when using BEGIN/COMMIT sql/sql_rename.cc: Put temporary files in binlog cache when using BEGIN/COMMIT sql/sql_repl.cc: Put temporary files in binlog cache when using BEGIN/COMMIT sql/sql_repl.h: Put temporary files in binlog cache when using BEGIN/COMMIT sql/sql_table.cc: Put temporary files in binlog cache when using BEGIN/COMMIT sql/sql_update.cc: Put temporary files in binlog cache when using BEGIN/COMMIT sql/sql_yacc.yy: DROP TEMPORARY sql/table.cc: Let MySQL 4.0 read 4.1 .frm files without 4.1 specific extensions sql/unireg.cc: Let MySQL 4.0 read 4.1 .frm files without 4.1 specific extensions
2002-11-07 03:02:37 +01:00
Query_log_event qinfo(thd, thd->query, thd->query_length, 0);
mysql_bin_log.write(&qinfo);
}
Fixes and code cleanups after merge with 4.0.3 Warning handling and initial prepared statement handling (last not complete yet) Changed a lot of functions that returned 0/1 to my_bool type. GRANT handling now uses read/write locks instead of mutex Change basic net functions to use THD instead of NET (needed for 4.1 protocol) Use my_sprintf instead of sprintf() + strlen() Added alloc_query() to be able to chare query initialization code with prepared statements. Cleanup handling of SHOW COUNT(*) WARNINGS and SELECT LAST_INSERT_ID() Note that the following test fails (will be fixed ASAP): sub_select, union, rpl_rotate_logs and rpl_mystery22 BitKeeper/deleted/.del-README~3449730baf983117: Delete: mysql-test/t/README BitKeeper/deleted/.del-sql_error.cc~2f1caca8d2485dbe: Delete: libmysqld/sql_error.cc BitKeeper/deleted/.del-sql_prepare.cc~f703729793935ed6: Delete: libmysqld/sql_prepare.cc Docs/manual.texi: Updated variable list client/mysql.cc: Show warning count to user. client/mysqltest.c: Add warnings to test results configure.in: New shared library version number include/errmsg.h: Indentation cleanup include/mysql.h: Removed MYSQL_ERROR Indentaion cleanups include/mysql_com.h: Changed functions to returns true/false to my_bool. include/mysqld_error.h: New error messages isam/pack_isam.c: Indentation change libmysql/Makefile.am: Fix of wrong merge libmysql/Makefile.shared: Indentation cleanup libmysql/errmsg.c: Removed not used errors libmysql/libmysql.c: Change functions to return 1 on error (not -1) Change type of functions that returns 0/1 to my_bool Lot of code optimizations. Lot of changes for prepared statements. This now handles sending of binary data to server. Receving of binary data is not yet done (will have to wait until server code for this is ready) mysql_warning_count and mysql_warnings() implemented. libmysql/libmysql.def: Added mysql_warnings and mysql_warning_count libmysql/manager.c: Fixed wrong testing of result from my_connect() libmysqld/lib_sql.cc: Removed global variable THR_NET Change basic net functions to use THD instead of NET GRANT handling now uses read/write locks instead of mutex libmysqld/libmysqld.c: Changed functions to be my_bool myisam/ft_boolean_search.c: Trivial code cleanup myisam/ft_stopwords.c: Trivial code cleanup myisam/mi_check.c: Update to 4.1 structures myisam/myisampack.c: Trivial code cleanup myisam/rt_key.c: Code cleanup myisam/rt_test.c: Code cleanup Removed compiler warnings myisam/sp_key.c: Indentation changes myisam/sp_test.c: Removed compiler warnings mysql-test/README: Updated to reflect the new --external flag. mysql-test/mysql-test-run.sh: --local (start new server) is now default. Use --external to test against external server. mysql-test/r/rollback.result: Updated for 4.1 warnings mysql-test/r/rpl_log.result: Update for 4.1 mysql-test/t/rollback.test: Updated for 4.1 warnings mysql-test/t/rpl_log_pos.test: Portability fix mysys/hash.c: Indentation change mysys/my_error.c: Indentation change mysys/tree.c: Updated file description sql/field.cc: Fixed bugs introduced by merge Use my_sprintf instead of sprintf() + strlen() sql/field.h: Add CHARSET_INFO to field structure sql/gstream.h: Indentation changes. Added GPL copyright header sql/ha_innodb.cc: Updated parameters for net functions. sql/item.cc: Updates of Item_param Indentation changes sql/item.h: Removed size_of() function from item. sql/item_func.cc: Update function usage for 4.1 Added get_system_var() sql/item_func.h: Indentation change sql/item_strfunc.cc: Removed not needed inclusion of gstream.h Update to use system variables (from 4.0) sql/item_sum.h: Removed size_of() functions from item. sql/item_timefunc.cc: Change sprintf() + strlen() -> my_sprintf() Added length parameter to ->append() sql/item_timefunc.h: Removed size_of() functions from item. sql/item_uniq.h: Removed size_of() functions from item. sql/lex.h: Removed SQL_ERROR_COUNT variable sql/log.cc: Change sprintf() + strlen() -> my_sprintf() sql/log_event.cc: Change sprintf() + strlen() -> my_sprintf() sql/mini_client.cc: Added check that one always specifies a length to mc_mysql_query() sql/mysql_priv.h: New prototypes Change of NET -> THD parameter for net functions. sql/mysqld.cc: New startup options: 'max_prepared_statements', 'max_error_count' Updated usage of net functions. sql/net_pkg.cc: Change basic net functions to use THD instead of NET (needed to be able to handle 4.0 and 4.1 protocols) Lots of function comments sql/net_serv.cc: Change int return values -> my_bool Updated net_write_command() to take an extra header block to be added to the packet. (This made the prepared statement code much nicer and more efficient) sql/repl_failsafe.cc: Update net functions to use THD instead of NET sql/set_var.cc: Added @@error_count and @@warning_count variables. Updated to 4.1 function usage sql/set_var.h: Added @@error_count and @@warning_count variables. sql/share/czech/errmsg.txt: Removed Warning: from warning error messages. sql/share/english/errmsg.txt: Removed Warning: from warning error messages. sql/share/greek/errmsg.txt: Removed Warning: from warning error messages. sql/share/hungarian/errmsg.txt: Removed Warning: from warning error messages. sql/share/japanese/errmsg.txt: Removed Warning: from warning error messages. sql/share/korean/errmsg.txt: Removed Warning: from warning error messages. sql/share/norwegian-ny/errmsg.txt: Removed Warning: from warning error messages. sql/share/norwegian/errmsg.txt: Removed Warning: from warning error messages. sql/share/polish/errmsg.txt: Removed Warning: from warning error messages. sql/share/romanian/errmsg.txt: Removed Warning: from warning error messages. sql/share/slovak/errmsg.txt: Removed Warning: from warning error messages. sql/share/swedish/errmsg.txt: Removed Warning: from warning error messages. sql/slave.cc: Change basic net functions to use THD instead of NET skip_load_data_file recoded to fit new client/server protocol sql/spatial.h: Added copyright header Indentation cleanups sql/sql_acl.cc: Change basic net functions to use THD instead of NET GRANT handling now uses read/write locks instead of mutex sql/sql_analyse.cc: Change basic net functions to use THD instead of NET sprintf() + strlen() -> my_sprintf() sql/sql_base.cc: More DBUG statements sql/sql_class.cc: Change basic net functions to use THD instead of NET warning and prepared statement handling sql/sql_class.h: Change basic net functions to use THD instead of NET warning and prepared statement handling sql/sql_db.cc: Code cleanup & optimization. sql/sql_delete.cc: Change basic net functions to use THD instead of NET sql/sql_derived.cc: Change basic net functions to use THD instead of NET sql/sql_do.cc: Change basic net functions to use THD instead of NET sql/sql_error.cc: Big rewrite of error handling. sql/sql_handler.cc: Change basic net functions to use THD instead of NET sql/sql_insert.cc: Change basic net functions to use THD instead of NET sql/sql_lex.cc: Change basic net functions to use THD instead of NET sql/sql_lex.h: Added param_count to st_select_lex_node sql/sql_list.h: Removed not needed error list. sql/sql_load.cc: Change basic net functions to use THD instead of NET sql/sql_parse.cc: Change basic net functions to use THD instead of NET Added alloc_query() to be able to chare query initialization code with prepared statements. Update of warning handling. Added create_select_for_variable() (for SHOW COUNT(*) WARNINGS) sql/sql_prepare.cc: Initial prepared statement handling sql/sql_rename.cc: Change basic net functions to use THD instead of NET sql/sql_repl.cc: Change basic net functions to use THD instead of NET sql/sql_select.cc: Small code cleanups Added missing initialization of error that caused some queries that returned an empty result set to fail sql/sql_select.h: Ensure that JOIN.error is properly initialized sql/sql_show.cc: Change basic net functions to use THD instead of NET A lot of optimization sql/sql_table.cc: Change basic net functions to use THD instead of NET Indentaion cleanup sql/sql_udf.cc: Change basic net functions to use THD instead of NET sql/sql_union.cc: Change basic net functions to use THD instead of NET sql/sql_update.cc: Change basic net functions to use THD instead of NET sql/sql_yacc.yy: Change basic net functions to use THD instead of NET Cleanup handling of SHOW COUNT(*) WARNINGS and SELECT LAST_INSERT_ID() sql/structs.h: Moved structures to files where they was used sql/table.cc: Don't accept empty database names sql/uniques.cc: Indentation cleanup sql/unireg.cc: Change basic net functions to use THD instead of NET sql/unireg.h: Added defaults for warnings and prepared statements strings/ctype-simple.c: optimization tests/client_test.c: Fixed wrong paramaters to printf()
2002-10-02 12:33:08 +02:00
send_ok(thd);
}
unlock_table_names(thd,table_list);
err:
pthread_mutex_unlock(&LOCK_open);
start_waiting_global_read_lock(thd);
DBUG_RETURN(error);
}
/*
reverse table list
SYNOPSIS
reverse_table_list()
table_list pointer to table _list
RETURN
pointer to new (reversed) list
*/
static TABLE_LIST *reverse_table_list(TABLE_LIST *table_list)
{
TABLE_LIST *prev= 0;
while (table_list)
{
TABLE_LIST *next= table_list->next;
table_list->next= prev;
prev= table_list;
table_list= next;
}
return (prev);
}
/*
Rename all tables in list; Return pointer to wrong entry if something goes
FLUSH TABLE table_list Fixes for RENAME TABLE Portability fixes Docs/manual.texi: FLUSH TABLES table_list client/mysql.cc: Ia64 port client/mysqladmin.c: Ia64 port client/mysqldump.c: Ia64 port client/mysqlimport.c: Ia64 port client/mysqlshow.c: Ia64 port client/readline.cc: Ia64 port configure.in: Ia64 port include/config-win.h: Ia64 port include/thr_alarm.h: Ia64 port myisam/myisamdef.h: Ia64 port myisammrg/myrg_rkey.c: Ia64 port mysys/thr_alarm.c: Easier compile of non threaded client mysys/thr_lock.c: Easier compile of non threaded client mysys/thr_mutex.c: Easier compile of non threaded client sql-bench/crash-me.sh: Added test for RENAME + some ANSI SQL99 group functions sql-bench/limits/mysql.cfg: New run sql-bench/server-cfg.sh: Fix sql-bench/test-insert.sh: Fix sql/field.cc: Port to Ia64 sql/ha_berkeley.cc: Port to Ia64 sql/ha_myisam.cc: cleanup sql/handler.cc: Port to Ia64 sql/hostname.cc: Port to Ia64 sql/item.cc: Port to Ia64 sql/item_create.cc: Port to Ia64 sql/item_func.cc: Port to Ia64 sql/item_strfunc.cc: Port to Ia64 sql/item_timefunc.cc: Port to Ia64 sql/lock.cc: Fix for RENAME sql/log.cc: Port to Ia64 sql/log_event.h: Port to Ia64 sql/mini_client.cc: Port to Ia64 sql/mysql_priv.h: Port to Ia64 sql/mysqlbinlog.cc: Port to Ia64 sql/mysqld.cc: FLUSH TABLES table_list sql/net_pkg.cc: Port to Ia64 sql/procedure.h: Port to Ia64 sql/share/swedish/errmsg.OLD: FLUSH TABLES table_list sql/slave.cc: Port to Ia64 sql/sql_acl.cc: Port to Ia64 sql/sql_analyse.cc: Port to Ia64 sql/sql_analyse.h: Port to Ia64 sql/sql_base.cc: FLUSH TABLES table_list sql/sql_class.cc: Port to Ia64 sql/sql_class.h: Port to Ia64 sql/sql_parse.cc: Port to Ia64 sql/sql_rename.cc: Fix of RENAME sql/sql_show.cc: Port to Ia64 sql/sql_string.cc: Port to Ia64 sql/sql_string.h: Port to Ia64 sql/sql_table.cc: Fix of RENAME sql/sql_udf.cc: Port to Ia64 sql/sql_yacc.yy: FLUSH TABLES table_list sql/table.cc: Port to Ia64 sql/thr_malloc.cc: Port to Ia64 sql/time.cc: Port to Ia64 sql/unireg.cc: Port to Ia64
2000-08-21 23:18:32 +02:00
wrong. Note that the table_list may be empty!
*/
static TABLE_LIST *
FLUSH TABLE table_list Fixes for RENAME TABLE Portability fixes Docs/manual.texi: FLUSH TABLES table_list client/mysql.cc: Ia64 port client/mysqladmin.c: Ia64 port client/mysqldump.c: Ia64 port client/mysqlimport.c: Ia64 port client/mysqlshow.c: Ia64 port client/readline.cc: Ia64 port configure.in: Ia64 port include/config-win.h: Ia64 port include/thr_alarm.h: Ia64 port myisam/myisamdef.h: Ia64 port myisammrg/myrg_rkey.c: Ia64 port mysys/thr_alarm.c: Easier compile of non threaded client mysys/thr_lock.c: Easier compile of non threaded client mysys/thr_mutex.c: Easier compile of non threaded client sql-bench/crash-me.sh: Added test for RENAME + some ANSI SQL99 group functions sql-bench/limits/mysql.cfg: New run sql-bench/server-cfg.sh: Fix sql-bench/test-insert.sh: Fix sql/field.cc: Port to Ia64 sql/ha_berkeley.cc: Port to Ia64 sql/ha_myisam.cc: cleanup sql/handler.cc: Port to Ia64 sql/hostname.cc: Port to Ia64 sql/item.cc: Port to Ia64 sql/item_create.cc: Port to Ia64 sql/item_func.cc: Port to Ia64 sql/item_strfunc.cc: Port to Ia64 sql/item_timefunc.cc: Port to Ia64 sql/lock.cc: Fix for RENAME sql/log.cc: Port to Ia64 sql/log_event.h: Port to Ia64 sql/mini_client.cc: Port to Ia64 sql/mysql_priv.h: Port to Ia64 sql/mysqlbinlog.cc: Port to Ia64 sql/mysqld.cc: FLUSH TABLES table_list sql/net_pkg.cc: Port to Ia64 sql/procedure.h: Port to Ia64 sql/share/swedish/errmsg.OLD: FLUSH TABLES table_list sql/slave.cc: Port to Ia64 sql/sql_acl.cc: Port to Ia64 sql/sql_analyse.cc: Port to Ia64 sql/sql_analyse.h: Port to Ia64 sql/sql_base.cc: FLUSH TABLES table_list sql/sql_class.cc: Port to Ia64 sql/sql_class.h: Port to Ia64 sql/sql_parse.cc: Port to Ia64 sql/sql_rename.cc: Fix of RENAME sql/sql_show.cc: Port to Ia64 sql/sql_string.cc: Port to Ia64 sql/sql_string.h: Port to Ia64 sql/sql_table.cc: Fix of RENAME sql/sql_udf.cc: Port to Ia64 sql/sql_yacc.yy: FLUSH TABLES table_list sql/table.cc: Port to Ia64 sql/thr_malloc.cc: Port to Ia64 sql/time.cc: Port to Ia64 sql/unireg.cc: Port to Ia64
2000-08-21 23:18:32 +02:00
rename_tables(THD *thd, TABLE_LIST *table_list, bool skip_error)
{
FLUSH TABLE table_list Fixes for RENAME TABLE Portability fixes Docs/manual.texi: FLUSH TABLES table_list client/mysql.cc: Ia64 port client/mysqladmin.c: Ia64 port client/mysqldump.c: Ia64 port client/mysqlimport.c: Ia64 port client/mysqlshow.c: Ia64 port client/readline.cc: Ia64 port configure.in: Ia64 port include/config-win.h: Ia64 port include/thr_alarm.h: Ia64 port myisam/myisamdef.h: Ia64 port myisammrg/myrg_rkey.c: Ia64 port mysys/thr_alarm.c: Easier compile of non threaded client mysys/thr_lock.c: Easier compile of non threaded client mysys/thr_mutex.c: Easier compile of non threaded client sql-bench/crash-me.sh: Added test for RENAME + some ANSI SQL99 group functions sql-bench/limits/mysql.cfg: New run sql-bench/server-cfg.sh: Fix sql-bench/test-insert.sh: Fix sql/field.cc: Port to Ia64 sql/ha_berkeley.cc: Port to Ia64 sql/ha_myisam.cc: cleanup sql/handler.cc: Port to Ia64 sql/hostname.cc: Port to Ia64 sql/item.cc: Port to Ia64 sql/item_create.cc: Port to Ia64 sql/item_func.cc: Port to Ia64 sql/item_strfunc.cc: Port to Ia64 sql/item_timefunc.cc: Port to Ia64 sql/lock.cc: Fix for RENAME sql/log.cc: Port to Ia64 sql/log_event.h: Port to Ia64 sql/mini_client.cc: Port to Ia64 sql/mysql_priv.h: Port to Ia64 sql/mysqlbinlog.cc: Port to Ia64 sql/mysqld.cc: FLUSH TABLES table_list sql/net_pkg.cc: Port to Ia64 sql/procedure.h: Port to Ia64 sql/share/swedish/errmsg.OLD: FLUSH TABLES table_list sql/slave.cc: Port to Ia64 sql/sql_acl.cc: Port to Ia64 sql/sql_analyse.cc: Port to Ia64 sql/sql_analyse.h: Port to Ia64 sql/sql_base.cc: FLUSH TABLES table_list sql/sql_class.cc: Port to Ia64 sql/sql_class.h: Port to Ia64 sql/sql_parse.cc: Port to Ia64 sql/sql_rename.cc: Fix of RENAME sql/sql_show.cc: Port to Ia64 sql/sql_string.cc: Port to Ia64 sql/sql_string.h: Port to Ia64 sql/sql_table.cc: Fix of RENAME sql/sql_udf.cc: Port to Ia64 sql/sql_yacc.yy: FLUSH TABLES table_list sql/table.cc: Port to Ia64 sql/thr_malloc.cc: Port to Ia64 sql/time.cc: Port to Ia64 sql/unireg.cc: Port to Ia64
2000-08-21 23:18:32 +02:00
TABLE_LIST *ren_table,*new_table;
DBUG_ENTER("rename_tables");
for (ren_table=table_list ; ren_table ; ren_table=new_table->next)
{
db_type table_type;
char name[FN_REFLEN];
Some small portability fixes. Added support for lower_case_table_names=2, which is to be used on case insensitive file systems. This tells MySQL to preserve the used case of filenames and database names to make it esier to move files between cases sensitive can case insensitive file systems (like Windows and Linux) client/mysqltest.c: Indentation cleanup include/myisam.h: Made some pointers 'const' mysql-test/mysql-test-run.sh: Portability fix for OSX sql/filesort.cc: Safety fix (not needed for current code but needed for 5.0) sql/ha_berkeley.cc: More debugging Changed 'create' to return error number sql/ha_berkeley.h: Added HA_FILE_BASED sql/ha_innodb.cc: Added missing DBUG_RETURN sql/ha_isam.cc: Changed create to return error number sql/ha_isam.h: Added HA_FILE_BASED sql/ha_isammrg.h: Added HA_FILE_BASED sql/ha_myisam.cc: Changed create to return error number sql/ha_myisam.h: Added HA_FILE_BASED sql/ha_myisammrg.cc: Changed create to return error number sql/ha_myisammrg.h: Added HA_FILE_BASED sql/handler.cc: Ensure that table engines gets table names in lower case even if we are using lower_case_table_names Removed test for DB_TYPE_INNODB by ensuring that create method returns error number. sql/handler.h: Added HA_FILE_BASED Made some struct entries 'const' Added 'alias' for create to be able to create tables in mixed case on case insensitive file systems sql/mysql_priv.h: Support for lower_case_table_names=2 sql/mysqld.cc: Support for lower_case_table_names=2 Moved test of case insenstive file system after all mutex are created sql/set_var.cc: Support for lower_case_table_names=2 sql/sql_class.h: Indentation change sql/sql_db.cc: Support for lower_case_table_names=2 sql/sql_insert.cc: Indentation change sql/sql_parse.cc: Support for lower_case_table_names=2 sql/sql_rename.cc: Support for lower_case_table_names=2 Added missing 'unpack_filename' to RENAME which may fix a bug in RENAME TABLE on windows sql/sql_show.cc: If lower_case_table_name=2 is given, show original case in SHOW CREATE TABLE sql/sql_table.cc: Support for lower_case_table_names=2 for DROP TABLE, RENAME TABLE, ALTER TABLE and CREATE TABLE
2003-12-30 12:14:21 +01:00
const char *new_alias, *old_alias;
Some small portability fixes. Added support for lower_case_table_names=2, which is to be used on case insensitive file systems. This tells MySQL to preserve the used case of filenames and database names to make it esier to move files between cases sensitive can case insensitive file systems (like Windows and Linux) client/mysqltest.c: Indentation cleanup include/myisam.h: Made some pointers 'const' mysql-test/mysql-test-run.sh: Portability fix for OSX sql/filesort.cc: Safety fix (not needed for current code but needed for 5.0) sql/ha_berkeley.cc: More debugging Changed 'create' to return error number sql/ha_berkeley.h: Added HA_FILE_BASED sql/ha_innodb.cc: Added missing DBUG_RETURN sql/ha_isam.cc: Changed create to return error number sql/ha_isam.h: Added HA_FILE_BASED sql/ha_isammrg.h: Added HA_FILE_BASED sql/ha_myisam.cc: Changed create to return error number sql/ha_myisam.h: Added HA_FILE_BASED sql/ha_myisammrg.cc: Changed create to return error number sql/ha_myisammrg.h: Added HA_FILE_BASED sql/handler.cc: Ensure that table engines gets table names in lower case even if we are using lower_case_table_names Removed test for DB_TYPE_INNODB by ensuring that create method returns error number. sql/handler.h: Added HA_FILE_BASED Made some struct entries 'const' Added 'alias' for create to be able to create tables in mixed case on case insensitive file systems sql/mysql_priv.h: Support for lower_case_table_names=2 sql/mysqld.cc: Support for lower_case_table_names=2 Moved test of case insenstive file system after all mutex are created sql/set_var.cc: Support for lower_case_table_names=2 sql/sql_class.h: Indentation change sql/sql_db.cc: Support for lower_case_table_names=2 sql/sql_insert.cc: Indentation change sql/sql_parse.cc: Support for lower_case_table_names=2 sql/sql_rename.cc: Support for lower_case_table_names=2 Added missing 'unpack_filename' to RENAME which may fix a bug in RENAME TABLE on windows sql/sql_show.cc: If lower_case_table_name=2 is given, show original case in SHOW CREATE TABLE sql/sql_table.cc: Support for lower_case_table_names=2 for DROP TABLE, RENAME TABLE, ALTER TABLE and CREATE TABLE
2003-12-30 12:14:21 +01:00
new_table=ren_table->next;
if (lower_case_table_names == 2)
{
old_alias= ren_table->alias;
new_alias= new_table->alias;
}
else
{
old_alias= ren_table->real_name;
new_alias= new_table->real_name;
}
FLUSH TABLE table_list Fixes for RENAME TABLE Portability fixes Docs/manual.texi: FLUSH TABLES table_list client/mysql.cc: Ia64 port client/mysqladmin.c: Ia64 port client/mysqldump.c: Ia64 port client/mysqlimport.c: Ia64 port client/mysqlshow.c: Ia64 port client/readline.cc: Ia64 port configure.in: Ia64 port include/config-win.h: Ia64 port include/thr_alarm.h: Ia64 port myisam/myisamdef.h: Ia64 port myisammrg/myrg_rkey.c: Ia64 port mysys/thr_alarm.c: Easier compile of non threaded client mysys/thr_lock.c: Easier compile of non threaded client mysys/thr_mutex.c: Easier compile of non threaded client sql-bench/crash-me.sh: Added test for RENAME + some ANSI SQL99 group functions sql-bench/limits/mysql.cfg: New run sql-bench/server-cfg.sh: Fix sql-bench/test-insert.sh: Fix sql/field.cc: Port to Ia64 sql/ha_berkeley.cc: Port to Ia64 sql/ha_myisam.cc: cleanup sql/handler.cc: Port to Ia64 sql/hostname.cc: Port to Ia64 sql/item.cc: Port to Ia64 sql/item_create.cc: Port to Ia64 sql/item_func.cc: Port to Ia64 sql/item_strfunc.cc: Port to Ia64 sql/item_timefunc.cc: Port to Ia64 sql/lock.cc: Fix for RENAME sql/log.cc: Port to Ia64 sql/log_event.h: Port to Ia64 sql/mini_client.cc: Port to Ia64 sql/mysql_priv.h: Port to Ia64 sql/mysqlbinlog.cc: Port to Ia64 sql/mysqld.cc: FLUSH TABLES table_list sql/net_pkg.cc: Port to Ia64 sql/procedure.h: Port to Ia64 sql/share/swedish/errmsg.OLD: FLUSH TABLES table_list sql/slave.cc: Port to Ia64 sql/sql_acl.cc: Port to Ia64 sql/sql_analyse.cc: Port to Ia64 sql/sql_analyse.h: Port to Ia64 sql/sql_base.cc: FLUSH TABLES table_list sql/sql_class.cc: Port to Ia64 sql/sql_class.h: Port to Ia64 sql/sql_parse.cc: Port to Ia64 sql/sql_rename.cc: Fix of RENAME sql/sql_show.cc: Port to Ia64 sql/sql_string.cc: Port to Ia64 sql/sql_string.h: Port to Ia64 sql/sql_table.cc: Fix of RENAME sql/sql_udf.cc: Port to Ia64 sql/sql_yacc.yy: FLUSH TABLES table_list sql/table.cc: Port to Ia64 sql/thr_malloc.cc: Port to Ia64 sql/time.cc: Port to Ia64 sql/unireg.cc: Port to Ia64
2000-08-21 23:18:32 +02:00
sprintf(name,"%s/%s/%s%s",mysql_data_home,
Some small portability fixes. Added support for lower_case_table_names=2, which is to be used on case insensitive file systems. This tells MySQL to preserve the used case of filenames and database names to make it esier to move files between cases sensitive can case insensitive file systems (like Windows and Linux) client/mysqltest.c: Indentation cleanup include/myisam.h: Made some pointers 'const' mysql-test/mysql-test-run.sh: Portability fix for OSX sql/filesort.cc: Safety fix (not needed for current code but needed for 5.0) sql/ha_berkeley.cc: More debugging Changed 'create' to return error number sql/ha_berkeley.h: Added HA_FILE_BASED sql/ha_innodb.cc: Added missing DBUG_RETURN sql/ha_isam.cc: Changed create to return error number sql/ha_isam.h: Added HA_FILE_BASED sql/ha_isammrg.h: Added HA_FILE_BASED sql/ha_myisam.cc: Changed create to return error number sql/ha_myisam.h: Added HA_FILE_BASED sql/ha_myisammrg.cc: Changed create to return error number sql/ha_myisammrg.h: Added HA_FILE_BASED sql/handler.cc: Ensure that table engines gets table names in lower case even if we are using lower_case_table_names Removed test for DB_TYPE_INNODB by ensuring that create method returns error number. sql/handler.h: Added HA_FILE_BASED Made some struct entries 'const' Added 'alias' for create to be able to create tables in mixed case on case insensitive file systems sql/mysql_priv.h: Support for lower_case_table_names=2 sql/mysqld.cc: Support for lower_case_table_names=2 Moved test of case insenstive file system after all mutex are created sql/set_var.cc: Support for lower_case_table_names=2 sql/sql_class.h: Indentation change sql/sql_db.cc: Support for lower_case_table_names=2 sql/sql_insert.cc: Indentation change sql/sql_parse.cc: Support for lower_case_table_names=2 sql/sql_rename.cc: Support for lower_case_table_names=2 Added missing 'unpack_filename' to RENAME which may fix a bug in RENAME TABLE on windows sql/sql_show.cc: If lower_case_table_name=2 is given, show original case in SHOW CREATE TABLE sql/sql_table.cc: Support for lower_case_table_names=2 for DROP TABLE, RENAME TABLE, ALTER TABLE and CREATE TABLE
2003-12-30 12:14:21 +01:00
new_table->db, new_alias, reg_ext);
unpack_filename(name, name);
FLUSH TABLE table_list Fixes for RENAME TABLE Portability fixes Docs/manual.texi: FLUSH TABLES table_list client/mysql.cc: Ia64 port client/mysqladmin.c: Ia64 port client/mysqldump.c: Ia64 port client/mysqlimport.c: Ia64 port client/mysqlshow.c: Ia64 port client/readline.cc: Ia64 port configure.in: Ia64 port include/config-win.h: Ia64 port include/thr_alarm.h: Ia64 port myisam/myisamdef.h: Ia64 port myisammrg/myrg_rkey.c: Ia64 port mysys/thr_alarm.c: Easier compile of non threaded client mysys/thr_lock.c: Easier compile of non threaded client mysys/thr_mutex.c: Easier compile of non threaded client sql-bench/crash-me.sh: Added test for RENAME + some ANSI SQL99 group functions sql-bench/limits/mysql.cfg: New run sql-bench/server-cfg.sh: Fix sql-bench/test-insert.sh: Fix sql/field.cc: Port to Ia64 sql/ha_berkeley.cc: Port to Ia64 sql/ha_myisam.cc: cleanup sql/handler.cc: Port to Ia64 sql/hostname.cc: Port to Ia64 sql/item.cc: Port to Ia64 sql/item_create.cc: Port to Ia64 sql/item_func.cc: Port to Ia64 sql/item_strfunc.cc: Port to Ia64 sql/item_timefunc.cc: Port to Ia64 sql/lock.cc: Fix for RENAME sql/log.cc: Port to Ia64 sql/log_event.h: Port to Ia64 sql/mini_client.cc: Port to Ia64 sql/mysql_priv.h: Port to Ia64 sql/mysqlbinlog.cc: Port to Ia64 sql/mysqld.cc: FLUSH TABLES table_list sql/net_pkg.cc: Port to Ia64 sql/procedure.h: Port to Ia64 sql/share/swedish/errmsg.OLD: FLUSH TABLES table_list sql/slave.cc: Port to Ia64 sql/sql_acl.cc: Port to Ia64 sql/sql_analyse.cc: Port to Ia64 sql/sql_analyse.h: Port to Ia64 sql/sql_base.cc: FLUSH TABLES table_list sql/sql_class.cc: Port to Ia64 sql/sql_class.h: Port to Ia64 sql/sql_parse.cc: Port to Ia64 sql/sql_rename.cc: Fix of RENAME sql/sql_show.cc: Port to Ia64 sql/sql_string.cc: Port to Ia64 sql/sql_string.h: Port to Ia64 sql/sql_table.cc: Fix of RENAME sql/sql_udf.cc: Port to Ia64 sql/sql_yacc.yy: FLUSH TABLES table_list sql/table.cc: Port to Ia64 sql/thr_malloc.cc: Port to Ia64 sql/time.cc: Port to Ia64 sql/unireg.cc: Port to Ia64
2000-08-21 23:18:32 +02:00
if (!access(name,F_OK))
{
Some small portability fixes. Added support for lower_case_table_names=2, which is to be used on case insensitive file systems. This tells MySQL to preserve the used case of filenames and database names to make it esier to move files between cases sensitive can case insensitive file systems (like Windows and Linux) client/mysqltest.c: Indentation cleanup include/myisam.h: Made some pointers 'const' mysql-test/mysql-test-run.sh: Portability fix for OSX sql/filesort.cc: Safety fix (not needed for current code but needed for 5.0) sql/ha_berkeley.cc: More debugging Changed 'create' to return error number sql/ha_berkeley.h: Added HA_FILE_BASED sql/ha_innodb.cc: Added missing DBUG_RETURN sql/ha_isam.cc: Changed create to return error number sql/ha_isam.h: Added HA_FILE_BASED sql/ha_isammrg.h: Added HA_FILE_BASED sql/ha_myisam.cc: Changed create to return error number sql/ha_myisam.h: Added HA_FILE_BASED sql/ha_myisammrg.cc: Changed create to return error number sql/ha_myisammrg.h: Added HA_FILE_BASED sql/handler.cc: Ensure that table engines gets table names in lower case even if we are using lower_case_table_names Removed test for DB_TYPE_INNODB by ensuring that create method returns error number. sql/handler.h: Added HA_FILE_BASED Made some struct entries 'const' Added 'alias' for create to be able to create tables in mixed case on case insensitive file systems sql/mysql_priv.h: Support for lower_case_table_names=2 sql/mysqld.cc: Support for lower_case_table_names=2 Moved test of case insenstive file system after all mutex are created sql/set_var.cc: Support for lower_case_table_names=2 sql/sql_class.h: Indentation change sql/sql_db.cc: Support for lower_case_table_names=2 sql/sql_insert.cc: Indentation change sql/sql_parse.cc: Support for lower_case_table_names=2 sql/sql_rename.cc: Support for lower_case_table_names=2 Added missing 'unpack_filename' to RENAME which may fix a bug in RENAME TABLE on windows sql/sql_show.cc: If lower_case_table_name=2 is given, show original case in SHOW CREATE TABLE sql/sql_table.cc: Support for lower_case_table_names=2 for DROP TABLE, RENAME TABLE, ALTER TABLE and CREATE TABLE
2003-12-30 12:14:21 +01:00
my_error(ER_TABLE_EXISTS_ERROR,MYF(0),new_alias);
New error messages Test of unsigned BIGINT values Fixes for queries-per-hour Cleanup of replication code (comments and portability fixes) Make most of the binary log code 4G clean Changed syntax for GRANT ... QUERIES PER HOUR Docs/manual.texi: Fixed Changelog, upgrading to 4.0 and 4.1 TODO sections. Docs/mysqld_error.txt: Added error message. configure.in: Fix for autoconf 2.52 include/my_getopt.h: Portability fix. include/my_global.h: Portablity fix. include/mysqld_error.h: New error messages mysql-test/r/bigint.result: Test of unsigned BIGINT values. mysql-test/r/func_op.result: Test of unsigned BIGINT values. mysql-test/r/varbinary.result: Test of unsigned BIGINT values. mysql-test/t/bigint.test: Test of unsigned BIGINT values. sql/item_func.h: Optimized Item_int_func() usage. sql/lock.cc: Cleanup comments sql/log.cc: Cleanup sql/log_event.cc: Cleanup and portability fixes. sql/log_event.h: Cleanup and portability fixes. sql/mini_client.cc: Cleanup and portability fixes. sql/mysqld.cc: Fix for queries-per-hour sql/repl_failsafe.cc: Prepare for making binary log 2G clean. sql/share/czech/errmsg.txt: New error messages sql/share/danish/errmsg.txt: New error messages sql/share/dutch/errmsg.txt: New error messages sql/share/english/errmsg.txt: New error messages sql/share/estonian/errmsg.txt: New error messages sql/share/french/errmsg.txt: New error messages sql/share/german/errmsg.txt: New error messages sql/share/greek/errmsg.txt: New error messages sql/share/hungarian/errmsg.txt: New error messages sql/share/italian/errmsg.txt: New error messages sql/share/japanese/errmsg.txt: New error messages sql/share/korean/errmsg.txt: New error messages sql/share/norwegian-ny/errmsg.txt: New error messages sql/share/norwegian/errmsg.txt: New error messages sql/share/polish/errmsg.txt: New error messages sql/share/portuguese/errmsg.txt: New error messages sql/share/romanian/errmsg.txt: New error messages sql/share/russian/errmsg.txt: New error messages sql/share/slovak/errmsg.txt: New error messages sql/share/spanish/errmsg.txt: New error messages sql/share/swedish/errmsg.txt: New error messages sql/share/ukrainian/errmsg.txt: New error messages sql/slave.cc: Cleanup sql/slave.h: Cleanup sql/sql_acl.cc: Cleanup and removal of possible reserved words sql/sql_base.cc: More DBUG sql/sql_cache.cc: Cleanup & portability fixes sql/sql_class.h: Make binary log 4G clean sql/sql_delete.cc: More DBUG sql/sql_handler.cc: Cleanup & portability fixes sql/sql_parse.cc: Cleanup of queries-per-hours code sql/sql_rename.cc: Add missing DBUG_RETURN sql/sql_repl.cc: Cleanup & portability fixes sql/sql_select.cc: Cleanup & portability fixes sql/sql_show.cc: Cleanup & portability fixes sql/sql_update.cc: Small cleanup of multi-update-code (need second pass) sql/sql_yacc.yy: Changed syntax for GRANT ... QUERIES PER HOUR strings/str2int.c: Cleanup & portability fixes
2002-01-29 17:32:16 +01:00
DBUG_RETURN(ren_table); // This can't be skipped
FLUSH TABLE table_list Fixes for RENAME TABLE Portability fixes Docs/manual.texi: FLUSH TABLES table_list client/mysql.cc: Ia64 port client/mysqladmin.c: Ia64 port client/mysqldump.c: Ia64 port client/mysqlimport.c: Ia64 port client/mysqlshow.c: Ia64 port client/readline.cc: Ia64 port configure.in: Ia64 port include/config-win.h: Ia64 port include/thr_alarm.h: Ia64 port myisam/myisamdef.h: Ia64 port myisammrg/myrg_rkey.c: Ia64 port mysys/thr_alarm.c: Easier compile of non threaded client mysys/thr_lock.c: Easier compile of non threaded client mysys/thr_mutex.c: Easier compile of non threaded client sql-bench/crash-me.sh: Added test for RENAME + some ANSI SQL99 group functions sql-bench/limits/mysql.cfg: New run sql-bench/server-cfg.sh: Fix sql-bench/test-insert.sh: Fix sql/field.cc: Port to Ia64 sql/ha_berkeley.cc: Port to Ia64 sql/ha_myisam.cc: cleanup sql/handler.cc: Port to Ia64 sql/hostname.cc: Port to Ia64 sql/item.cc: Port to Ia64 sql/item_create.cc: Port to Ia64 sql/item_func.cc: Port to Ia64 sql/item_strfunc.cc: Port to Ia64 sql/item_timefunc.cc: Port to Ia64 sql/lock.cc: Fix for RENAME sql/log.cc: Port to Ia64 sql/log_event.h: Port to Ia64 sql/mini_client.cc: Port to Ia64 sql/mysql_priv.h: Port to Ia64 sql/mysqlbinlog.cc: Port to Ia64 sql/mysqld.cc: FLUSH TABLES table_list sql/net_pkg.cc: Port to Ia64 sql/procedure.h: Port to Ia64 sql/share/swedish/errmsg.OLD: FLUSH TABLES table_list sql/slave.cc: Port to Ia64 sql/sql_acl.cc: Port to Ia64 sql/sql_analyse.cc: Port to Ia64 sql/sql_analyse.h: Port to Ia64 sql/sql_base.cc: FLUSH TABLES table_list sql/sql_class.cc: Port to Ia64 sql/sql_class.h: Port to Ia64 sql/sql_parse.cc: Port to Ia64 sql/sql_rename.cc: Fix of RENAME sql/sql_show.cc: Port to Ia64 sql/sql_string.cc: Port to Ia64 sql/sql_string.h: Port to Ia64 sql/sql_table.cc: Fix of RENAME sql/sql_udf.cc: Port to Ia64 sql/sql_yacc.yy: FLUSH TABLES table_list sql/table.cc: Port to Ia64 sql/thr_malloc.cc: Port to Ia64 sql/time.cc: Port to Ia64 sql/unireg.cc: Port to Ia64
2000-08-21 23:18:32 +02:00
}
sprintf(name,"%s/%s/%s%s",mysql_data_home,
Some small portability fixes. Added support for lower_case_table_names=2, which is to be used on case insensitive file systems. This tells MySQL to preserve the used case of filenames and database names to make it esier to move files between cases sensitive can case insensitive file systems (like Windows and Linux) client/mysqltest.c: Indentation cleanup include/myisam.h: Made some pointers 'const' mysql-test/mysql-test-run.sh: Portability fix for OSX sql/filesort.cc: Safety fix (not needed for current code but needed for 5.0) sql/ha_berkeley.cc: More debugging Changed 'create' to return error number sql/ha_berkeley.h: Added HA_FILE_BASED sql/ha_innodb.cc: Added missing DBUG_RETURN sql/ha_isam.cc: Changed create to return error number sql/ha_isam.h: Added HA_FILE_BASED sql/ha_isammrg.h: Added HA_FILE_BASED sql/ha_myisam.cc: Changed create to return error number sql/ha_myisam.h: Added HA_FILE_BASED sql/ha_myisammrg.cc: Changed create to return error number sql/ha_myisammrg.h: Added HA_FILE_BASED sql/handler.cc: Ensure that table engines gets table names in lower case even if we are using lower_case_table_names Removed test for DB_TYPE_INNODB by ensuring that create method returns error number. sql/handler.h: Added HA_FILE_BASED Made some struct entries 'const' Added 'alias' for create to be able to create tables in mixed case on case insensitive file systems sql/mysql_priv.h: Support for lower_case_table_names=2 sql/mysqld.cc: Support for lower_case_table_names=2 Moved test of case insenstive file system after all mutex are created sql/set_var.cc: Support for lower_case_table_names=2 sql/sql_class.h: Indentation change sql/sql_db.cc: Support for lower_case_table_names=2 sql/sql_insert.cc: Indentation change sql/sql_parse.cc: Support for lower_case_table_names=2 sql/sql_rename.cc: Support for lower_case_table_names=2 Added missing 'unpack_filename' to RENAME which may fix a bug in RENAME TABLE on windows sql/sql_show.cc: If lower_case_table_name=2 is given, show original case in SHOW CREATE TABLE sql/sql_table.cc: Support for lower_case_table_names=2 for DROP TABLE, RENAME TABLE, ALTER TABLE and CREATE TABLE
2003-12-30 12:14:21 +01:00
ren_table->db, old_alias,
reg_ext);
Some small portability fixes. Added support for lower_case_table_names=2, which is to be used on case insensitive file systems. This tells MySQL to preserve the used case of filenames and database names to make it esier to move files between cases sensitive can case insensitive file systems (like Windows and Linux) client/mysqltest.c: Indentation cleanup include/myisam.h: Made some pointers 'const' mysql-test/mysql-test-run.sh: Portability fix for OSX sql/filesort.cc: Safety fix (not needed for current code but needed for 5.0) sql/ha_berkeley.cc: More debugging Changed 'create' to return error number sql/ha_berkeley.h: Added HA_FILE_BASED sql/ha_innodb.cc: Added missing DBUG_RETURN sql/ha_isam.cc: Changed create to return error number sql/ha_isam.h: Added HA_FILE_BASED sql/ha_isammrg.h: Added HA_FILE_BASED sql/ha_myisam.cc: Changed create to return error number sql/ha_myisam.h: Added HA_FILE_BASED sql/ha_myisammrg.cc: Changed create to return error number sql/ha_myisammrg.h: Added HA_FILE_BASED sql/handler.cc: Ensure that table engines gets table names in lower case even if we are using lower_case_table_names Removed test for DB_TYPE_INNODB by ensuring that create method returns error number. sql/handler.h: Added HA_FILE_BASED Made some struct entries 'const' Added 'alias' for create to be able to create tables in mixed case on case insensitive file systems sql/mysql_priv.h: Support for lower_case_table_names=2 sql/mysqld.cc: Support for lower_case_table_names=2 Moved test of case insenstive file system after all mutex are created sql/set_var.cc: Support for lower_case_table_names=2 sql/sql_class.h: Indentation change sql/sql_db.cc: Support for lower_case_table_names=2 sql/sql_insert.cc: Indentation change sql/sql_parse.cc: Support for lower_case_table_names=2 sql/sql_rename.cc: Support for lower_case_table_names=2 Added missing 'unpack_filename' to RENAME which may fix a bug in RENAME TABLE on windows sql/sql_show.cc: If lower_case_table_name=2 is given, show original case in SHOW CREATE TABLE sql/sql_table.cc: Support for lower_case_table_names=2 for DROP TABLE, RENAME TABLE, ALTER TABLE and CREATE TABLE
2003-12-30 12:14:21 +01:00
unpack_filename(name, name);
FLUSH TABLE table_list Fixes for RENAME TABLE Portability fixes Docs/manual.texi: FLUSH TABLES table_list client/mysql.cc: Ia64 port client/mysqladmin.c: Ia64 port client/mysqldump.c: Ia64 port client/mysqlimport.c: Ia64 port client/mysqlshow.c: Ia64 port client/readline.cc: Ia64 port configure.in: Ia64 port include/config-win.h: Ia64 port include/thr_alarm.h: Ia64 port myisam/myisamdef.h: Ia64 port myisammrg/myrg_rkey.c: Ia64 port mysys/thr_alarm.c: Easier compile of non threaded client mysys/thr_lock.c: Easier compile of non threaded client mysys/thr_mutex.c: Easier compile of non threaded client sql-bench/crash-me.sh: Added test for RENAME + some ANSI SQL99 group functions sql-bench/limits/mysql.cfg: New run sql-bench/server-cfg.sh: Fix sql-bench/test-insert.sh: Fix sql/field.cc: Port to Ia64 sql/ha_berkeley.cc: Port to Ia64 sql/ha_myisam.cc: cleanup sql/handler.cc: Port to Ia64 sql/hostname.cc: Port to Ia64 sql/item.cc: Port to Ia64 sql/item_create.cc: Port to Ia64 sql/item_func.cc: Port to Ia64 sql/item_strfunc.cc: Port to Ia64 sql/item_timefunc.cc: Port to Ia64 sql/lock.cc: Fix for RENAME sql/log.cc: Port to Ia64 sql/log_event.h: Port to Ia64 sql/mini_client.cc: Port to Ia64 sql/mysql_priv.h: Port to Ia64 sql/mysqlbinlog.cc: Port to Ia64 sql/mysqld.cc: FLUSH TABLES table_list sql/net_pkg.cc: Port to Ia64 sql/procedure.h: Port to Ia64 sql/share/swedish/errmsg.OLD: FLUSH TABLES table_list sql/slave.cc: Port to Ia64 sql/sql_acl.cc: Port to Ia64 sql/sql_analyse.cc: Port to Ia64 sql/sql_analyse.h: Port to Ia64 sql/sql_base.cc: FLUSH TABLES table_list sql/sql_class.cc: Port to Ia64 sql/sql_class.h: Port to Ia64 sql/sql_parse.cc: Port to Ia64 sql/sql_rename.cc: Fix of RENAME sql/sql_show.cc: Port to Ia64 sql/sql_string.cc: Port to Ia64 sql/sql_string.h: Port to Ia64 sql/sql_table.cc: Fix of RENAME sql/sql_udf.cc: Port to Ia64 sql/sql_yacc.yy: FLUSH TABLES table_list sql/table.cc: Port to Ia64 sql/thr_malloc.cc: Port to Ia64 sql/time.cc: Port to Ia64 sql/unireg.cc: Port to Ia64
2000-08-21 23:18:32 +02:00
if ((table_type=get_table_type(name)) == DB_TYPE_UNKNOWN)
{
my_error(ER_FILE_NOT_FOUND, MYF(0), name, my_errno);
if (!skip_error)
New error messages Test of unsigned BIGINT values Fixes for queries-per-hour Cleanup of replication code (comments and portability fixes) Make most of the binary log code 4G clean Changed syntax for GRANT ... QUERIES PER HOUR Docs/manual.texi: Fixed Changelog, upgrading to 4.0 and 4.1 TODO sections. Docs/mysqld_error.txt: Added error message. configure.in: Fix for autoconf 2.52 include/my_getopt.h: Portability fix. include/my_global.h: Portablity fix. include/mysqld_error.h: New error messages mysql-test/r/bigint.result: Test of unsigned BIGINT values. mysql-test/r/func_op.result: Test of unsigned BIGINT values. mysql-test/r/varbinary.result: Test of unsigned BIGINT values. mysql-test/t/bigint.test: Test of unsigned BIGINT values. sql/item_func.h: Optimized Item_int_func() usage. sql/lock.cc: Cleanup comments sql/log.cc: Cleanup sql/log_event.cc: Cleanup and portability fixes. sql/log_event.h: Cleanup and portability fixes. sql/mini_client.cc: Cleanup and portability fixes. sql/mysqld.cc: Fix for queries-per-hour sql/repl_failsafe.cc: Prepare for making binary log 2G clean. sql/share/czech/errmsg.txt: New error messages sql/share/danish/errmsg.txt: New error messages sql/share/dutch/errmsg.txt: New error messages sql/share/english/errmsg.txt: New error messages sql/share/estonian/errmsg.txt: New error messages sql/share/french/errmsg.txt: New error messages sql/share/german/errmsg.txt: New error messages sql/share/greek/errmsg.txt: New error messages sql/share/hungarian/errmsg.txt: New error messages sql/share/italian/errmsg.txt: New error messages sql/share/japanese/errmsg.txt: New error messages sql/share/korean/errmsg.txt: New error messages sql/share/norwegian-ny/errmsg.txt: New error messages sql/share/norwegian/errmsg.txt: New error messages sql/share/polish/errmsg.txt: New error messages sql/share/portuguese/errmsg.txt: New error messages sql/share/romanian/errmsg.txt: New error messages sql/share/russian/errmsg.txt: New error messages sql/share/slovak/errmsg.txt: New error messages sql/share/spanish/errmsg.txt: New error messages sql/share/swedish/errmsg.txt: New error messages sql/share/ukrainian/errmsg.txt: New error messages sql/slave.cc: Cleanup sql/slave.h: Cleanup sql/sql_acl.cc: Cleanup and removal of possible reserved words sql/sql_base.cc: More DBUG sql/sql_cache.cc: Cleanup & portability fixes sql/sql_class.h: Make binary log 4G clean sql/sql_delete.cc: More DBUG sql/sql_handler.cc: Cleanup & portability fixes sql/sql_parse.cc: Cleanup of queries-per-hours code sql/sql_rename.cc: Add missing DBUG_RETURN sql/sql_repl.cc: Cleanup & portability fixes sql/sql_select.cc: Cleanup & portability fixes sql/sql_show.cc: Cleanup & portability fixes sql/sql_update.cc: Small cleanup of multi-update-code (need second pass) sql/sql_yacc.yy: Changed syntax for GRANT ... QUERIES PER HOUR strings/str2int.c: Cleanup & portability fixes
2002-01-29 17:32:16 +01:00
DBUG_RETURN(ren_table);
FLUSH TABLE table_list Fixes for RENAME TABLE Portability fixes Docs/manual.texi: FLUSH TABLES table_list client/mysql.cc: Ia64 port client/mysqladmin.c: Ia64 port client/mysqldump.c: Ia64 port client/mysqlimport.c: Ia64 port client/mysqlshow.c: Ia64 port client/readline.cc: Ia64 port configure.in: Ia64 port include/config-win.h: Ia64 port include/thr_alarm.h: Ia64 port myisam/myisamdef.h: Ia64 port myisammrg/myrg_rkey.c: Ia64 port mysys/thr_alarm.c: Easier compile of non threaded client mysys/thr_lock.c: Easier compile of non threaded client mysys/thr_mutex.c: Easier compile of non threaded client sql-bench/crash-me.sh: Added test for RENAME + some ANSI SQL99 group functions sql-bench/limits/mysql.cfg: New run sql-bench/server-cfg.sh: Fix sql-bench/test-insert.sh: Fix sql/field.cc: Port to Ia64 sql/ha_berkeley.cc: Port to Ia64 sql/ha_myisam.cc: cleanup sql/handler.cc: Port to Ia64 sql/hostname.cc: Port to Ia64 sql/item.cc: Port to Ia64 sql/item_create.cc: Port to Ia64 sql/item_func.cc: Port to Ia64 sql/item_strfunc.cc: Port to Ia64 sql/item_timefunc.cc: Port to Ia64 sql/lock.cc: Fix for RENAME sql/log.cc: Port to Ia64 sql/log_event.h: Port to Ia64 sql/mini_client.cc: Port to Ia64 sql/mysql_priv.h: Port to Ia64 sql/mysqlbinlog.cc: Port to Ia64 sql/mysqld.cc: FLUSH TABLES table_list sql/net_pkg.cc: Port to Ia64 sql/procedure.h: Port to Ia64 sql/share/swedish/errmsg.OLD: FLUSH TABLES table_list sql/slave.cc: Port to Ia64 sql/sql_acl.cc: Port to Ia64 sql/sql_analyse.cc: Port to Ia64 sql/sql_analyse.h: Port to Ia64 sql/sql_base.cc: FLUSH TABLES table_list sql/sql_class.cc: Port to Ia64 sql/sql_class.h: Port to Ia64 sql/sql_parse.cc: Port to Ia64 sql/sql_rename.cc: Fix of RENAME sql/sql_show.cc: Port to Ia64 sql/sql_string.cc: Port to Ia64 sql/sql_string.h: Port to Ia64 sql/sql_table.cc: Fix of RENAME sql/sql_udf.cc: Port to Ia64 sql/sql_yacc.yy: FLUSH TABLES table_list sql/table.cc: Port to Ia64 sql/thr_malloc.cc: Port to Ia64 sql/time.cc: Port to Ia64 sql/unireg.cc: Port to Ia64
2000-08-21 23:18:32 +02:00
}
else if (mysql_rename_table(table_type,
Some small portability fixes. Added support for lower_case_table_names=2, which is to be used on case insensitive file systems. This tells MySQL to preserve the used case of filenames and database names to make it esier to move files between cases sensitive can case insensitive file systems (like Windows and Linux) client/mysqltest.c: Indentation cleanup include/myisam.h: Made some pointers 'const' mysql-test/mysql-test-run.sh: Portability fix for OSX sql/filesort.cc: Safety fix (not needed for current code but needed for 5.0) sql/ha_berkeley.cc: More debugging Changed 'create' to return error number sql/ha_berkeley.h: Added HA_FILE_BASED sql/ha_innodb.cc: Added missing DBUG_RETURN sql/ha_isam.cc: Changed create to return error number sql/ha_isam.h: Added HA_FILE_BASED sql/ha_isammrg.h: Added HA_FILE_BASED sql/ha_myisam.cc: Changed create to return error number sql/ha_myisam.h: Added HA_FILE_BASED sql/ha_myisammrg.cc: Changed create to return error number sql/ha_myisammrg.h: Added HA_FILE_BASED sql/handler.cc: Ensure that table engines gets table names in lower case even if we are using lower_case_table_names Removed test for DB_TYPE_INNODB by ensuring that create method returns error number. sql/handler.h: Added HA_FILE_BASED Made some struct entries 'const' Added 'alias' for create to be able to create tables in mixed case on case insensitive file systems sql/mysql_priv.h: Support for lower_case_table_names=2 sql/mysqld.cc: Support for lower_case_table_names=2 Moved test of case insenstive file system after all mutex are created sql/set_var.cc: Support for lower_case_table_names=2 sql/sql_class.h: Indentation change sql/sql_db.cc: Support for lower_case_table_names=2 sql/sql_insert.cc: Indentation change sql/sql_parse.cc: Support for lower_case_table_names=2 sql/sql_rename.cc: Support for lower_case_table_names=2 Added missing 'unpack_filename' to RENAME which may fix a bug in RENAME TABLE on windows sql/sql_show.cc: If lower_case_table_name=2 is given, show original case in SHOW CREATE TABLE sql/sql_table.cc: Support for lower_case_table_names=2 for DROP TABLE, RENAME TABLE, ALTER TABLE and CREATE TABLE
2003-12-30 12:14:21 +01:00
ren_table->db, old_alias,
new_table->db, new_alias))
{
if (!skip_error)
DBUG_RETURN(ren_table);
}
}
FLUSH TABLE table_list Fixes for RENAME TABLE Portability fixes Docs/manual.texi: FLUSH TABLES table_list client/mysql.cc: Ia64 port client/mysqladmin.c: Ia64 port client/mysqldump.c: Ia64 port client/mysqlimport.c: Ia64 port client/mysqlshow.c: Ia64 port client/readline.cc: Ia64 port configure.in: Ia64 port include/config-win.h: Ia64 port include/thr_alarm.h: Ia64 port myisam/myisamdef.h: Ia64 port myisammrg/myrg_rkey.c: Ia64 port mysys/thr_alarm.c: Easier compile of non threaded client mysys/thr_lock.c: Easier compile of non threaded client mysys/thr_mutex.c: Easier compile of non threaded client sql-bench/crash-me.sh: Added test for RENAME + some ANSI SQL99 group functions sql-bench/limits/mysql.cfg: New run sql-bench/server-cfg.sh: Fix sql-bench/test-insert.sh: Fix sql/field.cc: Port to Ia64 sql/ha_berkeley.cc: Port to Ia64 sql/ha_myisam.cc: cleanup sql/handler.cc: Port to Ia64 sql/hostname.cc: Port to Ia64 sql/item.cc: Port to Ia64 sql/item_create.cc: Port to Ia64 sql/item_func.cc: Port to Ia64 sql/item_strfunc.cc: Port to Ia64 sql/item_timefunc.cc: Port to Ia64 sql/lock.cc: Fix for RENAME sql/log.cc: Port to Ia64 sql/log_event.h: Port to Ia64 sql/mini_client.cc: Port to Ia64 sql/mysql_priv.h: Port to Ia64 sql/mysqlbinlog.cc: Port to Ia64 sql/mysqld.cc: FLUSH TABLES table_list sql/net_pkg.cc: Port to Ia64 sql/procedure.h: Port to Ia64 sql/share/swedish/errmsg.OLD: FLUSH TABLES table_list sql/slave.cc: Port to Ia64 sql/sql_acl.cc: Port to Ia64 sql/sql_analyse.cc: Port to Ia64 sql/sql_analyse.h: Port to Ia64 sql/sql_base.cc: FLUSH TABLES table_list sql/sql_class.cc: Port to Ia64 sql/sql_class.h: Port to Ia64 sql/sql_parse.cc: Port to Ia64 sql/sql_rename.cc: Fix of RENAME sql/sql_show.cc: Port to Ia64 sql/sql_string.cc: Port to Ia64 sql/sql_string.h: Port to Ia64 sql/sql_table.cc: Fix of RENAME sql/sql_udf.cc: Port to Ia64 sql/sql_yacc.yy: FLUSH TABLES table_list sql/table.cc: Port to Ia64 sql/thr_malloc.cc: Port to Ia64 sql/time.cc: Port to Ia64 sql/unireg.cc: Port to Ia64
2000-08-21 23:18:32 +02:00
DBUG_RETURN(0);
}