Skip to content

Commit

Permalink
SQLyog Community -12.2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
maryamwy committed May 5, 2016
1 parent 8829592 commit e650156
Show file tree
Hide file tree
Showing 16 changed files with 140 additions and 41 deletions.
3 changes: 3 additions & 0 deletions include/CalendarCtrl.h
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,9 @@ class CalendarCtrl
//Handles click of the OK button
void OnClickOk();

//Handles click of the OK button
void OnClickNow();

//Handles click of the Cancel button
void OnClickCancel();

Expand Down
24 changes: 14 additions & 10 deletions include/FrameWindowHelper.h
Original file line number Diff line number Diff line change
Expand Up @@ -392,19 +392,19 @@ All Files(*.*)\0*.*\0"
#define DEFAULT_NO_TABLE _("(Read Only)")
#define DEFAULT_NO_TABLEW _(L"(Read Only)")
#define DEFAULT_READONLY_RESULT _(L"Read-only result")
#define BUYURL "http://www.webyog.com/shop"
#define BUYURL_POWERTOOLS "http://www.webyog.com/shop/?ref=community.powertools"
////#define BUYURL_NAGBEGIN "http://www.webyog.com/shop/?ref=community.nagbegin"
#define BUYURL_TOOLBARRIBBON "http://www.webyog.com/shop/?ref=community.toolbarribbon"
#define BUYURL_NAGEND "http://www.webyog.com/shop/?ref=community.nagend"
#define BUYURL "http://www.webyog.com/product/sqlyogpricing"
#define BUYURL_POWERTOOLS "http://www.webyog.com/product/sqlyogpricing/?ref=community.powertools"
////#define BUYURL_NAGBEGIN "http://www.webyog.com/product/sqlyogpricing/?ref=community.nagbegin"
#define BUYURL_TOOLBARRIBBON "http://www.webyog.com/product/sqlyogpricing/?ref=community.toolbarribbon"
#define BUYURL_NAGEND "http://www.webyog.com/product/sqlyogpricing/?ref=community.nagend"
#define HOMEURL_ABOUTUS "http://www.webyog.com/?ref=community.aboutus"
#define BUYURL_STATUSBAR "http://www.webyog.com/shop/?ref=community.statusbar"
#define BUYURL_STATUSBAR "http://www.webyog.com/product/sqlyogpricing/?ref=community.statusbar"
#define HOMEURL_UPGRADECHECK "http://www.webyog.com/?ref=community.upgradecheck"
////#define BUYURL_BUYNAGBEGIN "http://www.webyog.com/shop/?ref=community.buynagbegin"
#define BUYURL_BUYNAGEND "http://www.webyog.com/shop/?ref=community.buynagend"
#define SUPPORTURL "https://www.webyog.com/customer"
////#define BUYURL_BUYNAGBEGIN "http://www.webyog.com/product/sqlyogpricing/?ref=community.buynagbegin"
#define BUYURL_BUYNAGEND "http://www.webyog.com/product/sqlyogpricing/?ref=community.buynagend"
#define SUPPORTURL "https://www.webyog.com/customer?ref=sqlyog"

#define BUYENT "http://www.webyog.com/shop"
#define BUYENT "http://www.webyog.com/product/sqlyogpricing"
#define IMAGEURL "http://www.webyog.com"
#define PRODUCTURL "https://www.webyog.com/product/sqlyog"
#define COMMUNITYURL "https://www.webyog.com/community"
Expand Down Expand Up @@ -1237,6 +1237,10 @@ wyInt32 SetListBoxWidth(HWND hwndlist);
wyBool IsShowWarnings();


///Halt Query Execution on Errors
wyBool IsHaltExecutionOnError();


/// Helper function to write the database information to xml file
/**
@param hfile : IN handle to the file
Expand Down
2 changes: 2 additions & 0 deletions include/MySQLVersionHelper.h
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,8 @@ wyBool IsMariaDB52(Tunnel * tunnel, PMYSQL mysql);
//MySQL 5.7.0 for Virtual/Stored columns
wyBool IsMySQL57(Tunnel * tunnel, PMYSQL mysql);

//MySQL 5.7.7 for SYS Schema
wyBool IsMySQL577(Tunnel * tunnel, PMYSQL mysql);
/// Checks the server version is greater than or equal to mySQL5.0.2
/**
@param tunnel: IN tunnel pointer
Expand Down
2 changes: 1 addition & 1 deletion include/QueryAnalyzerBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

#define QA_ULTIMATE _("Query Profiler is available only in Ultimate version of SQLyog.\
<br>&nbsp;<br>\
Click <a href=\"http://www.webyog.com/shop/?ref=community.queryprofiler\" target=\"_blank\">here</a> to buy SQLyog Ultimate\
Click <a href=\"http://www.webyog.com/product/sqlyogpricing/?ref=community.queryprofiler\" target=\"_blank\">here</a> to buy SQLyog Ultimate\
<br>&nbsp;<br>\
Query Profiler Features:\
<UL>\
Expand Down
23 changes: 13 additions & 10 deletions include/SQLyog.rc
Original file line number Diff line number Diff line change
Expand Up @@ -1795,21 +1795,23 @@ CAPTION "General"
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
CONTROL "Generate &queries using backquote(`)",IDC_BACKQUOTES,
"Button",BS_AUTOCHECKBOX | BS_MULTILINE | WS_TABSTOP,4,3,202,10
"Button",BS_AUTOCHECKBOX | BS_MULTILINE | WS_TABSTOP,4,5,202,10
CONTROL "Keep &focus on SQL editor after query execution",IDC_FOCUSAFTERQUERY,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,4,16,205,10
CONTROL "P&rompt if a tab with unsaved changes is closed",IDC_CONFIRMONTABCLOSE,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,4,29,202,10
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,4,27,202,10
CONTROL "Paste object name in &editor on double-click",IDC_GETTEXTONDBCLICK,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,4,42,202,10
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,4,38,202,10
CONTROL "Enable &word wrap in SQL editor and BLOB viewer",IDC_WORDWRAP,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,4,55,202,10
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,4,49,202,10
CONTROL "Enable transaction support for &batch process",IDC_TRANSACTIONENABLE,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,4,68,202,10
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,4,60,202,10
CONTROL "Force disable F&K check throughout HTTP import batch process",IDC_FKCHKIMPORT,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,4,81,225,10
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,4,71,225,10
CONTROL "&Show Warning(s) in Messages tab",IDC_SHOWWARNING,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,4,94,124,10
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,4,82,124,10
CONTROL "Halt Execution of Queries on Error",IDC_HALTEXEC,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,4,93,124,10
GROUPBOX "Export Options ",IDC_STATIC,4,106,247,99
GROUPBOX "Max. size (in KB) for BULK INSERT statement(s)",IDC_STATIC,9,116,237,40
CONTROL "&Get server default",IDC_DEF_BULK_SIZE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,127,112,8
Expand Down Expand Up @@ -2056,9 +2058,10 @@ STYLE DS_SETFONT | DS_FIXEDSYS | DS_CENTER | WS_CHILD | WS_BORDER
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
CONTROL "",IDC_MONTHCALENDAR1,"SysMonthCal32",MCS_NOTODAY | WS_TABSTOP,0,0,116,88
DEFPUSHBUTTON "OK",IDOK,54,88,30,15
PUSHBUTTON "Cancel",IDCANCEL,83,88,30,15
CONTROL "",IDC_DATETIMEPICKER1,"SysDateTimePick32",DTS_RIGHTALIGN | DTS_UPDOWN | WS_TABSTOP | 0x8,0,88,54,15
PUSHBUTTON "Cancel",IDCANCEL,85,88,29,14
CONTROL "",IDC_DATETIMEPICKER1,"SysDateTimePick32",DTS_RIGHTALIGN | DTS_UPDOWN | WS_TABSTOP | 0x8,0,88,40,14
DEFPUSHBUTTON "OK",IDOK,64,88,20,15
PUSHBUTTON "NOW",IDCURRDATE,42,88,21,15
END

IDD_SEARCHFILTER DIALOGEX 0, 0, 270, 241
Expand Down
2 changes: 1 addition & 1 deletion 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 2
#define UPDATE_VERSION_INT 1
#define UPDATE_VERSION_INT 2
#define RELEASE_VERSION_INT 0
#define EXTRAINFO ""
4 changes: 3 additions & 1 deletion include/resource.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#define IDC_ADD 3
#define IDC_UP 4
#define IDC_MOVEDOWN 4
#define IDCURRDATE 5
#define ID_SELECTALL 6
#define IDC_DOWN 6
#define IDC_UNSELALL2 10
Expand Down Expand Up @@ -766,7 +767,8 @@
#define IDC_COMPRESSHELP 1533
#define IDC_TIMEOUTHELP 1534
#define IDC_TIMESEC 1535
#define IDC_SHOWWARNING 1539
#define IDC_SHOWWARNING 1536
#define IDC_HALTEXEC 1539
#define IDC_GETULT 1540
#define IDC_ENTFEATURE 1541
#define IDC_GETENTTEXT 1542
Expand Down
45 changes: 39 additions & 6 deletions src/CalendarCtrl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,10 @@ CalendarCtrl::CalendarCtrlProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lP
case WM_COMMAND:
switch(LOWORD(wParam))
{
case IDCURRDATE:
pcc->OnClickNow();
break;

case IDOK:
pcc->OnClickOk();
break;
Expand Down Expand Up @@ -367,7 +371,7 @@ CalendarCtrl::PositionWindow(RECT* rect)
RECT temprect = {0};
RECT prect = {0} ;
wyInt32 width, height, hmargin = 0, vmargin = 0;
RECT calrect,timerect,okrect,cancelrect;
RECT calrect,timerect,okrect,cancelrect,nowrect;
GetClientRect(m_hwndparent, &prect);
prect.right = prect.right - prect.left;
prect.bottom = prect.bottom - prect.top;
Expand All @@ -379,6 +383,7 @@ CalendarCtrl::PositionWindow(RECT* rect)
MonthCal_GetMinReqRect(GetDlgItem(m_hwnd,IDC_MONTHCALENDAR1),&calrect);
GetWindowRect(GetDlgItem(m_hwnd,IDC_DATETIMEPICKER1),&timerect);
GetWindowRect(GetDlgItem(m_hwnd,IDOK),&okrect);
GetWindowRect(GetDlgItem(m_hwnd,IDCURRDATE),&nowrect);
GetWindowRect(GetDlgItem(m_hwnd,IDCANCEL),&cancelrect);

//calculate and modify the width and height based on the availabe space to best fit the window
Expand All @@ -394,9 +399,14 @@ CalendarCtrl::PositionWindow(RECT* rect)
{
temprect.top = rect->bottom - height;
}
else if(rect->bottom + height/2 <= prect.bottom && rect->bottom - height/2 >= prect.top)
{
temprect.top = rect->bottom - height/2;
}

else
{
temprect.top = rect->top;
temprect.top = prect.top;
}
}
else
Expand Down Expand Up @@ -450,21 +460,28 @@ CalendarCtrl::PositionWindow(RECT* rect)
MoveWindow(GetDlgItem(m_hwnd,IDC_DATETIMEPICKER1),
0,
(calrect.bottom - calrect.top)-1,
width - (2*(okrect.right-okrect.left)),
width - (3*(okrect.right-okrect.left)+10),
okrect.bottom-okrect.top+1,
TRUE);

MoveWindow(GetDlgItem(m_hwnd,IDCURRDATE),
width - (3*(okrect.right-okrect.left)+10),
(calrect.bottom - calrect.top)-2,
(okrect.right-okrect.left)+1,
okrect.bottom-okrect.top+1,
TRUE);

MoveWindow(GetDlgItem(m_hwnd,IDOK),
width - (2*(okrect.right-okrect.left)),
width - (2*(okrect.right-okrect.left)+10),
(calrect.bottom - calrect.top)-2,
(okrect.right-okrect.left),
okrect.bottom-okrect.top+1,
TRUE);

MoveWindow(GetDlgItem(m_hwnd,IDCANCEL),
width - (okrect.right-okrect.left)-1,
width - (okrect.right-okrect.left)-10,
(calrect.bottom - calrect.top)-2,
(okrect.right-okrect.left),
(okrect.right-okrect.left)+9,
okrect.bottom-okrect.top+1,
TRUE);

Expand All @@ -484,6 +501,7 @@ CalendarCtrl::OnClickOk()
{
wyInt32 row, col;


ConvertCtrlValues();
SendMessage(m_hwnd,UM_ENDDIALOG,0,0);
CustomGrid_ApplyChanges(m_hwndparent);
Expand All @@ -498,6 +516,21 @@ CalendarCtrl::OnClickOk()
}


// handle NOW Click
void
CalendarCtrl::OnClickNow()
{
wyInt32 row, col;
wyString temp;
SYSTEMTIME seltime;
GetLocalTime(&seltime);
MonthCal_SetCurSel(GetDlgItem(m_hwnd,IDC_MONTHCALENDAR1), &seltime);
DateTime_SetFormat(GetDlgItem(m_hwnd,IDC_DATETIMEPICKER1), L"HH:mm:ss");
DateTime_SetSystemtime(GetDlgItem(m_hwnd,IDC_DATETIMEPICKER1),GDT_VALID, &seltime);

}


// handle Cancel Click
void
CalendarCtrl::OnClickCancel()
Expand Down
21 changes: 18 additions & 3 deletions src/ExportAsSQL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2008,6 +2008,7 @@ MySQLDump::DumpAllDatabases(wyString * buffer)
wyBool success;
wyBool ismysql41 = IsMySQL41(m_tunnel, &m_mysql);
wyBool ismysql553 = IsMySQL553(m_tunnel, &m_mysql);
wyBool ismysql577 = IsMySQL577(m_tunnel, &m_mysql);
wyInt32 err = 0;

if(m_charset.CompareI("utf8") == 0)
Expand Down Expand Up @@ -2072,15 +2073,22 @@ MySQLDump::DumpAllDatabases(wyString * buffer)
continue;
}
}
else if(stricmp(row[0], "PERFORMANCE_SCHEMA") == 0) //INFORMATION_SCHEMA is not exported
else if(stricmp(row[0], "PERFORMANCE_SCHEMA") == 0) //PERFORMANCE_SCHEMA is not exported
{
if(ismysql553 == wyTrue)
{
row = sja_mysql_fetch_row(m_tunnel, res);
continue;
}
}

else if(stricmp(row[0], "SYS") == 0) //SYS SCHEMA is not exported for Mysql 5.7.7 and higher version
{
if(ismysql577 == wyTrue)
{
row = sja_mysql_fetch_row(m_tunnel, res);
continue;
}
}

else if(stricmp(row[0], "mysql") == 0 )
{
Expand Down Expand Up @@ -2204,7 +2212,8 @@ MySQLDump::DumpAlldbsToSingleFile(wyString * buffer, MYSQL_RES *dbres)
wyString dbname;
wyBool ismysql41 = IsMySQL41(m_tunnel, &m_mysql);
wyBool ismysql51 = IsMySQL5010(m_tunnel, &m_mysql);
wyBool ismysql553 = IsMySQL553(m_tunnel, &m_mysql);
wyBool ismysql553 = IsMySQL553(m_tunnel, &m_mysql);
wyBool ismysql577 = IsMySQL577(m_tunnel, &m_mysql);



Expand All @@ -2221,6 +2230,9 @@ MySQLDump::DumpAlldbsToSingleFile(wyString * buffer, MYSQL_RES *dbres)

if((stricmp(dbname.GetString(), "PERFORMANCE_SCHEMA") == 0) && (ismysql553 == wyTrue))
continue;

if((stricmp(dbname.GetString(), "SYS") == 0) && (ismysql577 == wyTrue))
continue;

if((stricmp(dbname.GetString(), "MYSQL") == 0) && (m_expmysql == wyFalse))
continue;
Expand Down Expand Up @@ -2259,6 +2271,9 @@ MySQLDump::DumpAlldbsToSingleFile(wyString * buffer, MYSQL_RES *dbres)
if((stricmp(dbname.GetString(), "PERFORMANCE_SCHEMA") == 0) && (ismysql553 == wyTrue))
continue;

if((stricmp(dbname.GetString(), "SYS") == 0) && (ismysql577 == wyTrue))
continue;

if((stricmp(dbname.GetString(), "MYSQL") == 0) && (m_expmysql == wyFalse))
continue;

Expand Down
21 changes: 18 additions & 3 deletions src/FrameWindowHelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2692,14 +2692,12 @@ GetColLengthArray(MYSQL_ROW row, wyInt32 col, wyUInt32 *len)
// loop thru and get the length of each field
for (; ((INT)i) <= (col + 1); column++, arr++)
{
if((INT)i!=col && (INT)i!=(col+1)){
if (!*column)
{
*arr = 0;
//i++;
continue;
}
}

if (start)
*plen = (unsigned long) ((byte*)*column-start-1);

Expand Down Expand Up @@ -3316,6 +3314,23 @@ IsShowWarnings()

}

wyBool
IsHaltExecutionOnError()
{
wyWChar *lpfileport = 0;
wyWChar directory[MAX_PATH + 1]= {0};
wyInt32 ret;
wyString dirstr;

SearchFilePath(L"sqlyog", L".ini", MAX_PATH, directory, &lpfileport);
dirstr.SetAs(directory);

//getting show warnings status from init File
ret = wyIni::IniGetInt(GENERALPREFA, "HaltExecutionOnError", 0, dirstr.GetString());
return(ret)?(wyTrue):(wyFalse);

}

// Function to write xml tags
wyBool
WriteXMLtags(HANDLE hfile, wyString *tags)
Expand Down
2 changes: 1 addition & 1 deletion src/Htmlrender.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ HandleClickEventOnLink(HWND hwndLayout, HELEMENT helem, const wchar_t *url)
delete pref;
}
}
else if(!wcsicmp(url, L"http://www.webyog.com/shop/?ref=community.queryprofiler"))
else if(!wcsicmp(url, L"http://www.webyog.com/product/sqlyogpricing/?ref=community.queryprofiler"))
{
::ShellExecuteW(hwndLayout,L"open", url, NULL,NULL,SW_SHOWNORMAL);
}
Expand Down
14 changes: 14 additions & 0 deletions src/MySQLVersionHelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,20 @@ wyBool IsMySQL57(Tunnel * tunnel, PMYSQL mysql)


}


//MySQL 5.7.7
wyBool
IsMySQL577(Tunnel * tunnel, PMYSQL mysql)
{
long me = mysql_get_server_version(*mysql);/* Only available from MySQLv4.1*/

if(me >= 50707)
return wyTrue;
else
return wyFalse;
}

wyBool
IsMySQL502(Tunnel * tunnel, PMYSQL mysql)
{
Expand Down
Loading

0 comments on commit e650156

Please sign in to comment.