Skip to content

Commit

Permalink
SQLyog 13.1.6 GA
Browse files Browse the repository at this point in the history
  • Loading branch information
sandhyawy committed May 1, 2020
1 parent 12232de commit f0dec9c
Show file tree
Hide file tree
Showing 37 changed files with 6,017 additions and 219 deletions.
2 changes: 1 addition & 1 deletion include/AppInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@

#define SQLITE_APPVERSION_MAJOR "10"
#define SQLITE_APPVERSION_MINOR "5"
#define COMPANY_COPYRIGHT "(c) 2001-2019 Webyog Inc."
#define COMPANY_COPYRIGHT "(c) 2001-2020 Webyog Inc."

#define FILEVER MAJOR_VERSION_INT ## , ## MINOR_VERSION_INT ## , ## UPDATE_VERSION_INT ## , ## RELEASE_VERSION_INT
#define STRFILEVER MAJOR_VERSION "." MINOR_VERSION "." STRINGIZE(UPDATE_VERSION_INT) "." STRINGIZE(RELEASE_VERSION_INT)
Expand Down
63 changes: 62 additions & 1 deletion include/MySQLVersionHelper.h
Original file line number Diff line number Diff line change
Expand Up @@ -204,12 +204,73 @@ wyChar *quote_for_like(const wyChar *name, wyChar *buff);
*/
void SetCharacterSet(Tunnel *tunnel, MYSQL * mysql, wyChar * charset);

/// Checks the server version is greater than or equal to 5.0.10
/// Checks the server version is greater than or equal to 8.0.11
/**
@param tunnel: IN tunnel pointer
@param mysql: IN PMYSQL value
@returns wyBool, wyTrue if it is SUCCESS, else wyFalse
*/
wyBool IsMySQL80011(Tunnel * tunnel, PMYSQL mysql);

/// Checks the server version isis MariaDB 10.2.0 or higher
/**
@param tunnel: IN tunnel pointer
@param mysql: IN PMYSQL value
@returns wyBool, wyTrue if it is SUCCESS, else wyFalse
*/
wyBool IsMariaDB100200(Tunnel * tunnel, PMYSQL mysql);

/// Checks the server version is MariaDB
/**
@param tunnel: IN tunnel pointer
@param mysql: IN PMYSQL value
@returns wyBool, wyTrue if it is SUCCESS, else wyFalse
*/
wyBool IsMariaDB(Tunnel * tunnel, PMYSQL mysql);

/// Checks the server version is MariaDB 10.4 or higher
/**
@param tunnel: IN tunnel pointer
@param mysql: IN PMYSQL value
@returns wyBool, wyTrue if it is SUCCESS, else wyFalse
*/
wyBool IsMariaDB104(Tunnel * tunnel, PMYSQL mysql);

/**
@param version: the version string from select version();
@returns wyBool, wyTrue if param version contains MariaDB
**/
wyBool IsServerMariaDb(wyString version);

///get the version from querying the server.
/// An alternative to relying on mysql_get_server_info which does not behaves 100% for mariadb on azure and aws
/**
@param tunnel: IN tunnel pointer
@param mysql: IN PMYSQL value
@returns wyString resulting from select version();
**/
void GetServerVersion(Tunnel * tunnel, PMYSQL mysql, wyString *pServerVersion);

/// similar then GetVersionNo(Tunnel * tunnel, PMYSQL mysql), but parses the param string instead
/**
@param version: the version string from select version();
@returns wyInt32 with the value of version major, minor and patch
**/
wyInt32 GetVersionNo(wyString version);

//Helper function to obtain default authentication plugin
// Returns the default plugin :
// if mariadb > 10.14 and system environemnt Old_password is 0 -> sql_native_password, else sql_old_password
// if mysqlserver > 5.7 return the result of system variable default_authentication_plugin
/**
@returns String with defined default plugin
*/
wyBool
GetDefaultAuthenticationPlugin(Tunnel * tunnel, PMYSQL mysql, wyInt32 serververno, wyBool ismariadb, wyString *plugin);

/**
@returns String with defined value of server environment
*/
wyBool
GetSystemEnvironment(Tunnel * tunnel, PMYSQL mysql, wyString *var, wyString *value);
#endif
56 changes: 29 additions & 27 deletions include/SQLyog.rc
Original file line number Diff line number Diff line change
Expand Up @@ -897,7 +897,7 @@ BEGIN
PUSHBUTTON "&Rename...",IDC_EDITCONN,267,9,46,15,WS_DISABLED
PUSHBUTTON "&Delete",IDC_DELETE,318,9,46,15,WS_DISABLED
LTEXT "Sa&ved Connections",IDC_DESCSTATIC,113,32,69,9,WS_DISABLED
CONTROL "",IDC_DESC,"CustomComboBox1", WS_DISABLED | WS_TABSTOP| CBS_DROPDOWN | 0x10,180,30,184,15
CONTROL "",IDC_DESC,"CustomComboBox1",WS_DISABLED | WS_TABSTOP | 0x12,180,30,184,15
CONTROL "Tab1",IDC_CONNTAB,"SysTabControl32",TCS_HOTTRACK | WS_DISABLED | WS_GROUP | WS_TABSTOP,113,50,251,181
LTEXT "MyS&QL Host Address",IDC_MYSQLHOSTST,119,74,70,9,WS_DISABLED
EDITTEXT IDC_DLGCONNECT_HOST,190,72,166,12,ES_AUTOHSCROLL | WS_DISABLED
Expand Down Expand Up @@ -2059,18 +2059,18 @@ BEGIN
PUSHBUTTON "Cance&l",IDCANCEL,129,41,50,14
END

IDD_USERMANAGER DIALOGEX 0, 0, 460, 240
IDD_USERMANAGER DIALOGEX 0, 0, 460, 270
STYLE DS_SETFONT | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME
CAPTION "User Manager"
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
LTEXT "Size Griper",IDC_GRIP,390,140,40,10
LTEXT "Size Griper",IDC_GRIP,390,168,40,10
LTEXT "Use&r",IDC_UM_USER,7,9,16,8
COMBOBOX IDC_USERCOMBO,25,7,112,30,CBS_DROPDOWN | CBS_SORT | WS_VSCROLL | WS_TABSTOP
CONTROL "",IDC_OBTREE,"SysTreeView32",TVS_HASBUTTONS | TVS_LINESATROOT | TVS_SHOWSELALWAYS | WS_BORDER | WS_HSCROLL | WS_TABSTOP,7,29,130,107
CONTROL "",IDC_PRIVOBTREE,"SysTreeView32",TVS_HASBUTTONS | TVS_LINESATROOT | TVS_SHOWSELALWAYS | WS_BORDER | WS_HSCROLL | WS_TABSTOP,7,140,130,68
CONTROL "",IDC_OBTREE,"SysTreeView32",TVS_HASBUTTONS | TVS_LINESATROOT | TVS_SHOWSELALWAYS | WS_BORDER | WS_HSCROLL | WS_TABSTOP,7,31,130,107
CONTROL "",IDC_PRIVOBTREE,"SysTreeView32",TVS_HASBUTTONS | TVS_LINESATROOT | TVS_SHOWSELALWAYS | WS_BORDER | WS_HSCROLL | WS_TABSTOP,7,142,130,68
CONTROL "Show only pr&ivileged objects",IDC_PRIVILEGEDCHECK,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,223,107,10
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,253,107,10
PUSHBUTTON "&Delete User",IDC_DELUSER,145,7,65,14
PUSHBUTTON "Add &New User",IDC_NEWUSER,215,7,65,14
PUSHBUTTON "Hel&p",IDC_UM_HELP,388,7,65,14
Expand All @@ -2079,30 +2079,32 @@ BEGIN
LTEXT "&Username",IDC_USERNAME_PROMPT,145,64,33,8
EDITTEXT IDC_USERNAME,180,62,99,14,ES_AUTOHSCROLL
LTEXT "&Host",IDC_HOST_PROMPT,294,64,16,8
COMBOBOX IDC_HOSTNAME,354,64,99,30,CBS_DROPDOWN | CBS_AUTOHSCROLL | CBS_SORT | WS_VSCROLL | WS_TABSTOP
COMBOBOX IDC_HOSTNAME,354,63,99,30,CBS_DROPDOWN | CBS_AUTOHSCROLL | CBS_SORT | WS_VSCROLL | WS_TABSTOP
LTEXT "Pass&word",IDC_PASSWORD_PROMPT,145,88,32,8
EDITTEXT IDC_PASSWORD,180,86,99,14,ES_PASSWORD | ES_AUTOHSCROLL
LTEXT "Retype Passw&ord",IDC_PASSWORD2_PROMPT,294,89,57,8
EDITTEXT IDC_PASSWORD_CONFIRM,354,86,99,14,ES_PASSWORD | ES_AUTOHSCROLL
LTEXT "Maximum number of &queries per hour",IDC_MAXQUERY_PROMPT,145,119,120,8
EDITTEXT IDC_MAXQUERIES,282,117,60,14,ES_AUTOHSCROLL | ES_NUMBER,WS_EX_RIGHT
CONTROL "",IDC_MAXQUERY_SPIN,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,350,117,10,14
LTEXT "Ma&ximum number of updates per hour",IDC_MAXUPDATE_PROMPT,145,138,122,8
EDITTEXT IDC_MAXUPDATE,282,135,60,14,ES_AUTOHSCROLL | ES_NUMBER,WS_EX_RIGHT
CONTROL "",IDC_MAXUPDATE_SPIN,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,350,135,10,14
LTEXT "Maxi&mum number of connections per hour",IDC_MAXCONN_PROMPT,145,157,134,8
EDITTEXT IDC_MAXCONN,282,153,60,14,ES_AUTOHSCROLL | ES_NUMBER,WS_EX_RIGHT
CONTROL "",IDC_MAXCONN_SPIN,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,350,153,10,14
LTEXT "Maximum number of user connec&tions",IDC_MAXCONNSIM_PROMPT,145,175,121,8
EDITTEXT IDC_MAXSIMCONN,282,171,60,14,ES_AUTOHSCROLL | ES_NUMBER,WS_EX_RIGHT
CONTROL "",IDC_MAXSIMCONN_SPIN,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,350,171,10,14
LTEXT "Note - Please select an object to GRANT/REVOKE privileges",IDC_PRIV_NOTE,196,104,190,8
LTEXT "(Note - 0 means no limitations)",IDC_HELPZERO,145,200,132,8
CONTROL "Select/Deselect &All",IDC_SELECTALLCHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,145,186,75,10
CONTROL "",IDC_PRIVLIST,"SysListView32",LVS_LIST | LVS_SINGLESEL | LVS_SORTASCENDING | LVS_ALIGNLEFT | LVS_NOCOLUMNHEADER | WS_BORDER | WS_TABSTOP,145,200,308,8
PUSHBUTTON "&Save Changes",IDC_SAVE_CHANGES,248,219,65,14,WS_DISABLED
PUSHBUTTON "&Cancel Changes",IDC_CANCEL_CHANGES,318,219,65,14,WS_DISABLED
PUSHBUTTON "C&lose",IDCANCEL,388,219,65,14
LTEXT "&Plugin", IDC_PLUGIN_PROMPT, 146, 110, 29, 8
COMBOBOX IDC_AUTHPLUGIN, 179, 110, 99, 30, CBS_DROPDOWN | CBS_AUTOHSCROLL | CBS_SORT | WS_VSCROLL | WS_TABSTOP
LTEXT "Maximum number of &queries per hour",IDC_MAXQUERY_PROMPT,145,147,120,8
EDITTEXT IDC_MAXQUERIES,282,145,60,14,ES_AUTOHSCROLL | ES_NUMBER,WS_EX_RIGHT
CONTROL "",IDC_MAXQUERY_SPIN,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,350,145,11,14
LTEXT "Ma&ximum number of updates per hour",IDC_MAXUPDATE_PROMPT,145,166,122,8
EDITTEXT IDC_MAXUPDATE,282,163,60,14,ES_AUTOHSCROLL | ES_NUMBER,WS_EX_RIGHT
CONTROL "",IDC_MAXUPDATE_SPIN,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,350,163,11,14
LTEXT "Maxi&mum number of connections per hour",IDC_MAXCONN_PROMPT,145,185,134,8
EDITTEXT IDC_MAXCONN,282,181,60,14,ES_AUTOHSCROLL | ES_NUMBER,WS_EX_RIGHT
CONTROL "",IDC_MAXCONN_SPIN,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,350,181,11,14
LTEXT "Maximum number of user connec&tions",IDC_MAXCONNSIM_PROMPT,145,203,121,8
EDITTEXT IDC_MAXSIMCONN,282,199,60,14,ES_AUTOHSCROLL | ES_NUMBER,WS_EX_RIGHT
CONTROL "",IDC_MAXSIMCONN_SPIN,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,350,199,11,14
LTEXT "Note - Please select an object to GRANT/REVOKE privileges",IDC_PRIV_NOTE,196,132,190,8
LTEXT "(Note - 0 means no limitations)",IDC_HELPZERO,145,228,132,8
CONTROL "Select/Deselect &All",IDC_SELECTALLCHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,145,214,75,10
CONTROL "",IDC_PRIVLIST,"SysListView32",LVS_LIST | LVS_SINGLESEL | LVS_SORTASCENDING | LVS_ALIGNLEFT | LVS_NOCOLUMNHEADER | WS_BORDER | WS_TABSTOP,145,228,308,8
PUSHBUTTON "&Save Changes",IDC_SAVE_CHANGES,248,249,65,14,WS_DISABLED
PUSHBUTTON "&Cancel Changes",IDC_CANCEL_CHANGES,318,249,65,14,WS_DISABLED
PUSHBUTTON "C&lose",IDCANCEL,388,249,65,14
END

IDD_CUSTOMFILTER DIALOGEX 0, 0, 241, 51
Expand Down Expand Up @@ -3035,7 +3037,7 @@ BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 453
TOPMARGIN, 7
BOTTOMMARGIN, 233
BOTTOMMARGIN, 263
END

IDD_CUSTOMFILTER, DIALOG
Expand Down
28 changes: 28 additions & 0 deletions include/TabIndexes.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,17 @@ class TableTabInterfaceTabMgmt;

#define NO_COLUMNS_DEFINED_FOR_INDEX _(L"No columns selected")




class FieldStructWrapper;

class IndexColumn : public wyElem
{
public:
FieldStructWrapper *m_pcwrapobj;
wyInt32 m_lenth;
wyString m_order;
IndexColumn(FieldStructWrapper *value);
};

Expand All @@ -38,6 +42,8 @@ struct IndexInfo
List *m_listcolumns;
wyString m_indextype;
wyString m_indexcomment;
wyString m_visible;

};

class IndexesStructWrapper : public wyElem
Expand Down Expand Up @@ -80,6 +86,9 @@ class TabIndexes
wyBool m_ismysql41;
wyBool m_ismariadb52;
wyBool m_ismysql553;
wyBool m_supportsordering;
wyBool m_supportsvisibility;


// used for Shift+Click functionality
wyInt32 m_lastclickindgrid;
Expand All @@ -94,6 +103,7 @@ class TabIndexes
// backtick string from preferences, either empty or quote
wyChar* m_backtick;


/// Constructor
TabIndexes(HWND hwndparent, TableTabInterfaceTabMgmt* ptabmgmt);

Expand Down Expand Up @@ -178,6 +188,7 @@ class TabIndexes
wyBool OnEndEditIndexColumns(WPARAM wParam, LPARAM lParam);
wyBool OnEndEditIndexType(WPARAM wParam, LPARAM lParam);
wyBool OnEndEditIndexComment(WPARAM wParam, LPARAM lParam);
wyBool OnEndEditIndexVisibility(WPARAM wParam, LPARAM lParam);

/// Shows the Columns Dialog
/**
Expand Down Expand Up @@ -454,4 +465,21 @@ class TabIndexes
void PositionWindow(RECT* prect, HWND hwnd);

wyInt32 InsertRow();


/**
Maps A/D to ASC / DESC
@params val : IN message parameter A or D
@returns ASC or DESC in accordance
*/
wyString DecodeIndexOrder(wyString val);

/**
Maps yes/no to Visible / Unvisible
@params val : IN message parameter : Yes or False
@returns Visible or Unvisible in accordance
*/
wyString DecodeIndexVisibility(wyString val);


};
55 changes: 54 additions & 1 deletion include/UserManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,23 @@ class UserManager
*/
wyInt32 PopulateUserCombo();

//Function that checks if current server supports authentication plugin
/**
*/
boolean IsAuthPluginSupported();

//Function that populates the contents of plugin combo
/**
@returns -1 on MySQL error else, >= 0
*/
wyInt32 PopulateAuthPluginCombo();

//Function that updates the selection on plugin combo from current user definitions on DB
/**
@returns -1 on MySQL error else, >= 0
*/
wyBool GetUserCurrentAuthPlugin();

///Enumeration procedure that enables/disables the children
/**
@param hwnd : IN child window handle
Expand Down Expand Up @@ -326,7 +343,22 @@ class UserManager
*/
wyBool OnTreeViewItemExpanding(LPARAM lparam);

///Function creates the two SQLite tables used to store the privileges in memeory

//Function that Saves the contents of plugin combo
/**
@returns treu on sucess false on failure>
*/
wyBool SaveAuthPlugin();

/*
wyBool IsServerMariaDb(wyString version);
wyString GetServerVersion();
wyInt32 GetVersionNo(wyString version);
*/

///Function creates the two SQLite tables used to store the privileges in memeory
/**
@returns void
*/
Expand Down Expand Up @@ -560,6 +592,7 @@ class UserManager
*/
wyBool SavePassword();


///Helper function to execute FLUSH PRVILEGES
/**
@returns wyTrue on success else wyFalse
Expand Down Expand Up @@ -698,6 +731,12 @@ class UserManager
//flag tells whether the server is >= 5.02
wyBool m_ismysql502;

//flag tells whether the server is MariaDb
wyBool m_ismariadb;
//flag tells whether the server is MariaDb higher then 10.4
wyBool m_ismariadb104;
//flag tells whether the server is MariaDb higher then 10.4
wyBool m_ismariadb55;
//name of the currently selected db in tree view
wyString m_currentdb;

Expand Down Expand Up @@ -747,6 +786,20 @@ class UserManager

//member stores the database context on starting UM and restore it before closing
wyString m_selecteddatabase;

//plugin name of the selected user
wyString m_authpluginname;

wyInt32 m_authplugincount;

// stores the current server version number
wyInt32 m_serververno;

// holds current server full version string
wyString m_versionfull;

// holds current default plugin for authentication
wyString m_defaultAuthPlugin;
};


Expand Down
5 changes: 3 additions & 2 deletions include/Version.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#define MAJOR_VERSION_INT 13
#define MINOR_VERSION_INT 1
#define UPDATE_VERSION_INT 5
#define UPDATE_VERSION_INT 6
#define RELEASE_VERSION_INT 0
#define EXTRAINFO " "
#define EXTRAINFO ""

Loading

0 comments on commit f0dec9c

Please sign in to comment.