2645 Sergey Vojtovich 2008-06-26
WL#4037 - Online backup: Use zlib compression to reduce backup
file size
Fixed uninitialized variables.
modified:
sql/backup/stream.cc
sql/sql_yacc.yy
=== modified file 'sql/backup/stream.cc'
--- a/sql/backup/stream.cc 2008-06-25 13:30:04 +0000
+++ b/sql/backup/stream.cc 2008-06-26 10:38:48 +0000
@@ -388,6 +388,7 @@ bool Output_stream::rewind()
Input_stream::Input_stream(Logger &log, const ::String &name)
:Stream(log, name, O_RDONLY)
{
+ m_with_compression= false;
stream.read= stream_read;
}
@@ -487,8 +488,10 @@ bool Input_stream::open()
if ((zerr= inflateInit2(&zstream, MAX_WBITS + 16)) != Z_OK)
{
m_log.report_error(ER_GET_ERRMSG, zerr, zstream.msg, "inflateInit2");
+ my_free(zbuf, MYF(0));
return FALSE;
}
+ m_with_compression= true;
blob.begin= m_header_buf;
blob.end= m_header_buf + 10;
if (stream_read((fd_stream*) this, &blob, blob) != BSTREAM_OK ||
=== modified file 'sql/sql_yacc.yy'
--- a/sql/sql_yacc.yy 2008-06-25 13:30:04 +0000
+++ b/sql/sql_yacc.yy 2008-06-26 10:38:48 +0000
@@ -6329,7 +6329,7 @@ backup:
;
opt_compression:
- /* empty */ {}
+ /* empty */ { Lex->backup_compression= false; }
| WITH COMPRESSION_SYM opt_compression_algorithm
{
Lex->backup_compression= true;
| Thread |
|---|
| • bzr push into mysql-6.0-backup branch (svoj:2645) WL#4037 | Sergey Vojtovich | 26 Jun |