summaryrefslogtreecommitdiff
path: root/myisam
diff options
context:
space:
mode:
authorunknown <monty@donna.mysql.com>2000-11-28 04:47:47 +0200
committerunknown <monty@donna.mysql.com>2000-11-28 04:47:47 +0200
commit746f0b3b762f2a9d31347dfddf4b07a1621fc15b (patch)
treee3d40dd7c6a7e86bd2388da19d59d5a372bf7bb8 /myisam
parent2700d28319bf29ee3957a357eaa102bcc72e1ac4 (diff)
downloadmariadb-git-746f0b3b762f2a9d31347dfddf4b07a1621fc15b.tar.gz
New thr_alarm struct for better integration with OS2
Run bootstrap in separate thread Fix bug in FLUSH TABLES table_name Docs/manual.texi: Updated ChangeLog client/mysql.cc: Added info about compressed protocol include/getopt.h: Fix for OS2 include/global.h: Fix for OS2 include/my_sys.h: Fix for OS2 include/mysql_com.h: Fix for OS2 include/thr_alarm.h: Cleanup up alarm struct for OS2 port isam/isamchk.c: Fix for OS2 libmysql/libmysql.c: cleanup libmysql/net.c: Use new thr_alarm libmysql/violite.c: Fix for OS2 myisam/ChangeLog: Changes myisam/mi_create.c: Use less stack myisam/myisamchk.c: Fix for OS2 mysys/default.c: Fix for OS2 mysys/getopt.c: Fix for OS2 mysys/mf_format.c: Safety mysys/mf_path.c: Fix for OS2 mysys/my_create.c: Fix for OS2 mysys/my_lock.c: Fix for OS2 mysys/my_open.c: Fix for OS2 mysys/thr_alarm.c: Use new thr_alarm struct readline/input.c: Fix for OS2 readline/rltty.c: Fix for OS2 sql/ha_myisam.cc: Remove unnecessary fn_format sql/my_lock.c: Use new thr_alarm sql/mysql_priv.h: Changed bootstrap to run in separate thread to avoid problem with small stack sql/mysqld.cc: Changed bootstrap to run in separate thread to avoid problem with small stack sql/net_serv.cc: Use new thr_alarm sql/sql_base.cc: Fix problem with FLUSH TABLE table_name sql/sql_class.cc: Fix for new bootstrap sql/sql_class.h: cleanup sql/sql_delete.cc: cleanup sql/sql_load.cc: Fix for OS2 sql/sql_parse.cc: Changed bootstrap to run in separate thread to avoid problem with small stack sql/sql_select.cc: Reset used structure elements sql/sql_table.cc: For OS2 sql/violite.c: For OS2
Diffstat (limited to 'myisam')
-rw-r--r--myisam/ChangeLog4
-rw-r--r--myisam/mi_create.c14
-rw-r--r--myisam/myisamchk.c4
3 files changed, 18 insertions, 4 deletions
diff --git a/myisam/ChangeLog b/myisam/ChangeLog
index d212039fedf..504202be43f 100644
--- a/myisam/ChangeLog
+++ b/myisam/ChangeLog
@@ -1,3 +1,7 @@
+2000-11-27 Michael Widenius <monty@mysql.com>
+
+* Changed mi_create.c to use less stack.
+
2000-08-23 Michael Widenius <monty@mysql.com>
* Fixed bug when comparing DECIMAL/NUMERIC key parts.
diff --git a/myisam/mi_create.c b/myisam/mi_create.c
index 92aef5e25de..38573951468 100644
--- a/myisam/mi_create.c
+++ b/myisam/mi_create.c
@@ -43,7 +43,7 @@ int mi_create(const char *name,uint keys,MI_KEYDEF *keydefs,
base_pos,varchar_count,long_varchar_count,varchar_length,
max_key_block_length,unique_key_parts,offset;
ulong reclength, real_reclength,min_pack_length;
- char buff[max(FN_REFLEN,2048)];
+ char buff[FN_REFLEN];
ulong pack_reclength;
ulonglong tot_length,max_rows;
enum en_fieldtype type;
@@ -52,7 +52,7 @@ int mi_create(const char *name,uint keys,MI_KEYDEF *keydefs,
MI_UNIQUEDEF *uniquedef;
MI_KEYSEG *keyseg,tmp_keyseg;
MI_COLUMNDEF *rec;
- ulong rec_per_key_part[MI_MAX_POSSIBLE_KEY*MI_MAX_KEY_SEG];
+ ulong *rec_per_key_part;
my_off_t key_root[MI_MAX_POSSIBLE_KEY],key_del[MI_MAX_KEY_BLOCK_SIZE];
MI_CREATE_INFO tmp_create_info;
DBUG_ENTER("mi_create");
@@ -87,7 +87,12 @@ int mi_create(const char *name,uint keys,MI_KEYDEF *keydefs,
}
if (ci->reloc_rows > ci->max_rows)
- ci->reloc_rows=ci->max_rows; /* Check if wrong parameter */
+ ci->reloc_rows=ci->max_rows; /* Check if wrong parameter */
+
+ if (!(rec_per_key_part=
+ (ulong*) my_malloc((keys + uniques)*MI_MAX_KEY_SEG*sizeof(long),
+ MYF(MY_WME | MY_ZEROFILL))))
+ DBUG_RETURN(my_errno);
/* Start by checking fields and field-types used */
@@ -214,7 +219,6 @@ int mi_create(const char *name,uint keys,MI_KEYDEF *keydefs,
max_key_length=0; tot_length=0 ; key_segs=0;
max_key_block_length=0;
share.state.rec_per_key_part=rec_per_key_part;
- bzero((char*) rec_per_key_part,sizeof(rec_per_key_part));
share.state.key_root=key_root;
share.state.key_del=key_del;
if (uniques)
@@ -581,6 +585,7 @@ int mi_create(const char *name,uint keys,MI_KEYDEF *keydefs,
pthread_mutex_unlock(&THR_LOCK_myisam);
if (my_close(file,MYF(0)))
goto err;
+ my_free((char*) rec_per_key_part,MYF(0));
DBUG_RETURN(0);
err:
@@ -606,6 +611,7 @@ err:
my_delete(buff,MYF(0));
}
}
+ my_free((char*) rec_per_key_part, MYF(0));
DBUG_RETURN(my_errno=save_errno); /* return the fatal errno */
}
diff --git a/myisam/myisamchk.c b/myisam/myisamchk.c
index f2b3f337c67..1201b7b6657 100644
--- a/myisam/myisamchk.c
+++ b/myisam/myisamchk.c
@@ -84,6 +84,10 @@ int main(int argc, char **argv)
int error;
MY_INIT(argv[0]);
+#ifdef __EMX__
+ _wildcard (&argc, &argv);
+#endif
+
myisamchk_init(&check_param);
check_param.opt_lock_memory=1; /* Lock memory if possible */
check_param.using_global_keycache = 0;