Below is the list of changes that have just been committed into a local
5.2 repository of rafal. When rafal 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, 2007-09-11 11:29:35+02:00, rafal@quant.(none) +3 -0
BUG#30947 (BACKUP DATABASE fails if table definitions are larger than
4kbyte):
This is fixed by increasing the limit on single data chunk size to a
more realistic value of 2MB. Now backup should work as long as
definitions of all tables being backed-up fit into 2MB. The limits are
configurable through constants defined in backup/stream.h.
mysql-test/r/backup.result@stripped, 2007-09-11 11:29:28+02:00, rafal@quant.(none) +4 -4
Change of results due to different size of data buffers used by
backup kernel.
sql/backup/data_backup.cc@stripped, 2007-09-11 11:29:29+02:00, rafal@quant.(none) +1 -1
Use data buffers of size io_buffer_size instead of fixed 2kB.
sql/backup/stream.h@stripped, 2007-09-11 11:29:29+02:00, rafal@quant.(none) +11 -1
Define parameters for data buffer size and maximal chunk size.
diff -Nrup a/mysql-test/r/backup.result b/mysql-test/r/backup.result
--- a/mysql-test/r/backup.result 2007-06-29 07:15:41 +02:00
+++ b/mysql-test/r/backup.result 2007-09-11 11:29:28 +02:00
@@ -321,17 +321,17 @@ BACKUP DATABASE bup_default TO "bup_defa
Backup Summary
header = 43 bytes
meta-data = 890 bytes
- data = 7425 bytes
+ data = 7411 bytes
--------------
- total 8358 bytes
+ total 8344 bytes
DROP DATABASE bup_default;
RESTORE FROM "bup_default.bak";
Restore Summary
header = 43 bytes
meta-data = 890 bytes
- data = 7425 bytes
+ data = 7411 bytes
--------------
- total 8358 bytes
+ total 8344 bytes
SELECT * FROM bup_default.t1;
a
1
diff -Nrup a/sql/backup/data_backup.cc b/sql/backup/data_backup.cc
--- a/sql/backup/data_backup.cc 2007-08-20 10:37:06 +02:00
+++ b/sql/backup/data_backup.cc 2007-09-11 11:29:29 +02:00
@@ -299,7 +299,7 @@ class Scheduler::Pump: public Backup_pum
public:
Pump(uint no, Image_info &img, OStream &s):
- Backup_pump(no,img,bw), start_pos(0), bw(2048,s)
+ Backup_pump(no,img,bw), start_pos(0), bw(io_buffer_size,s)
{}
size_t pos() const
diff -Nrup a/sql/backup/stream.h b/sql/backup/stream.h
--- a/sql/backup/stream.h 2007-08-20 10:37:06 +02:00
+++ b/sql/backup/stream.h 2007-09-11 11:29:29 +02:00
@@ -9,6 +9,16 @@
Generic Stream Interface for serializing basic types (integers, strings etc).
*/
+
+namespace backup {
+
+// TODO: remove the upper limit on chunk size
+
+const size_t io_buffer_size= 1024*1024; // buffer size for kernel/driver data transfers
+const size_t max_chunk_size= 2*1024*1024; // upper limit on a single chunk size
+
+}
+
namespace util
{
@@ -446,7 +456,7 @@ class Window
last_byte(m_buf+buf_size), m_head(m_buf), m_end(m_buf), m_blocked(FALSE)
{}
- static const size_t buf_size= 4*1024; ///< data buffer size
+ static const size_t buf_size= max_chunk_size; ///< data buffer size
byte m_buf[buf_size];
byte *last_byte; ///< points at the byte after the last byte of m_buf
| Thread |
|---|
| • bk commit into 5.2 tree (rafal:1.2600) BUG#30947 | rsomla | 11 Sep |