summaryrefslogtreecommitdiff
path: root/myisammrg
diff options
context:
space:
mode:
authormonty@donna.mysql.fi <>2001-05-12 14:03:53 +0300
committermonty@donna.mysql.fi <>2001-05-12 14:03:53 +0300
commit03f94c5c8d752c190e79c33e36cfe1e8f016cc4d (patch)
treee65fc5bd426965f04c6e2e2becac2c2309be48ea /myisammrg
parent9ee2a297c02ae7f1a3a0fd606e91aea3a10ff1b4 (diff)
downloadmariadb-git-03f94c5c8d752c190e79c33e36cfe1e8f016cc4d.tar.gz
Only mark MERGE readonly if all tables are readonly
Optimize some queries when using LIMIT
Diffstat (limited to 'myisammrg')
-rw-r--r--myisammrg/myrg_open.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/myisammrg/myrg_open.c b/myisammrg/myrg_open.c
index f73339f63c8..ce2c97e1276 100644
--- a/myisammrg/myrg_open.c
+++ b/myisammrg/myrg_open.c
@@ -36,7 +36,7 @@ int mode;
int handle_locking;
{
int save_errno,i,errpos;
- uint files,dir_length,length;
+ uint files,dir_length,length,options;
ulonglong file_offset;
char name_buff[FN_REFLEN*2],buff[FN_REFLEN],*end;
MYRG_INFO info,*m_info;
@@ -93,16 +93,22 @@ int handle_locking;
m_info->tables=files;
errpos=2;
+ options= (uint) ~0;
for (i=files ; i-- > 0 ; )
{
m_info->open_tables[i].table=isam;
m_info->options|=isam->s->options;
+ options&=isam->s->options;
m_info->records+=isam->state->records;
m_info->del+=isam->state->del;
m_info->data_file_length+=isam->state->data_file_length;
if (i)
isam=(MI_INFO*) (isam->open_list.next->data);
}
+ /* Don't force readonly if not all tables are readonly */
+ if (! (options & (HA_OPTION_COMPRESS_RECORD | HA_OPTION_READ_ONLY_DATA)))
+ m_info->options&= ~(HA_OPTION_COMPRESS_RECORD | HA_OPTION_READ_ONLY_DATA);
+
/* Fix fileinfo for easyer debugging (actually set by rrnd) */
file_offset=0;
for (i=0 ; (uint) i < files ; i++)