summaryrefslogtreecommitdiff
path: root/myisammrg/myrg_open.c
diff options
context:
space:
mode:
Diffstat (limited to 'myisammrg/myrg_open.c')
-rw-r--r--myisammrg/myrg_open.c23
1 files changed, 11 insertions, 12 deletions
diff --git a/myisammrg/myrg_open.c b/myisammrg/myrg_open.c
index ce2c97e1276..9fa89b315ff 100644
--- a/myisammrg/myrg_open.c
+++ b/myisammrg/myrg_open.c
@@ -30,10 +30,10 @@
*/
-MYRG_INFO *myrg_open(name,mode,handle_locking)
-const char *name;
-int mode;
-int handle_locking;
+MYRG_INFO *myrg_open(
+const char *name,
+int mode,
+int handle_locking)
{
int save_errno,i,errpos;
uint files,dir_length,length,options;
@@ -65,7 +65,6 @@ int handle_locking;
end[-1]='\0';
if (buff[0] && buff[0] != '#') /* Skipp empty lines and comments */
{
- last_isam=isam;
if (!test_if_hard_path(buff))
{
VOID(strmake(name_buff+dir_length,buff,
@@ -75,14 +74,14 @@ int handle_locking;
if (!(isam=mi_open(buff,mode,test(handle_locking))))
goto err;
files++;
+ last_isam=isam;
+ if (info.reclength && info.reclength != isam->s->base.reclength)
+ {
+ my_errno=HA_ERR_WRONG_IN_RECORD;
+ goto err;
+ }
+ info.reclength=isam->s->base.reclength;
}
- last_isam=isam;
- if (info.reclength && info.reclength != isam->s->base.reclength)
- {
- my_errno=HA_ERR_WRONG_IN_RECORD;
- goto err;
- }
- info.reclength=isam->s->base.reclength;
}
if (!(m_info= (MYRG_INFO*) my_malloc(sizeof(MYRG_INFO)+
files*sizeof(MYRG_TABLE),