after merge fix

parent 5fae48d9
......@@ -1575,7 +1575,7 @@ create table bug15205 (val int(11) default null) engine=csv;
create table bug15205_2 (val int(11) default null) engine=csv;
--exec rm $MYSQLTEST_VARDIR/master-data/test/bug15205.CSV
# system error (can't open the datafile)
--error ER_GET_ERRNO
--error 13
select * from bug15205;
select * from bug15205_2;
--exec touch $MYSQLTEST_VARDIR/master-data/test/bug15205.CSV
......
......@@ -229,6 +229,11 @@ static TINA_SHARE *get_share(const char *table_name, TABLE *table)
MY_REPLACE_EXT|MY_UNPACK_FILENAME);
fn_format(meta_file_name, table_name, "", CSM_EXT,
MY_REPLACE_EXT|MY_UNPACK_FILENAME);
if (my_stat(share->data_file_name, &file_stat, MYF(MY_WME)) == NULL)
goto error;
share->saved_data_file_length= file_stat.st_size;
if (my_hash_insert(&tina_open_tables, (byte*) share))
goto error;
thr_lock_init(&share->lock);
......@@ -250,10 +255,6 @@ static TINA_SHARE *get_share(const char *table_name, TABLE *table)
*/
if (read_meta_file(share->meta_file, &share->rows_recorded))
share->crashed= TRUE;
if (my_stat(share->data_file_name, &file_stat, MYF(MY_WME)) == NULL)
goto error2;
share->saved_data_file_length= file_stat.st_size;
}
share->use_count++;
pthread_mutex_unlock(&tina_mutex);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment