diff options
author | unknown <sasha@mysql.sashanet.com> | 2000-12-14 17:43:13 -0700 |
---|---|---|
committer | unknown <sasha@mysql.sashanet.com> | 2000-12-14 17:43:13 -0700 |
commit | 93166332704c583cfd4d4898f8c99650dfd6193a (patch) | |
tree | 55a697410acedbe124dbbe573bbae54b7afd556b /myisammrg | |
parent | f48d4424b025ed44f4a9726537437a269b26a2f4 (diff) | |
download | mariadb-git-93166332704c583cfd4d4898f8c99650dfd6193a.tar.gz |
client/mysqltest.c
added system command
myisammrg/myrg_open.c
fixed coredump when opening an empty union table
sql/sql_repl.cc
fixed warnings, remove confusing comment, fixed coredump in
change master to when master.info was corrupted
added new replication test case
client/mysqltest.c:
added system command
myisammrg/myrg_open.c:
fixed coredump when opening an empty union table
sql/sql_repl.cc:
fixed warnings, remove confusing comment, fixed coredump in
change master to when master.info was corrupted
Diffstat (limited to 'myisammrg')
-rw-r--r-- | myisammrg/myrg_open.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/myisammrg/myrg_open.c b/myisammrg/myrg_open.c index 7173eb4230f..f0a2b4348f6 100644 --- a/myisammrg/myrg_open.c +++ b/myisammrg/myrg_open.c @@ -45,6 +45,7 @@ int handle_locking; DBUG_ENTER("myrg_open"); LINT_INIT(last_isam); + LINT_INIT(m_info); isam=0; errpos=files=0; bzero((gptr) &info,sizeof(info)); @@ -84,7 +85,7 @@ int handle_locking; MYF(MY_WME)))) goto err; *m_info=info; - m_info->open_tables=(MYRG_TABLE *) (m_info+1); + m_info->open_tables=(files) ? (MYRG_TABLE *) (m_info+1) : 0; m_info->tables=files; errpos=2; @@ -110,9 +111,10 @@ int handle_locking; my_errno=HA_ERR_RECORD_FILE_FULL; goto err; } - m_info->keys=m_info->open_tables->table->s->base.keys; + m_info->keys=(files) ? m_info->open_tables->table->s->base.keys : 0; bzero((char*) &m_info->by_key,sizeof(m_info->by_key)); + /* this works ok if the table list is empty */ m_info->end_table=m_info->open_tables+files; m_info->last_used_table=m_info->open_tables; |