diff options
author | unknown <monty@hundin.mysql.fi> | 2001-09-22 17:40:57 +0300 |
---|---|---|
committer | unknown <monty@hundin.mysql.fi> | 2001-09-22 17:40:57 +0300 |
commit | e7b9eabecaf2f7da05a934a5c757b438d4406bd6 (patch) | |
tree | 23349a84d09c518565222da27e0607b42d415f18 /myisammrg/myrg_write.c | |
parent | 2504336b415dfbc6f47c7666f986e2eae47921b4 (diff) | |
download | mariadb-git-e7b9eabecaf2f7da05a934a5c757b438d4406bd6.tar.gz |
Added support of INSERT to MERGE tables
Fixes for embedded libary and openssl
BUILD/compile-pentium-debug-max:
Added --with-openssl
acinclude.m4:
Cleanup
client/client_priv.h:
Include mysql_embed.h to remove not used functions in embedded server
client/mysql.cc:
Don't use openssl with embedded server
include/Makefile.am:
Move mysql_embed.h to 'include' directory
include/myisammrg.h:
Added support of INSERT to MERGE tables
include/mysql.h:
Fixes for embedded libary and openssl
include/mysql_com.h:
Fixes for embedded libary and openssl
include/mysql_embed.h:
Fixes for embedded libary and openssl
include/violite.h:
Cleanup
libmysql/libmysql.c:
Safety
libmysqld/examples/Makefile.am:
Fixes for embedded libary and openssl
libmysqld/lib_sql.cc:
Fixes for embedded libary and openssl
libmysqld/lib_vio.c:
Fixes for embedded libary and openssl
libmysqld/libmysqld.c:
Fixes for embedded libary and openssl
myisammrg/Makefile.am:
Added support of INSERT to MERGE tables
myisammrg/myrg_create.c:
Added support of INSERT to MERGE tables
myisammrg/myrg_open.c:
Added support of INSERT to MERGE tables
myisammrg/myrg_static.c:
Added support of INSERT to MERGE tables
mysql-test/t/union.test:
Portability fix
sql/Makefile.am:
Fixes for embedded libary and openssl
sql/gen_lex_hash.cc:
Added support of INSERT to MERGE tables
sql/ha_myisammrg.cc:
Added support of INSERT to MERGE tables
sql/handler.h:
Added support of INSERT to MERGE tables
sql/mini_client.cc:
Fixes for embedded libary and openssl
sql/net_serv.cc:
Fixes for embedded libary and openssl
sql/sql_show.cc:
Cleanup
Build-tools/Do-all-build-steps:
Don't build openssl (Need to add proper configure test when to build ssl)
sql/lex.h:
Added support of INSERT to MERGE tables
sql/sql_yacc.yy:
Fixes for embedded libary and openssl
Diffstat (limited to 'myisammrg/myrg_write.c')
-rw-r--r-- | myisammrg/myrg_write.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/myisammrg/myrg_write.c b/myisammrg/myrg_write.c new file mode 100644 index 00000000000..b1b0b33f73d --- /dev/null +++ b/myisammrg/myrg_write.c @@ -0,0 +1,30 @@ +/* Copyright (C) 2001 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 */ + +/* Write a row to a MyISAM MERGE table */ + +#include "mymrgdef.h" + +int myrg_write(register MYRG_INFO *info, byte *rec) +{ + /* [phi] MERGE_WRITE_DISABLED is handled by the else case */ + if (info->merge_insert_method == MERGE_INSERT_TO_FIRST) + return mi_write(info->open_tables[0].table,rec); + else if (info->merge_insert_method == MERGE_INSERT_TO_LAST) + return mi_write(info->end_table[-1].table,rec); + else /* unsupported insertion method */ + return (my_errno=HA_ERR_WRONG_COMMAND); +} |