Commit 53df0e50 authored by serg@serg.mysql.com's avatar serg@serg.mysql.com

sql_base.cc merge+insert (v.3)

myrg_info.c	merge+insert (v.3)
myrg_extra.c	merge+insert (v.3)
ignore  	cleanup
parent 24f75730
*.a *.a
*.core
*.la *.la
*.lo *.lo
*.o *.o
...@@ -8,15 +8,11 @@ ...@@ -8,15 +8,11 @@
.deps .deps
.gdb_history .gdb_history
.o .o
BitKeeper/etc/csets .*.swp
BitKeeper/etc/csets-in
BitKeeper/etc/csets-out
BitKeeper/etc/gone
BitKeeper/etc/pushed
BitKeeper/tmp/bkOF1wtJ
BitKeeper/tmp/gone
COPYING COPYING
COPYING.LIB COPYING.LIB
BitKeeper/etc/csets
BitKeeper/etc/pushed
Docs/INSTALL-BINARY Docs/INSTALL-BINARY
Docs/include.texi Docs/include.texi
Docs/manual.aux Docs/manual.aux
...@@ -44,18 +40,9 @@ Makefile ...@@ -44,18 +40,9 @@ Makefile
Makefile.in Makefile.in
Makefile.in' Makefile.in'
PENDING/* PENDING/*
PENDING/2000-10-11.01
PENDING/2000-10-11.02
PENDING/2000-10-11.03
PENDING/2000-10-11.04
PENDING/2000-10-11.05
PENDING/2000-10-11.06
PENDING/2000-10-25.01
PENDING/2000-10-25.02
PENDING/2000-11-17.01
TAGS TAGS
aclocal.m4 aclocal.m4
client/.mysqladmin.c.swp client/.libs/*
client/insert_test client/insert_test
client/mysql client/mysql
client/mysqladmin client/mysqladmin
...@@ -73,6 +60,7 @@ config.log ...@@ -73,6 +60,7 @@ config.log
config.status config.status
configure configure
core core
dbug/user.t
extra/comp_err extra/comp_err
extra/my_print_defaults extra/my_print_defaults
extra/perror extra/perror
...@@ -91,107 +79,22 @@ isam/test1 ...@@ -91,107 +79,22 @@ isam/test1
isam/test2 isam/test2
isam/test3 isam/test3
libmysql/*.c libmysql/*.c
libmysql/.libs/libmysqlclient.lai libmysql/.libs/*
libmysql/conf_to_src libmysql/conf_to_src
libmysql/my_static.h libmysql/my_static.h
libmysql/mysys_priv.h libmysql/mysys_priv.h
libmysql_r/.libs/libmysqlclient_r.lai libmysql_r/.libs/*
libmysql_r/acconfig.h libmysql_r/acconfig.h
libmysql_r/array.c
libmysql_r/bchange.c
libmysql_r/bmove.c
libmysql_r/bmove_upp.c
libmysql_r/charset.c
libmysql_r/conf_to_src
libmysql_r/conf_to_src.c
libmysql_r/ctype-big5.c
libmysql_r/ctype-czech.c
libmysql_r/ctype-euc_kr.c
libmysql_r/ctype-gb2312.c
libmysql_r/ctype-gbk.c
libmysql_r/ctype-sjis.c
libmysql_r/ctype-tis620.c
libmysql_r/ctype-ujis.c
libmysql_r/ctype.c
libmysql_r/ctype_autoconf.c
libmysql_r/ctype_extra_sources.c
libmysql_r/dbug.c
libmysql_r/default.c
libmysql_r/dll.c
libmysql_r/errmsg.c
libmysql_r/errors.c
libmysql_r/get_password.c
libmysql_r/getopt.c
libmysql_r/getopt1.c
libmysql_r/getvar.c
libmysql_r/int2str.c
libmysql_r/is_prefix.c
libmysql_r/libmysql.c
libmysql_r/list.c
libmysql_r/llstr.c
libmysql_r/longlong2str.c
libmysql_r/mf_casecnv.c
libmysql_r/mf_dirname.c
libmysql_r/mf_fn_ext.c
libmysql_r/mf_format.c
libmysql_r/mf_loadpath.c
libmysql_r/mf_pack.c
libmysql_r/mf_path.c
libmysql_r/mf_tempfile.c
libmysql_r/mf_unixpath.c
libmysql_r/mf_wcomp.c
libmysql_r/mulalloc.c
libmysql_r/my_alloc.c
libmysql_r/my_compress.c
libmysql_r/my_create.c
libmysql_r/my_delete.c
libmysql_r/my_div.c
libmysql_r/my_error.c
libmysql_r/my_fopen.c
libmysql_r/my_fstream.c
libmysql_r/my_getwd.c
libmysql_r/my_init.c
libmysql_r/my_lib.c
libmysql_r/my_malloc.c
libmysql_r/my_messnc.c
libmysql_r/my_net.c
libmysql_r/my_once.c
libmysql_r/my_open.c
libmysql_r/my_pthread.c
libmysql_r/my_read.c
libmysql_r/my_realloc.c
libmysql_r/my_static.c
libmysql_r/my_static.h libmysql_r/my_static.h
libmysql_r/my_thr_init.c
libmysql_r/my_write.c
libmysql_r/mysys_priv.h libmysql_r/mysys_priv.h
libmysql_r/net.c libmysql_r/*.c
libmysql_r/password.c
libmysql_r/safemalloc.c
libmysql_r/str2int.c
libmysql_r/strcend.c
libmysql_r/strcont.c
libmysql_r/strend.c
libmysql_r/strfill.c
libmysql_r/string.c
libmysql_r/strinstr.c
libmysql_r/strmake.c
libmysql_r/strmov.c
libmysql_r/strnlen.c
libmysql_r/strnmov.c
libmysql_r/strto.c
libmysql_r/strtoll.c
libmysql_r/strtoull.c
libmysql_r/strxmov.c
libmysql_r/thr_mutex.c
libmysql_r/typelib.c
libmysql_r/violite.c
libtool libtool
linked_client_sources linked_client_sources
linked_include_sources linked_include_sources
linked_libmysql_r_sources linked_libmysql_r_sources
linked_libmysql_sources linked_libmysql_sources
linked_server_sources linked_server_sources
myisam/ft_dump
myisam/ft_eval myisam/ft_eval
myisam/ft_test1 myisam/ft_test1
myisam/mi_test1 myisam/mi_test1
...@@ -201,142 +104,9 @@ myisam/mi_test_all ...@@ -201,142 +104,9 @@ myisam/mi_test_all
myisam/myisamchk myisam/myisamchk
myisam/myisamlog myisam/myisamlog
myisam/myisampack myisam/myisampack
mysql-test/r/3.23/rpl mysql-test/r/*.reject
mysql-test/r/3.23/rpl.reject
mysql-test/r/3.23/rpl000001.b.result.reject
mysql-test/r/3.23/rpl000012.result.reject
mysql-test/r/3.23/sel000004.result.reject
mysql-test/rpl000011.test
mysql-test/share/mysql mysql-test/share/mysql
mysql-test/var/lib/bar/bar.MYD mysql-test/var/*
mysql-test/var/lib/bar/bar.MYI
mysql-test/var/lib/bar/bar.frm
mysql-test/var/lib/foo/foo.MYD
mysql-test/var/lib/foo/foo.MYI
mysql-test/var/lib/foo/foo.frm
mysql-test/var/lib/log.txt
mysql-test/var/lib/mysql
mysql-test/var/lib/mysql-bin.001
mysql-test/var/lib/mysql-bin.002
mysql-test/var/lib/mysql-bin.003
mysql-test/var/lib/mysql-bin.004
mysql-test/var/lib/mysql-bin.005
mysql-test/var/lib/mysql-bin.006
mysql-test/var/lib/mysql-bin.007
mysql-test/var/lib/mysql-bin.008
mysql-test/var/lib/mysql-bin.index
mysql-test/var/lib/mysql-slow.log
mysql-test/var/lib/mysql/*
mysql-test/var/lib/test/bar.MYD
mysql-test/var/lib/test/bar.MYI
mysql-test/var/lib/test/bar.frm
mysql-test/var/lib/test/choo.MYD
mysql-test/var/lib/test/choo.MYI
mysql-test/var/lib/test/choo.frm
mysql-test/var/lib/test/domain.MYD
mysql-test/var/lib/test/domain.MYI
mysql-test/var/lib/test/domain.frm
mysql-test/var/lib/test/elt_ck1.MYD
mysql-test/var/lib/test/elt_ck1.MYI
mysql-test/var/lib/test/elt_ck1.frm
mysql-test/var/lib/test/elt_ck2.MYD
mysql-test/var/lib/test/elt_ck2.MYI
mysql-test/var/lib/test/elt_ck2.frm
mysql-test/var/lib/test/emails.MYD
mysql-test/var/lib/test/emails.MYI
mysql-test/var/lib/test/emails.frm
mysql-test/var/lib/test/foo.MYD
mysql-test/var/lib/test/foo.MYI
mysql-test/var/lib/test/foo.frm
mysql-test/var/lib/test/t.MYD
mysql-test/var/lib/test/t.MYI
mysql-test/var/lib/test/t.frm
mysql-test/var/lib/test/test.MYD
mysql-test/var/lib/test/test.MYI
mysql-test/var/lib/test/test.frm
mysql-test/var/lib/test/test1.MYD
mysql-test/var/lib/test/test1.MYI
mysql-test/var/lib/test/test1.frm
mysql-test/var/lib/test/test2.MYD
mysql-test/var/lib/test/test2.MYI
mysql-test/var/lib/test/test2.frm
mysql-test/var/lib/test/words.MYD
mysql-test/var/lib/test/words.MYI
mysql-test/var/lib/test/words.frm
mysql-test/var/lib/test/words1.MYD
mysql-test/var/lib/test/words1.MYI
mysql-test/var/lib/test/words1.frm
mysql-test/var/lib/test/x.MYD
mysql-test/var/lib/test/x.MYI
mysql-test/var/lib/test/x.frm
mysql-test/var/log/mysqld-slave.err
mysql-test/var/log/mysqld-slave.log
mysql-test/var/log/mysqld.err
mysql-test/var/log/mysqld.log
mysql-test/var/run/mysqld.pid
mysql-test/var/slave-data/bar/bar.MYD
mysql-test/var/slave-data/bar/bar.MYI
mysql-test/var/slave-data/bar/bar.frm
mysql-test/var/slave-data/foo/foo.MYD
mysql-test/var/slave-data/foo/foo.MYI
mysql-test/var/slave-data/foo/foo.frm
mysql-test/var/slave-data/master.info
mysql-test/var/slave-data/mysql/columns_priv.MYD
mysql-test/var/slave-data/mysql/columns_priv.MYI
mysql-test/var/slave-data/mysql/columns_priv.frm
mysql-test/var/slave-data/mysql/db.MYD
mysql-test/var/slave-data/mysql/db.MYI
mysql-test/var/slave-data/mysql/db.frm
mysql-test/var/slave-data/mysql/func.MYD
mysql-test/var/slave-data/mysql/func.MYI
mysql-test/var/slave-data/mysql/func.frm
mysql-test/var/slave-data/mysql/host.MYD
mysql-test/var/slave-data/mysql/host.MYI
mysql-test/var/slave-data/mysql/host.frm
mysql-test/var/slave-data/mysql/tables_priv.MYD
mysql-test/var/slave-data/mysql/tables_priv.MYI
mysql-test/var/slave-data/mysql/tables_priv.frm
mysql-test/var/slave-data/mysql/user.MYD
mysql-test/var/slave-data/mysql/user.MYI
mysql-test/var/slave-data/mysql/user.frm
mysql-test/var/slave-data/test/bar.MYD
mysql-test/var/slave-data/test/bar.MYI
mysql-test/var/slave-data/test/bar.frm
mysql-test/var/slave-data/test/choo.MYD
mysql-test/var/slave-data/test/choo.MYI
mysql-test/var/slave-data/test/choo.frm
mysql-test/var/slave-data/test/domain.MYD
mysql-test/var/slave-data/test/domain.MYI
mysql-test/var/slave-data/test/domain.frm
mysql-test/var/slave-data/test/elt_ck1.MYD
mysql-test/var/slave-data/test/elt_ck1.MYI
mysql-test/var/slave-data/test/elt_ck1.frm
mysql-test/var/slave-data/test/elt_ck2.MYD
mysql-test/var/slave-data/test/elt_ck2.MYI
mysql-test/var/slave-data/test/elt_ck2.frm
mysql-test/var/slave-data/test/emails.MYD
mysql-test/var/slave-data/test/emails.MYI
mysql-test/var/slave-data/test/emails.frm
mysql-test/var/slave-data/test/foo.MYD
mysql-test/var/slave-data/test/foo.MYI
mysql-test/var/slave-data/test/foo.frm
mysql-test/var/slave-data/test/t.MYD
mysql-test/var/slave-data/test/t.MYI
mysql-test/var/slave-data/test/t.frm
mysql-test/var/slave-data/test/test.MYD
mysql-test/var/slave-data/test/test.MYI
mysql-test/var/slave-data/test/test.frm
mysql-test/var/slave-data/test/words.MYD
mysql-test/var/slave-data/test/words.MYI
mysql-test/var/slave-data/test/words.frm
mysql-test/var/slave-data/test/words1.MYD
mysql-test/var/slave-data/test/words1.MYI
mysql-test/var/slave-data/test/words1.frm
mysql-test/var/slave-data/test/x.MYD
mysql-test/var/slave-data/test/x.MYI
mysql-test/var/slave-data/test/x.frm
mysql-test/var/tmp/README
mysql-test/var/tmp/mysql.sock
mysys/test_charset mysys/test_charset
mysys/test_thr_alarm mysys/test_thr_alarm
mysys/test_thr_lock mysys/test_thr_lock
...@@ -358,6 +128,7 @@ scripts/mysql_setpermission ...@@ -358,6 +128,7 @@ scripts/mysql_setpermission
scripts/mysql_zap scripts/mysql_zap
scripts/mysqlaccess scripts/mysqlaccess
scripts/mysqlbug scripts/mysqlbug
scripts/mysqld_multi
scripts/mysqldumpslow scripts/mysqldumpslow
scripts/mysqlhotcopy scripts/mysqlhotcopy
scripts/safe_mysqld scripts/safe_mysqld
...@@ -375,14 +146,11 @@ sql-bench/test-create ...@@ -375,14 +146,11 @@ sql-bench/test-create
sql-bench/test-insert sql-bench/test-insert
sql-bench/test-select sql-bench/test-select
sql-bench/test-wisconsin sql-bench/test-wisconsin
sql/.gdb_history
sql/gen_lex_hash sql/gen_lex_hash
sql/lex_hash.h sql/lex_hash.h
sql/mini_client_errors.c sql/mini_client_errors.c
sql/mysqlbinlog sql/mysqlbinlog
sql/mysqld sql/mysqld
sql/share/norwegian-ny/errmsg.sys
sql/share/norwegian/errmsg.sys
sql/sql_yacc.cc sql/sql_yacc.cc
sql/sql_yacc.h sql/sql_yacc.h
stamp-h stamp-h
...@@ -402,3 +170,4 @@ support-files/mysql-3.23.29-gamma.spec ...@@ -402,3 +170,4 @@ support-files/mysql-3.23.29-gamma.spec
support-files/mysql-log-rotate support-files/mysql-log-rotate
support-files/mysql.server support-files/mysql.server
support-files/mysql.spec support-files/mysql.spec
tags
...@@ -40,19 +40,9 @@ int myrg_extra(MYRG_INFO *info,enum ha_extra_function function) ...@@ -40,19 +40,9 @@ int myrg_extra(MYRG_INFO *info,enum ha_extra_function function)
info->current_table=0; info->current_table=0;
info->last_used_table=info->open_tables; info->last_used_table=info->open_tables;
} }
info->records=info->del=info->data_file_length=0;
for (file=info->open_tables ; file != info->end_table ; file++) for (file=info->open_tables ; file != info->end_table ; file++)
{
if ((error=mi_extra(file->table,function))) if ((error=mi_extra(file->table,function)))
save_error=error; save_error=error;
file->file_offset=info->data_file_length;
info->data_file_length+=file->table->s->state.state.data_file_length;
info->records+=file->table->s->state.state.records;
info->del+=file->table->s->state.state.del;
DBUG_PRINT("info2",("table: %s, offset: 0x%08lx",
file->table->filename,(ulong)file->file_offset));
}
} }
DBUG_RETURN(save_error); DBUG_RETURN(save_error);
} }
/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB /* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
This program is free software; you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or the Free Software Foundation; either version 2 of the License, or
(at your option) any later version. (at your option) any later version.
This program is distributed in the hope that it will be useful, This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details. GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
...@@ -43,17 +43,27 @@ int myrg_status(MYRG_INFO *info,register MYMERGE_INFO *x,int flag) ...@@ -43,17 +43,27 @@ int myrg_status(MYRG_INFO *info,register MYMERGE_INFO *x,int flag)
(ulong) -1L; (ulong) -1L;
if (flag != HA_STATUS_POS) if (flag != HA_STATUS_POS)
{ {
MYRG_TABLE *file;
info->records=info->del=info->data_file_length=0;
for (file=info->open_tables ; file != info->end_table ; file++)
{
file->file_offset=info->data_file_length;
info->data_file_length+=file->table->s->state.state.data_file_length;
info->records+=file->table->s->state.state.records;
info->del+=file->table->s->state.state.del;
DBUG_PRINT("info2",("table: %s, offset: 0x%08lx",
file->table->filename,(ulong)file->file_offset));
}
x->records = info->records; x->records = info->records;
x->deleted = info->del; x->deleted = info->del;
x->data_file_length = info->data_file_length; x->data_file_length = info->data_file_length;
x->reclength = info->reclength; x->reclength = info->reclength;
x->options = info->options;
if (current_table) if (current_table)
x->errkey = current_table->table->errkey; x->errkey = current_table->table->errkey;
else else
{ /* No tables in MRG */
x->errkey=0; x->errkey=0;
}
x->options = info->options;
} }
DBUG_RETURN(0); DBUG_RETURN(0);
} }
...@@ -740,7 +740,6 @@ TABLE *open_table(THD *thd,const char *db,const char *table_name, ...@@ -740,7 +740,6 @@ TABLE *open_table(THD *thd,const char *db,const char *table_name,
} }
table->prev->next=table->next; /* Remove from unused list */ table->prev->next=table->next; /* Remove from unused list */
table->next->prev=table->prev; table->next->prev=table->prev;
table->file->reset();
} }
else else
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment