diff options
author | unknown <svoj@mysql.com/april.(none)> | 2006-09-29 00:00:27 +0500 |
---|---|---|
committer | unknown <svoj@mysql.com/april.(none)> | 2006-09-29 00:00:27 +0500 |
commit | 59a7f1ab5fe51755413eb75335a8bfd82975acb1 (patch) | |
tree | cb0da6feddaf396d3f2c2ed866624773c0d25da6 /myisammrg | |
parent | 9902c35a45ca3bdc391873c3e2914097870a6e3a (diff) | |
parent | d96989ca654fccc92a4620deca5f709fd84ec3f8 (diff) | |
download | mariadb-git-59a7f1ab5fe51755413eb75335a8bfd82975acb1.tar.gz |
Merge mysql.com:/home/svoj/devel/mysql/BUG21617/mysql-4.1-engines
into mysql.com:/home/svoj/devel/mysql/BUG21617/mysql-5.0-engines
myisammrg/myrg_open.c:
Auto merged
myisammrg/myrg_queue.c:
Auto merged
mysql-test/t/merge.test:
Auto merged
mysql-test/r/merge.result:
Manual merge.
Diffstat (limited to 'myisammrg')
-rw-r--r-- | myisammrg/myrg_open.c | 7 | ||||
-rw-r--r-- | myisammrg/myrg_queue.c | 2 |
2 files changed, 7 insertions, 2 deletions
diff --git a/myisammrg/myrg_open.c b/myisammrg/myrg_open.c index 124d37904a6..af10f0da90b 100644 --- a/myisammrg/myrg_open.c +++ b/myisammrg/myrg_open.c @@ -33,7 +33,7 @@ MYRG_INFO *myrg_open(const char *name, int mode, int handle_locking) { int save_errno,errpos=0; - uint files=0,i,dir_length,length,key_parts; + uint files= 0, i, dir_length, length, key_parts, min_keys= 0; ulonglong file_offset=0; char name_buff[FN_REFLEN*2],buff[FN_REFLEN],*end; MYRG_INFO *m_info=0; @@ -109,6 +109,7 @@ MYRG_INFO *myrg_open(const char *name, int mode, int handle_locking) files= 0; } m_info->reclength=isam->s->base.reclength; + min_keys= isam->s->base.keys; errpos=3; } m_info->open_tables[files].table= isam; @@ -124,6 +125,8 @@ MYRG_INFO *myrg_open(const char *name, int mode, int handle_locking) m_info->records+= isam->state->records; m_info->del+= isam->state->del; m_info->data_file_length+= isam->state->data_file_length; + if (min_keys > isam->s->base.keys) + min_keys= isam->s->base.keys; for (i=0; i < key_parts; i++) m_info->rec_per_key_part[i]+= (isam->s->state.rec_per_key_part[i] / m_info->tables); @@ -141,7 +144,7 @@ MYRG_INFO *myrg_open(const char *name, int mode, int handle_locking) my_errno=HA_ERR_RECORD_FILE_FULL; goto err; } - m_info->keys= files ? isam->s->base.keys : 0; + m_info->keys= min_keys; bzero((char*) &m_info->by_key,sizeof(m_info->by_key)); /* this works ok if the table list is empty */ diff --git a/myisammrg/myrg_queue.c b/myisammrg/myrg_queue.c index 2e600a526c0..74fdddc7748 100644 --- a/myisammrg/myrg_queue.c +++ b/myisammrg/myrg_queue.c @@ -65,6 +65,8 @@ int _myrg_init_queue(MYRG_INFO *info,int inx,enum ha_rkey_function search_flag) error=my_errno; } } + else + my_errno= error= HA_ERR_WRONG_INDEX; return error; } |