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 /sql/ha_myisammrg.cc | |
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 'sql/ha_myisammrg.cc')
-rw-r--r-- | sql/ha_myisammrg.cc | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/sql/ha_myisammrg.cc b/sql/ha_myisammrg.cc index abcf81806ad..92c1372a7a1 100644 --- a/sql/ha_myisammrg.cc +++ b/sql/ha_myisammrg.cc @@ -66,7 +66,13 @@ int ha_myisammrg::close(void) int ha_myisammrg::write_row(byte * buf) { - return (my_errno=HA_ERR_WRONG_COMMAND); + statistic_increment(ha_write_count,&LOCK_status); + if (table->time_stamp) + update_timestamp(buf+table->time_stamp-1); + if (table->next_number_field && buf == table->record[0]) + return (my_errno=HA_ERR_WRONG_COMMAND); + // update_auto_increment(); - [phi] have to check this before allowing it + return myrg_write(file,buf); } int ha_myisammrg::update_row(const byte * old_data, byte * new_data) @@ -217,6 +223,7 @@ THR_LOCK_DATA **ha_myisammrg::store_lock(THD *thd, void ha_myisammrg::update_create_info(HA_CREATE_INFO *create_info) { + // [phi] auto_increment stuff is missing (but currently not needed) DBUG_ENTER("ha_myisammrg::update_create_info"); if (!(create_info->used_fields & HA_CREATE_USED_UNION)) { @@ -241,6 +248,10 @@ void ha_myisammrg::update_create_info(HA_CREATE_INFO *create_info) } *create_info->merge_list.next=0; } + if (!(create_info->used_fields & HA_CREATE_USED_INSERT_METHOD)) + { + create_info->merge_insert_method = file->merge_insert_method; + } DBUG_VOID_RETURN; err: @@ -263,12 +274,20 @@ int ha_myisammrg::create(const char *name, register TABLE *form, *pos++= tables->real_name; *pos=0; DBUG_RETURN(myrg_create(fn_format(buff,name,"","",2+4+16), - (const char **) table_names, (my_bool) 0)); + (const char **) table_names, + create_info->merge_insert_method, + (my_bool) 0)); } void ha_myisammrg::append_create_info(String *packet) { char buff[FN_REFLEN]; + if (file->merge_insert_method != MERGE_INSERT_DISABLED) + { + packet->append(" INSERT_METHOD=",15); + const char *tmp = get_type(&merge_insert_method,file->merge_insert_method); + packet->append(tmp); + } packet->append(" UNION=(",8); MYRG_TABLE *table,*first; |