Skip to content

Commit

Permalink
SQLyog 12.5.1 GA
Browse files Browse the repository at this point in the history
  • Loading branch information
wyaadarsh committed Jan 15, 2018
1 parent b4a76f7 commit fc1cd0f
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 24 deletions.
4 changes: 2 additions & 2 deletions include/Version.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#define MAJOR_VERSION_INT 12
#define MINOR_VERSION_INT 4
#define UPDATE_VERSION_INT 3
#define MINOR_VERSION_INT 5
#define UPDATE_VERSION_INT 1
#define RELEASE_VERSION_INT 0
#define EXTRAINFO ""
16 changes: 8 additions & 8 deletions src/CommonHelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3819,13 +3819,13 @@ SetMySQLOptions(ConnectionInfo *conn, Tunnel *tunnel, PMYSQL pmysql, wyBool isse


//Session wait_timeout
timeout = conn->m_strwaittimeout.GetAsUInt32();

if(timeout > 28800 || timeout <= 0)
conn->m_strwaittimeout.SetAs("28800");

strtimeout.Sprintf("/*!40101 set @@session.wait_timeout=%s */", conn->m_strwaittimeout.GetString());
mysql_options(*pmysql, MYSQL_INIT_COMMAND, strtimeout.GetString());
if(conn->m_isdeftimeout != wyTrue){
timeout = conn->m_strwaittimeout.GetAsUInt32();
if(timeout > 28800 || timeout <= 0)
conn->m_strwaittimeout.SetAs("28800");
strtimeout.Sprintf("/*!40101 set @@session.wait_timeout=%s */", conn->m_strwaittimeout.GetString());
mysql_options(*pmysql, MYSQL_INIT_COMMAND, strtimeout.GetString());
}
}

//Gets the field inforamtion of the view
Expand Down Expand Up @@ -4090,7 +4090,7 @@ InitConnectionDetails(ConnectionInfo *conn)
conn->m_issslauthchecked = wyFalse;
conn->m_issslchecked = wyFalse;
conn->m_iscompress = wyTrue;
conn->m_isdeftimeout = wyTrue;
conn->m_isdeftimeout = wyTrue;
conn->m_strwaittimeout.SetAs("28800");
conn->m_isreadonly = wyFalse;
//conn->m_ispwdcleartext = wyFalse;
Expand Down
35 changes: 21 additions & 14 deletions src/ExportAsSQL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3842,29 +3842,36 @@ MySQLDump::PrintFieldValue(wyString * buffer, MYSQL_RES *res, MYSQL_ROW row, wyI

if(m_sethexblob && isBlob)
{
hex_datalen=lengths[count]+1;
hex_data.SetAs(row[count]);
if(hex_datalen==1)
hex_datalen=lengths[count];

if(hex_datalen==0)
{
buffer->AddSprintf("''");
firstcol++;
continue;
}
len=hex_data.GetLength();
blob_temp.SetAs(hex_data.GetString());

buffer->AddSprintf("0x");
hex_tmp.SetAs("");
for (i = 0; i < len; i++)

const char *ptr= row[count];

for (i = 0; i < hex_datalen; i++)
{
if((i+3) < len && blob_temp.GetCharAt(i) == '\\' && blob_temp.GetCharAt(i+1)=='r' && blob_temp.GetCharAt(i+2)=='\\' && blob_temp.GetCharAt(i+3) == 'n')
{
hex_tmp.Add("0D0A");
i += 3;
}
else
{
hex_tmp.AddSprintf("%02x",blob_temp.GetCharAt(i));
//MM: Test case?
if((i+3) < hex_datalen) {
if (*((unsigned char *)(ptr + i)) == '\\' &&
*((unsigned char *)(ptr + i + 1)) =='r' &&
*((unsigned char *)(ptr + i + 2)) =='\\' &&
*((unsigned char *)(ptr + i + 3)) == 'n')
{
hex_tmp.Add("0D0A");
i += 3;
continue;
}
}

hex_tmp.AddSprintf("%02x", *((unsigned char *)(ptr+i)));
}
buffer->AddSprintf(hex_tmp.GetString());
firstcol ++;
Expand Down

0 comments on commit fc1cd0f

Please sign in to comment.