After merge fixes
This commit is contained in:
commit
459fa7f1f9
@ -9,5 +9,5 @@ then
|
|||||||
(cd gemini && aclocal && autoheader && aclocal && automake && autoconf)
|
(cd gemini && aclocal && autoheader && aclocal && automake && autoconf)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
CC=ecc CFLAGS="-w1 -DEXTRA_DEBUG -DSAFEMALLOC -DSAFE_MUTEX -O2" CXX=ecc CXXFLAGS="-w1 -DEXTRA_DEBUG -DSAFEMALLOC -DSAFE_MUTEX -O2" ./configure --prefix=/usr/local/mysql --with-extra-charsets=complex --enable-thread-safe-client --with-mysqld-ldflags=-all-static --with-client-ldflags=-all-static --with-debug --with-innodb --with-embedded-server
|
CC=ecc CFLAGS="-w1 -DEXTRA_DEBUG -DSAFEMALLOC -DSAFE_MUTEX -O2" CXX=ecc CXXFLAGS="-w1 -DEXTRA_DEBUG -DSAFEMALLOC -DSAFE_MUTEX -O2" ./configure --prefix=/usr/local/mysql --with-extra-charsets=complex --enable-thread-safe-client --with-mysqld-ldflags=-all-static --with-client-ldflags=-all-static --with-debug --with-innodb --with-embedded-server --with-archive-storage-engine
|
||||||
gmake
|
gmake
|
||||||
|
@ -43,18 +43,20 @@
|
|||||||
handle bulk inserts as well (that is if someone was trying to read at
|
handle bulk inserts as well (that is if someone was trying to read at
|
||||||
the same time since we would want to flush).
|
the same time since we would want to flush).
|
||||||
|
|
||||||
A "meta" file is kept. All this file does is contain information on
|
A "meta" file is kept alongside the data file. This file serves two purpose.
|
||||||
the number of rows.
|
The first purpose is to track the number of rows in the table. The second
|
||||||
|
purpose is to determine if the table was closed properly or not. When the
|
||||||
|
meta file is first opened it is marked as dirty. It is opened when the table
|
||||||
|
itself is opened for writing. When the table is closed the new count for rows
|
||||||
|
is written to the meta file and the file is marked as clean. If the meta file
|
||||||
|
is opened and it is marked as dirty, it is assumed that a crash occured. At
|
||||||
|
this point an error occurs and the user is told to rebuild the file.
|
||||||
|
A rebuild scans the rows and rewrites the meta file. If corruption is found
|
||||||
|
in the data file then the meta file is not repaired.
|
||||||
|
|
||||||
No attempts at durability are made. You can corrupt your data. A repair
|
At some point a recovery method for such a drastic case needs to be divised.
|
||||||
method was added to repair the meta file that stores row information,
|
|
||||||
but if your data file gets corrupted I haven't solved that. I could
|
|
||||||
create a repair that would solve this, but do you want to take a
|
|
||||||
chance of loosing your data?
|
|
||||||
|
|
||||||
Locks are row level, and you will get a consistant read. Transactions
|
Locks are row level, and you will get a consistant read.
|
||||||
will be added later (they are not that hard to add at this
|
|
||||||
stage).
|
|
||||||
|
|
||||||
For performance as far as table scans go it is quite fast. I don't have
|
For performance as far as table scans go it is quite fast. I don't have
|
||||||
good numbers but locally it has out performed both Innodb and MyISAM. For
|
good numbers but locally it has out performed both Innodb and MyISAM. For
|
||||||
@ -89,7 +91,6 @@
|
|||||||
compression but may speed up ordered searches).
|
compression but may speed up ordered searches).
|
||||||
Checkpoint the meta file to allow for faster rebuilds.
|
Checkpoint the meta file to allow for faster rebuilds.
|
||||||
Dirty open (right now the meta file is repaired if a crash occured).
|
Dirty open (right now the meta file is repaired if a crash occured).
|
||||||
Transactions.
|
|
||||||
Option to allow for dirty reads, this would lower the sync calls, which would make
|
Option to allow for dirty reads, this would lower the sync calls, which would make
|
||||||
inserts a lot faster, but would mean highly arbitrary reads.
|
inserts a lot faster, but would mean highly arbitrary reads.
|
||||||
|
|
||||||
@ -343,6 +344,7 @@ ARCHIVE_SHARE *ha_archive::get_share(const char *table_name, TABLE *table)
|
|||||||
opposite. If the meta file will not open we assume it is crashed and
|
opposite. If the meta file will not open we assume it is crashed and
|
||||||
leave it up to the user to fix.
|
leave it up to the user to fix.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (read_meta_file(share->meta_file, &share->rows_recorded))
|
if (read_meta_file(share->meta_file, &share->rows_recorded))
|
||||||
share->crashed= TRUE;
|
share->crashed= TRUE;
|
||||||
else
|
else
|
||||||
@ -393,7 +395,8 @@ int ha_archive::free_share(ARCHIVE_SHARE *share)
|
|||||||
(void)write_meta_file(share->meta_file, share->rows_recorded, FALSE);
|
(void)write_meta_file(share->meta_file, share->rows_recorded, FALSE);
|
||||||
if (gzclose(share->archive_write) == Z_ERRNO)
|
if (gzclose(share->archive_write) == Z_ERRNO)
|
||||||
rc= 1;
|
rc= 1;
|
||||||
my_close(share->meta_file,MYF(0));
|
if (my_close(share->meta_file, MYF(0)))
|
||||||
|
rc= 1;
|
||||||
my_free((gptr) share, MYF(0));
|
my_free((gptr) share, MYF(0));
|
||||||
}
|
}
|
||||||
pthread_mutex_unlock(&archive_mutex);
|
pthread_mutex_unlock(&archive_mutex);
|
||||||
|
@ -4871,12 +4871,12 @@ ha_innobase::update_table_comment(
|
|||||||
dict_print_info_on_foreign_keys(FALSE, file,
|
dict_print_info_on_foreign_keys(FALSE, file,
|
||||||
prebuilt->trx, prebuilt->table);
|
prebuilt->trx, prebuilt->table);
|
||||||
flen = ftell(file);
|
flen = ftell(file);
|
||||||
if(length + flen + 3 > 64000) {
|
if (flen < 0) {
|
||||||
|
flen = 0;
|
||||||
|
} else if (length + flen + 3 > 64000) {
|
||||||
flen = 64000 - 3 - length;
|
flen = 64000 - 3 - length;
|
||||||
}
|
}
|
||||||
|
|
||||||
ut_ad(flen > 0);
|
|
||||||
|
|
||||||
/* allocate buffer for the full string, and
|
/* allocate buffer for the full string, and
|
||||||
read the contents of the temporary file */
|
read the contents of the temporary file */
|
||||||
|
|
||||||
@ -4940,12 +4940,12 @@ ha_innobase::get_foreign_key_create_info(void)
|
|||||||
prebuilt->trx->op_info = (char*)"";
|
prebuilt->trx->op_info = (char*)"";
|
||||||
|
|
||||||
flen = ftell(file);
|
flen = ftell(file);
|
||||||
if(flen > 64000 - 1) {
|
if (flen < 0) {
|
||||||
|
flen = 0;
|
||||||
|
} else if(flen > 64000 - 1) {
|
||||||
flen = 64000 - 1;
|
flen = 64000 - 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
ut_ad(flen >= 0);
|
|
||||||
|
|
||||||
/* allocate buffer for the string, and
|
/* allocate buffer for the string, and
|
||||||
read the contents of the temporary file */
|
read the contents of the temporary file */
|
||||||
|
|
||||||
@ -5546,12 +5546,12 @@ innodb_show_status(
|
|||||||
srv_printf_innodb_monitor(srv_monitor_file);
|
srv_printf_innodb_monitor(srv_monitor_file);
|
||||||
flen = ftell(srv_monitor_file);
|
flen = ftell(srv_monitor_file);
|
||||||
os_file_set_eof(srv_monitor_file);
|
os_file_set_eof(srv_monitor_file);
|
||||||
if(flen > 64000 - 1) {
|
if (flen < 0) {
|
||||||
|
flen = 0;
|
||||||
|
} else if (flen > 64000 - 1) {
|
||||||
flen = 64000 - 1;
|
flen = 64000 - 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
ut_ad(flen > 0);
|
|
||||||
|
|
||||||
/* allocate buffer for the string, and
|
/* allocate buffer for the string, and
|
||||||
read the contents of the temporary file */
|
read the contents of the temporary file */
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user