Below is the list of changes that have just been committed into a local
5.0 repository of svoj. When svoj does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet@stripped, 2006-09-14 11:19:11+05:00, svoj@april.(none) +1 -0
BUG#21675 - engine=archive 2GB file limit, when reached mysqld restarts on any query
If mysqld is linked against system installed zlib (which is likely compiled w/o
LFS) and archive table exceedes 2G, mysqld will likely be terminated with SIGXFSZ.
Prior to actual write perform a check if there is space in data file. This fixes
abnormal process termination with SIGXFSZ.
No test case for this bugfix.
sql/ha_archive.cc@stripped, 2006-09-14 11:19:09+05:00, svoj@april.(none) +9 -2
Prior to actual write perform a check if there is space in data file. This fixes
abnormal process termination with SIGXFSZ.
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: svoj
# Host: april.(none)
# Root: /home/svoj/devel/mysql/BUG21675/mysql-5.0-engines
--- 1.70/sql/ha_archive.cc 2006-09-14 11:19:15 +05:00
+++ 1.71/sql/ha_archive.cc 2006-09-14 11:19:15 +05:00
@@ -651,10 +651,17 @@
*/
int ha_archive::real_write_row(byte *buf, gzFile writer)
{
- z_off_t written;
+ z_off_t written, total_row_length;
uint *ptr, *end;
DBUG_ENTER("ha_archive::real_write_row");
-
+ total_row_length= table->s->reclength;
+ for (ptr= table->s->blob_field, end= ptr + table->s->blob_fields;
+ ptr != end; ptr++)
+ total_row_length+= ((Field_blob*) table->field[*ptr])->get_length();
+ info(HA_STATUS_TIME);
+ if (data_file_length > (my_off_t) ((z_off_t) (~(1 << (ref_length * 8 - 1))) -
+ total_row_length))
+ DBUG_RETURN(HA_ERR_RECORD_FILE_FULL);
written= gzwrite(writer, buf, table->s->reclength);
DBUG_PRINT("ha_archive::real_write_row", ("Wrote %d bytes expected %d", written,
table->s->reclength));
if (!delayed_insert || !bulk_insert)
| Thread |
|---|
| • bk commit into 5.0 tree (svoj:1.2246) BUG#21675 | Sergey Vojtovich | 14 Sep |