Skip to content

Commit

Permalink
SQLyog 12.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
wyaadarsh committed Jan 24, 2017
1 parent afb3ec8 commit dc5840d
Show file tree
Hide file tree
Showing 24 changed files with 805 additions and 115 deletions.
8 changes: 7 additions & 1 deletion include/ConnectionBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,11 @@ class ConnectionBase
@returns wyTrue if ent else wyFalse
*/
wyBool IsEnt();


static LRESULT CALLBACK StaticDlgProcLinkCursor (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam);

WNDPROC m_wpstaticorigproc;

void OnInitConnDialog(HWND hwnd);

/// Helps to show the user name (Registered) in the about window
Expand Down Expand Up @@ -287,6 +291,8 @@ class ConnectionBase
*/
wyInt32 OnWmCtlColorStatic(HWND hwnd, WPARAM wparam, LPARAM lparam);



/// Handles the color static for status bar
/**
@param hwnd : IN Window HANDLE
Expand Down
6 changes: 4 additions & 2 deletions include/FrameWindowHelper.h
Original file line number Diff line number Diff line change
Expand Up @@ -768,8 +768,10 @@ const wyChar *LeftPadText(const wyChar *text);
*/
wyBool ChangeContextDB(Tunnel * tunnel, PMYSQL mysql, const wyChar *query, wyBool changeincombo = wyTrue);
#ifndef COMMUNITY
wyBool ChangeTransactionState(MDIWindow *wnd, const wyChar *query);
wyBool CheckTransactionStart(MDIWindow *wnd, const wyChar *query);
wyBool ChangeTransactionState(MDIWindow *wnd, const wyChar *query);
wyBool CheckTransactionStart(MDIWindow *wnd, const wyChar *query);
wyBool ReadOnlyQueryAllow(wyString *str);
wyString RemoveExtraSpaces(wyString query);
#endif
/// Gets the database name from the query.
/**
Expand Down
2 changes: 1 addition & 1 deletion include/Global.h
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ struct ConnectionInfo
//wyBool m_ispwdcleartext;
wyBool m_isdeftimeout;
wyString m_strwaittimeout;

wyBool m_isreadonly;
wyString m_title;
MYSQL *m_mysql;
Tunnel *m_tunnel;
Expand Down
1 change: 1 addition & 0 deletions include/QueryThread.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
#define ERROR_ERROR 1
#define ERROR_RESULT 2
#define ERROR_NONRESULT 3
#define ERROR_READONLY 4


class QueryResultList : public List
Expand Down
4 changes: 3 additions & 1 deletion include/SQLyog.rc
Original file line number Diff line number Diff line change
Expand Up @@ -894,13 +894,15 @@ BEGIN
LTEXT "Pr&ivate Key",IDC_SSHPRIVATEKEYTITLE,125,173,52,8,NOT WS_VISIBLE | WS_DISABLED
LTEXT "(Use ';' to separate multiple databases. Leave blank to display all)",IDC_COLONST,119,160,242,18,WS_DISABLED
CONTROL "Use Co&mpressed Protocol",IDC_COMPRESS,"Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,119,175,95,10
PUSHBUTTON "?",IDC_COMPRESSHELP,340,159,16,11
PUSHBUTTON "?",IDC_COMPRESSHELP,340,175,16,11
CONTROL "Read-Only Connection",IDC_READONLY,"Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,228,175,86,10
GROUPBOX "Session Idle Timeout",IDC_TIMEOUT,119,188,139,28
CONTROL "De&fault",IDC_TIMEOUTDEF,"Button",BS_AUTORADIOBUTTON | WS_DISABLED | WS_GROUP,124,200,38,10
CONTROL "",IDC_TIMEOUTOPT,"Button",BS_AUTORADIOBUTTON | WS_DISABLED,164,200,12,10
EDITTEXT IDC_TIMEOUTEDIT,176,198,40,12,ES_AUTOHSCROLL | ES_NUMBER | WS_DISABLED
LTEXT "(seconds)",IDC_TIMESEC,221,200,33,12
GROUPBOX "&Keep-Alive Interval",IDC_KEEPALIVE,264,188,92,28,WS_DISABLED
LTEXT "Need Help?", IDC_LINK,310,218,44,8, NOT WS_VISIBLE | SS_NOTIFY | SS_CENTERIMAGE
EDITTEXT IDC_PINGINTERVAL,270,198,45,12,ES_AUTOHSCROLL | ES_NUMBER | WS_DISABLED
LTEXT "(seconds)",IDC_KEEPALIVESEC,320,200,32,8,WS_DISABLED
GROUPBOX "",IDC_TUNNELGRP,117,72,242,154,NOT WS_VISIBLE
Expand Down
1 change: 1 addition & 0 deletions include/resource.h
Original file line number Diff line number Diff line change
Expand Up @@ -772,6 +772,7 @@
#define IDC_TIMEOUTOPT 1526
#define IDC_TIMEOUTEDIT 1527
#define IDC_COMPRESSHELP 1533
#define IDC_READONLY 10289
#define IDC_TIMEOUTHELP 1534
#define IDC_TIMESEC 1535
#define IDC_SHOWWARNING 1536
Expand Down
Binary file added lib/win32/release/auth_gssapi_client.dll
Binary file not shown.
Binary file added lib/x64/release/auth_gssapi_client.dll
Binary file not shown.
3 changes: 2 additions & 1 deletion src/CommonHelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4091,7 +4091,8 @@ InitConnectionDetails(ConnectionInfo *conn)
conn->m_issslchecked = wyFalse;
conn->m_iscompress = wyTrue;
conn->m_isdeftimeout = wyTrue;
conn->m_strwaittimeout.SetAs("28800");
conn->m_strwaittimeout.SetAs("28800");
conn->m_isreadonly = wyFalse;
//conn->m_ispwdcleartext = wyFalse;

#ifdef _WIN32
Expand Down
173 changes: 162 additions & 11 deletions src/ConnectionBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,25 @@ ConnectionBase::OnInitDialog(HWND hwnd, LPARAM lparam)

SendMessage(GetDlgItem(hwnd, IDC_PINGINTERVAL), EM_LIMITTEXT, 6, 0);

ShowWindow(GetDlgItem(hwnd, IDC_LINK), SW_SHOW);

#ifndef COMMUNITY
// if(pGlobals->m_entlicense.CompareI("Professional") != 0)
// {
ShowWindow(GetDlgItem(hwnd, IDC_COMPRESSHELP), SW_SHOW);
ShowWindow(GetDlgItem(hwnd, IDC_READONLY), SW_SHOW);
// }
/* else
{
ShowWindow(GetDlgItem(hwnd, IDC_COMPRESSHELP), SW_HIDE);
ShowWindow(GetDlgItem(hwnd, IDC_READONLY), SW_HIDE);
}
*/
#else
ShowWindow(GetDlgItem(hwnd, IDC_COMPRESSHELP), SW_HIDE);
ShowWindow(GetDlgItem(hwnd, IDC_READONLY), SW_HIDE);
#endif

PostMessage(hwnd, WM_INITCONNDIALOG, 0, 0);
return;
}
Expand Down Expand Up @@ -180,6 +199,21 @@ ConnectionBase::OnAboutInitDialog(HWND hwnd)
return 0;
}

LRESULT CALLBACK
ConnectionBase::StaticDlgProcLinkCursor (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{
ConnectionBase * pdb = (ConnectionBase*)GetWindowLongPtr(hwnd, GWLP_USERDATA);

switch(message)
{
case WM_MOUSEMOVE:
SetCursor(LoadCursor(NULL, MAKEINTRESOURCE(32649)));
return 0;
}

return CallWindowProc(pdb->m_wpstaticorigproc, hwnd, message, wParam, lParam);
}

wyInt32
ConnectionBase::OnWmCtlColorStatic(HWND hwnd, WPARAM wparam, LPARAM lparam)
{
Expand Down Expand Up @@ -316,6 +350,23 @@ ConnectionBase::CreateConnectDialogWindows(HWND hwnd, wyBool ispowertools)
pGlobals->m_hinstance, NULL);
VERIFY(geninfo);
ShowWindow(geninfo, SW_SHOW);
ShowWindow(GetDlgItem(hwndtab, IDC_LINK), SW_SHOW);

/*#ifndef COMMUNITY
if(pGlobals->m_entlicense.CompareI("Professional") == 0)
{
ShowWindow(GetDlgItem(hwndtab, IDC_COMPRESSHELP), SW_HIDE);
ShowWindow(GetDlgItem(hwndtab, IDC_READONLY), SW_HIDE);
}
#else
ShowWindow(GetDlgItem(hwndtab, IDC_COMPRESSHELP), SW_HIDE);
ShowWindow(GetDlgItem(hwndtab, IDC_READONLY), SW_HIDE);
#endif
*/
#ifdef COMMUNITY
ShowWindow(GetDlgItem(hwndtab, IDC_COMPRESSHELP), SW_HIDE);
ShowWindow(GetDlgItem(hwndtab, IDC_READONLY), SW_HIDE);
#endif

return wyTrue;
}
Expand Down Expand Up @@ -536,7 +587,32 @@ ConnectionBase::OnValidConNameChngState(HWND hdlg, BOOL state)
VERIFY(hctrl = GetDlgItem(hdlg, id_arr[count]));
EnableWindow(hctrl, state);
}

VERIFY(hctrl = GetDlgItem(hdlg, IDC_READONLY));
/*
#ifndef COMMUNITY
if(pGlobals->m_entlicense.CompareI("Professional") != 0)
{
ShowWindow(GetDlgItem(hdlg, IDC_COMPRESSHELP), SW_SHOW);
ShowWindow(GetDlgItem(hdlg, IDC_READONLY), SW_SHOW);
} // EnableWindow(hctrl, state);
else
{
ShowWindow(GetDlgItem(hdlg, IDC_COMPRESSHELP), SW_HIDE);
ShowWindow(GetDlgItem(hdlg, IDC_READONLY), SW_HIDE);
} //EnableWindow(hctrl, FALSE);
#else
EnableWindow(hctrl, FALSE);
#endif
*/
/*
#ifndef COMMUNITY
ShowWindow(GetDlgItem(hdlg, IDC_COMPRESSHELP), SW_SHOW);
ShowWindow(GetDlgItem(hdlg, IDC_READONLY), SW_SHOW);
#else
ShowWindow(GetDlgItem(hdlg, IDC_COMPRESSHELP), SW_HIDE);
ShowWindow(GetDlgItem(hdlg, IDC_READONLY), SW_HIDE);
#endif
*/
if(m_conndetaildirty == wyTrue)
{
EnableWindow(GetDlgItem(hdlg, IDC_SAVE), state);
Expand Down Expand Up @@ -565,7 +641,7 @@ ConnectionBase::ChangeConnStates(HWND hdlg, wyBool state)
IDC_DLGCONNECT_PORT, IDC_MYSQLDEFSRVST, IDOK, IDC_TESTCONN,
IDC_COMPRESS, IDC_COMPRESSHELP, IDC_TIMEOUT, IDC_TIMEOUTDEF,
IDC_TIMEOUTOPT, IDC_TIMEOUTHELP, IDC_TIMESEC ,
IDC_KEEPALIVE, IDC_KEEPALIVESEC, IDC_PINGINTERVAL
IDC_KEEPALIVE, IDC_KEEPALIVESEC, IDC_PINGINTERVAL, IDC_READONLY
};
HWND hctrl;

Expand All @@ -575,7 +651,19 @@ ConnectionBase::ChangeConnStates(HWND hdlg, wyBool state)
VERIFY(hctrl = GetDlgItem(hdlg, id_arr[count]));
EnableWindow(hctrl, state);
}
VERIFY(hctrl = GetDlgItem(hdlg, IDC_READONLY));
#ifndef COMMUNITY
// if(pGlobals->m_entlicense.CompareI("Professional") != 0)
EnableWindow(hctrl, state);
// else
// EnableWindow(hctrl, FALSE);
//ShowWindow(GetDlgItem(hwnd, IDC_READONLY), state);
#else
//EnableWindow(hctrl, FALSE);
ShowWindow(GetDlgItem(hdlg, IDC_READONLY), SW_HIDE);
ShowWindow(GetDlgItem(hdlg, IDC_COMPRESSHELP), SW_HIDE);

#endif
if(state == wyFalse)
{
EnableWindow(GetDlgItem(hdlg, IDC_TIMEOUTEDIT), FALSE);
Expand Down Expand Up @@ -1040,11 +1128,16 @@ ConnectionBase::ShowSeverTabOptions(HWND hwnd, wyBool enable)
IDC_DLGCONNECT_DATABASE, IDC_COLONST, IDC_MYSQLPORTST, IDC_DLGCONNECT_PORT,
IDC_MYSQLDEFSRVST, IDC_COMPRESS, IDC_COMPRESSHELP, IDC_TIMEOUT,
IDC_TIMEOUTDEF, IDC_TIMEOUTOPT, IDC_TIMESEC, IDC_TIMEOUTEDIT, IDC_TIMEOUTHELP,
IDC_KEEPALIVE, IDC_KEEPALIVESEC, IDC_PINGINTERVAL};
IDC_KEEPALIVE, IDC_KEEPALIVESEC, IDC_PINGINTERVAL, IDC_READONLY, IDC_LINK};

wyInt32 count = sizeof(serverids)/ sizeof(serverids[0]);

ShowOrHide(hwnd, serverids, count, enable);
#ifdef COMMUNITY
ShowWindow(GetDlgItem(hwnd, IDC_READONLY), SW_HIDE);
ShowWindow(GetDlgItem(hwnd, IDC_COMPRESSHELP), SW_HIDE);

#endif
}

void
Expand Down Expand Up @@ -1079,8 +1172,14 @@ ConnectionBase::ShowHttpTabOptions(HWND hwnd, wyBool enable)

//enabling the help button
EnableWindow(GetDlgItem(hwnd, IDC_TUNNELHELP), TRUE);

#else
if(enable == wyTrue)
{
ShowWindow(GetDlgItem(hwnd, IDC_COMPRESSHELP), SW_HIDE);
ShowWindow(GetDlgItem(hwnd, IDC_READONLY), SW_HIDE);
}
#endif

}

void
Expand Down Expand Up @@ -1117,7 +1216,12 @@ ConnectionBase::ShowSshTabOptions(HWND hwnd, wyBool enable)

//enabling the help button
EnableWindow(GetDlgItem(hwnd, IDC_SSHHELP), TRUE);

#else
if(enable == wyTrue)
{
ShowWindow(GetDlgItem(hwnd, IDC_COMPRESSHELP), SW_HIDE);
ShowWindow(GetDlgItem(hwnd, IDC_READONLY), SW_HIDE);
}
#endif
}

Expand Down Expand Up @@ -1154,6 +1258,12 @@ ConnectionBase::ShowSslTabOptions(HWND hwnd, wyBool enable)

//enabling the help button
EnableWindow(GetDlgItem(hwnd, IDC_SSLHELP), TRUE);
#else
if(enable == wyTrue)
{
ShowWindow(GetDlgItem(hwnd, IDC_COMPRESSHELP), SW_HIDE);
ShowWindow(GetDlgItem(hwnd, IDC_READONLY), SW_HIDE);
}
#endif
}

Expand All @@ -1173,7 +1283,7 @@ ConnectionBase::ShowOrHide(HWND hwnd, wyInt32 array[], wyInt32 arraycount, wyBoo
else
ShowWindow(hwndc, SW_HIDE);
}
}
}
}

void
Expand Down Expand Up @@ -1412,7 +1522,7 @@ ConnectionBase::GetInitialDetails(HWND hdlg)
wyWChar directory[MAX_PATH+1]={0}, *lpfileport=0;
wyChar pwd[SIZE_512]={0};
wyBool decodepwd = wyTrue;
wyUInt32 ret, usecompress = 1, isdefwaittimeout = 1/*, usecleartext = 0*/;
wyUInt32 ret, usecompress = 1, isdefwaittimeout = 1, readonly = 0/*, usecleartext = 0*/;
ConnectionInfo conninfo;

// Get the complete path.
Expand Down Expand Up @@ -1459,7 +1569,23 @@ ConnectionBase::GetInitialDetails(HWND hdlg)
//Compressed prtocol
usecompress = wyIni::IniGetInt(conn.GetString(), "compressedprotocol", 1, dirstr.GetString());
Button_SetCheck(GetDlgItem(hdlg, IDC_COMPRESS), usecompress);

#ifndef COMMUNITY
//if(pGlobals->m_entlicense.CompareI("Professional") != 0)
//{
readonly = wyIni::IniGetInt(conn.GetString(), "readonly", 0, dirstr.GetString());
Button_SetCheck(GetDlgItem(hdlg, IDC_READONLY), readonly);
//}
//else
//{
// readonly = 0;
// Button_SetCheck(GetDlgItem(hdlg, IDC_READONLY), readonly);
//}
#else
{
readonly = 0;
Button_SetCheck(GetDlgItem(hdlg, IDC_READONLY), readonly);
}
#endif
/*usecleartext = wyIni::IniGetInt(conn.GetString(), "cleartextpwd", 0, dirstr.GetString());
Button_SetCheck(GetDlgItem(hdlg, IDC_ISCLEARTEXT), usecleartext);*/

Expand Down Expand Up @@ -2278,7 +2404,12 @@ ConnectionBase::FillAdvancedTab(HWND hwnd, ConnectionInfo *conninfo)
EnableWindow(GetDlgItem(hwnd, IDC_INITCOMMAND), TRUE);
EnableWindow(GetDlgItem(hwnd, IDC_EDITINITCOMMAND), TRUE);
EnableWindow(GetDlgItem(hwnd, IDC_INITCOMMANDDETAIL), TRUE);

/*
#ifndef COMMUNITY
ShowWindow(GetDlgItem(hwnd, IDC_COMPRESSHELP), SW_HIDE);
ShowWindow(GetDlgItem(hwnd, IDC_READONLY), SW_HIDE);
#endif
*/
//fill connection color
ColorComboInitValues(GetDlgItem(hwnd, IDC_COLORCOMBO));
ColorComboFgInitValues(GetDlgItem(hwnd, IDC_COLORCOMBO3));
Expand Down Expand Up @@ -2419,7 +2550,12 @@ ConnectionBase::SaveServerDetails(HWND hwnd, const wyChar *conn, const wyChar *d
ret = Button_GetState(GetDlgItem(hwnd, IDC_COMPRESS));
(ret == BST_CHECKED) ? value = 1 : value = 0;
ret = wyIni::IniWriteInt(conn, "compressedprotocol", value, directory);

#ifndef COMMUNITY
//readonly
ret = Button_GetState(GetDlgItem(hwnd, IDC_READONLY));
(ret == BST_CHECKED) ? value = 1 : value = 0;
ret = wyIni::IniWriteInt(conn, "readonly", value, directory);
#endif
//Clear text pwd
/*ret = Button_GetState(GetDlgItem(hwnd, IDC_ISCLEARTEXT));
(ret == BST_CHECKED) ? value = 1 : value = 0;
Expand Down Expand Up @@ -2448,6 +2584,19 @@ ConnectionBase::HandleCommonConnectOptions(HWND hwnd, ConnectionInfo *dbname, wy
{
switch(id)
{
#ifndef COMMUNITY
case IDC_READONLY:
if(SendMessage(GetDlgItem(hwnd, IDC_READONLY), BM_GETCHECK, 0, 0)== BST_CHECKED)
// if(pGlobals->m_entlicense.CompareI("Professional") != 0)
dbname->m_isreadonly = wyTrue;
else
dbname->m_isreadonly = wyFalse;

EnableWindow(GetDlgItem(hwnd, IDC_SAVE), TRUE);
EnableWindow(GetDlgItem(hwnd, IDC_CLONECONN), FALSE);
m_conndetaildirty = wyTrue;
break;
#endif
case IDC_COMPRESS:
if(SendMessage(GetDlgItem(hwnd, IDC_COMPRESS), BM_GETCHECK, 0, 0)== BST_CHECKED)
dbname->m_iscompress = wyTrue;
Expand Down Expand Up @@ -2528,7 +2677,6 @@ ConnectionBase::HandleCommonConnectOptions(HWND hwnd, ConnectionInfo *dbname, wy
break;

}

return;
}

Expand Down Expand Up @@ -2589,6 +2737,9 @@ void ConnectionBase::WriteMysqlDefValues(HWND hdlg)
SendMessage(GetDlgItem(hdlg, IDC_DLGCONNECT_DATABASE), WM_SETTEXT, 0, (LPARAM)L"");
SendMessage(GetDlgItem(hdlg, IDC_DLGCONNECT_PORT), WM_SETTEXT, 0, (LPARAM)L"3306");
Button_SetCheck(GetDlgItem(hdlg, IDC_COMPRESS), 1);
#ifndef COMMUNITY
Button_SetCheck(GetDlgItem(hdlg, IDC_READONLY), 0);
#endif
//Button_SetCheck(GetDlgItem(hdlg, IDC_ISCLEARTEXT), 0);
Button_SetCheck(GetDlgItem(hdlg, IDC_TIMEOUTDEF), 1);
Button_SetCheck(GetDlgItem(hdlg, IDC_TIMEOUTOPT), 0);
Expand Down
Loading

0 comments on commit dc5840d

Please sign in to comment.