Skip to content

Commit

Permalink
SQLyog 13.1.8 GA
Browse files Browse the repository at this point in the history
  • Loading branch information
sandhyawy committed Oct 25, 2021
1 parent b4d7dab commit 51d3964
Show file tree
Hide file tree
Showing 39 changed files with 372 additions and 237 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-2020 Webyog Inc."
#define COMPANY_COPYRIGHT "(c) 2001-2021 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
9 changes: 9 additions & 0 deletions include/CommonHelper.h
Original file line number Diff line number Diff line change
Expand Up @@ -944,6 +944,11 @@ MYSQL_RES* GetConstraintRes(Tunnel* ptunnel, PMYSQL pmysql, const wyChar* d
*/
wyBool IsDatatypeNumeric(wyString &datatype);

/// Checks whether the datatype belongs to the deprecated numeric size datatypes or not
/*
@param datatype : IN the datatype
*/
wyBool IsDatatypeDeprecatedSizeType(wyString &datatype);

/// Decoding of password
/**
Expand Down Expand Up @@ -998,6 +1003,10 @@ wyBool MigratePassword(wyString conn, wyString dirstr, wyString &pwdstr);

wyBool MigratePassword(wyString &pwdstr);

void RemoveDefaultIntWidth(wyString &datatypestr);

void RemovePattern(wyString &text, const wyChar* pattern);

//void DebugLog(const char *buffer);
#ifdef _WIN32
void WriteLog(const wyChar* str);
Expand Down
8 changes: 8 additions & 0 deletions include/MySQLVersionHelper.h
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,14 @@ void SetCharacterSet(Tunnel *tunnel, MYSQL * mysql, wyChar * charset);
*/
wyBool IsMySQL80011(Tunnel * tunnel, PMYSQL mysql);

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

/// Checks the server version is greater than or equal to 8.0.0
/**
@param tunnel: IN tunnel pointer
Expand Down
4 changes: 2 additions & 2 deletions include/PreferenceBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ struct TREEVIEWDATA
};


#define COMMMUNITY_POWERTOOLS _(L"Power Tools Options (Professional/Enterprise/Ultimate only) ")
#define COMMUNITY_FORMATTER _(L"SQL Formatter Options (Enterprise/Ultimate only) ")
#define COMMMUNITY_POWERTOOLS _(L"Power Tools Options (Ultimate only) ")
#define COMMUNITY_FORMATTER _(L"SQL Formatter Options (Ultimate only) ")
#define FORMATTER_PREVIEW "SELECT\n t1.column1 AS c1,\n t1.column2 AS c2\nFROM table1 t1,\n table2 t2\n\
WHERE t1.column1 = t2.column1\nGROUP BY c1, c2\nORDER BY c1;"

Expand Down
2 changes: 1 addition & 1 deletion include/SQLyog.rc
Original file line number Diff line number Diff line change
Expand Up @@ -3681,7 +3681,7 @@ BEGIN
ID_OBJECT_UPDATESTMT " Create a valid SQL UPDATE statement for the table"
ID_OBJECT_DELETESTMT " Create a valid SQL DELETE statement for the table"
IDS_DSYNCTYPETITLE " How do you want to perform synchronization?"
IDS_DSYNCTYPESUBTITLE " Why upgrade to Professional/Enterprise/Ultimate? Scheduled Jobs allows you to schedule important jobs like backups, data sync, etc"
IDS_DSYNCTYPESUBTITLE " Why upgrade to Ultimate? Scheduled Jobs allows you to schedule important jobs like backups, data sync, etc"
IDM_EDIT_TEMP_ALTERDB "/*\r\nAlter Database Statement\r\nSource : MySQL documentation\r\n*/\r\nALTER DATABASE db_name\r\n [DEFAULT] CHARACTER SET charset_name\r\n | [DEFAULT] COLLATE collation_name"
END

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


Binary file modified include/bitmaps/splash.bmp
Binary file not shown.
Binary file added lib/win32/debug/caching_sha2_password.dll
Binary file not shown.
Binary file added lib/win32/debug/caching_sha2_password.lib
Binary file not shown.
Binary file modified lib/win32/debug/sha256_password.dll
Binary file not shown.
Binary file modified lib/win32/debug/sha256_password.lib
Binary file not shown.
Binary file added lib/win32/debug/tinyxml2.lib
Binary file not shown.
Binary file added lib/win32/release/caching_sha2_password.dll
Binary file not shown.
Binary file added lib/win32/release/caching_sha2_password.lib
Binary file not shown.
Binary file modified lib/win32/release/sha256_password.dll
Binary file not shown.
Binary file modified lib/win32/release/sha256_password.lib
Binary file not shown.
Binary file added lib/win32/release/tinyxml2.lib
Binary file not shown.
Binary file modified lib/win32/release/vcruntime140.dll
Binary file not shown.
Binary file added lib/x64/debug/caching_sha2_password.dll
Binary file not shown.
Binary file added lib/x64/debug/caching_sha2_password.lib
Binary file not shown.
Binary file added lib/x64/debug/libcurl_a_debug.lib
Binary file not shown.
Binary file modified lib/x64/debug/sha256_password.dll
Binary file not shown.
Binary file modified lib/x64/debug/sha256_password.lib
Binary file not shown.
Binary file added lib/x64/debug/tinyxml2.lib
Binary file not shown.
Binary file added lib/x64/release/caching_sha2_password.dll
Binary file not shown.
Binary file added lib/x64/release/caching_sha2_password.lib
Binary file not shown.
Binary file modified lib/x64/release/sha256_password.dll
Binary file not shown.
Binary file modified lib/x64/release/sha256_password.lib
Binary file not shown.
Binary file added lib/x64/release/tinyxml2.lib
Binary file not shown.
Binary file modified lib/x64/release/vcruntime140.dll
Binary file not shown.
77 changes: 77 additions & 0 deletions src/CommonHelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4378,6 +4378,23 @@ IsDatatypeNumeric(wyString &datatype)
return wyTrue;
}

//Checks whether the datatype belongs to the deprecated numeric size datatypes or not
wyBool
IsDatatypeDeprecatedSizeType(wyString &datatype)
{
if (!(
datatype.CompareI("tinyint") == 0 ||
datatype.CompareI("smallint") == 0 ||
datatype.CompareI("mediumint") == 0 ||
datatype.CompareI("int") == 0 ||
datatype.CompareI("integer") == 0 ||
datatype.CompareI("bigint") == 0 ||
datatype.CompareI("year") == 0
))
return wyFalse;

return wyTrue;
}

wyBool
DecodePassword_Absolute(wyString &text)
Expand Down Expand Up @@ -4670,3 +4687,63 @@ MigratePassword(wyString &pwdstr)
return wyTrue;

}

/*
Remove width from Int DataTypes
*/
void
RemoveDefaultIntWidth(wyString &datatypestr)
{
RemovePattern(datatypestr, "\\(\\d+\\)");
}

/*
Currently it only removes first occurance. we can add a while loop to remove further occurances.
*/
void
RemovePattern(wyString &text, const wyChar* pattern)
{
wyInt32 ovector[30];
pcre *re;
wyInt32 erroffset, rc = -1, sucess = 0;//, i = 0;
const char *error;

re = pcre_compile(
pattern, /* the pattern */
PCRE_UTF8 | PCRE_CASELESS | PCRE_NEWLINE_CR,/* default options */ //match is a case insensitive
&error, /* for error message */
&erroffset, /* for error offset */
NULL); /* use default character tables */

/* Compilation failed: print the error message and exit */

if (re == NULL)
return;

/*************************************************************************
* If the compilation succeeded, we call PCRE again, in order to do a *
* pattern match against the subject string. This does just ONE match *
*************************************************************************/

rc = pcre_exec(
re, /* the compiled pattern */
NULL, /* no extra data - we didn't study the pattern */
text.GetString(), /* the subject string */
text.GetLength(), /* the length of the subject */
0, /* start at offset 0 in the subject */
PCRE_NO_UTF8_CHECK, /* default options */
ovector, /* output vector for substring information */
30); /* number of elements in the output vector */

if (re)
{
pcre_free(re);
}

if (rc == 1)
{
text.Erase(ovector[0], ovector[1] - ovector[0]);
}

}

10 changes: 5 additions & 5 deletions src/ConnectionBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@
#include "filters.h"


#define COMUNITY_HTTP _(L"HTTP Tunneling (Professional/Enterprise/Ultimate only)")
#define COMUNITY_SSH _(L"SSH Tunneling (Professional/Enterprise/Ultimate only)")
#define COMUNITY_SSL _(L"SSL Encryption (Professional/Enterprise/Ultimate only)")
#define COMUNITY_HTTP _(L"HTTP Tunneling (Ultimate only)")
#define COMUNITY_SSH _(L"SSH Tunneling (Ultimate only)")
#define COMUNITY_SSL _(L"SSL Encryption (Ultimate only)")

#define GETENT_DLG_TEXT _(L"Get SQLyog PROFESSIONAL/ENTERPRISE/ULTIMATE today to enable this and dozens of other great features.")
#define GETENT_DLG_TEXT _(L"Get SQLyog ULTIMATE today to enable this and dozens of other great features.")

ConnectionBase::ConnectionBase()
{
Expand Down Expand Up @@ -458,7 +458,7 @@ ConnectionBase::InitConnDialog(HWND hdlg, HWND combo, wyBool toadd, wyBool selec
index = SendMessage(hwndcombo, CB_ADDSTRING, 0,(LPARAM)connnamestr.GetAsWideChar());
VERIFY(SendMessage(hwndcombo, CB_SETITEMDATA, index, (LPARAM)tempnumstr.GetAsInt32()));

tempconsecname = strtok(NULL, seps);
tempconsecname = strtok(NULL, seps);
}

width = SetComboWidth(hwndcombo);
Expand Down
27 changes: 12 additions & 15 deletions src/ConnectionCommunity.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
which is probably the best known Open Source licence. The formal terms of GPL licence \
can be found at http://www.fsf.org/licence/.")

#define STATUS_LINK _("Upgrade to SQLyog Professional/Enterprise/Ultimate")
#define STATUS_LINK _("Upgrade to SQLyog Ultimate")

ConnectionCommunity::ConnectionCommunity()
{
Expand Down Expand Up @@ -763,6 +763,7 @@ ConnectionCommunity::OnNewSameConnection(HWND hwndactive, MDIWindow *pcquerywnd,
MYSQL *mysqlnew, *mysqlold, *mysqltemp;
Tunnel *oldtunnel, *newtunnel;
wyString msg;
wyUInt32 client = 0;

if(hwndactive)
{
Expand Down Expand Up @@ -797,7 +798,7 @@ ConnectionCommunity::OnNewSameConnection(HWND hwndactive, MDIWindow *pcquerywnd,

mysqltemp = newtunnel->mysql_real_connect(mysqlnew, mysqlold->host, mysqlold->user,
mysqlold->passwd, NULL, mysqlold->port, NULL,
mysqlold->client_flag | CLIENT_MULTI_RESULTS, NULL);
client | CLIENT_MULTI_RESULTS | CLIENT_REMEMBER_OPTIONS, NULL);

if(!mysqltemp)
{
Expand Down Expand Up @@ -1215,6 +1216,7 @@ wyBool
ConnectionCommunity::CreateSourceInstance(CopyDatabase *copydb)
{
MYSQL *tempmysql, *newsrcmysql;
wyUInt32 client = 0;

copydb->m_newsrctunnel = NULL;
copydb->m_srcprocess = INVALID_HANDLE_VALUE;
Expand All @@ -1235,7 +1237,7 @@ ConnectionCommunity::CreateSourceInstance(CopyDatabase *copydb)
(*copydb->m_srcmysql)->host, (*copydb->m_srcmysql)->user,
(*copydb->m_srcmysql)->passwd, NULL,
(*copydb->m_srcmysql)->port, NULL,
(*copydb->m_srcmysql)->client_flag | CLIENT_MULTI_RESULTS, NULL);
client | CLIENT_MULTI_RESULTS | CLIENT_REMEMBER_OPTIONS, NULL);

if(!newsrcmysql)
{
Expand All @@ -1258,6 +1260,7 @@ wyBool
ConnectionCommunity::CreateTargetInstance(CopyDatabase *copydb)
{
MYSQL *tempmysql, *newtargetmysql;
wyUInt32 client = 0;

copydb->m_newtargettunnel = NULL;
copydb->m_tgtprocess = INVALID_HANDLE_VALUE;
Expand All @@ -1273,7 +1276,8 @@ ConnectionCommunity::CreateTargetInstance(CopyDatabase *copydb)
(*copydb->m_targetmysql)->host, (*copydb->m_targetmysql)->user,
(*copydb->m_targetmysql)->passwd, NULL,
(*copydb->m_targetmysql)->port, NULL,
(*copydb->m_targetmysql)->client_flag | CLIENT_MULTI_RESULTS, NULL);
client | CLIENT_MULTI_RESULTS | CLIENT_REMEMBER_OPTIONS
, NULL);

if(!newtargetmysql)
{
Expand Down Expand Up @@ -1330,14 +1334,7 @@ ConnectionCommunity::OnWmCommand(HWND hwndactive, MDIWindow *wnd, WPARAM wparam)
case ID_FORMATCURRENTQUERY:
case ACCEL_FORMATCURRENTQUERY:
case ACCEL_FORMATSELECTEDQUERY:
{
m_powertoolsID = LOWORD(wparam);
GetSQLyogEntDialog();
m_powertoolsID = 0;
}
break;

case ACCEL_DATASEARCH:
case ACCEL_DATASEARCH:
case ID_DATASEARCH:
case ID_DB_DATASEARCH:
case ACCEL_VDDTOOL:
Expand Down Expand Up @@ -1372,7 +1369,7 @@ ConnectionCommunity::OnWmCommand(HWND hwndactive, MDIWindow *wnd, WPARAM wparam)
case ID_SAVEPOINT_CREATESAVEPOINT:
case ID_SAVEPOINT_RELEASESAVEPOINT:
{
GetSQLyogEntDialog();
GetSQLyogUltimateDialog();
break;
}

Expand Down Expand Up @@ -1624,14 +1621,14 @@ ConnectionCommunity::RepaintTabs(WPARAM wparam)
void
ConnectionCommunity::OnSchdOdbcImport()
{
GetSQLyogEntDialog();
GetSQLyogUltimateDialog();
return;
}

void
ConnectionCommunity::OnScheduleExport()
{
GetSQLyogEntDialog();
GetSQLyogUltimateDialog();
return;
}

Expand Down
4 changes: 2 additions & 2 deletions src/DataView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -623,7 +623,7 @@ DataView::OnWMCommand(WPARAM wparam, LPARAM lparam)
#ifndef COMMUNITY
SwitchView(FORM);
#else
pGlobals->m_pcmainwin->m_connection->GetSQLyogEntDialog();
pGlobals->m_pcmainwin->m_connection->GetSQLyogUltimateDialog();
#endif
break;

Expand Down Expand Up @@ -8361,7 +8361,7 @@ DataView::ShowFormView(wyInt32 show, wyBool isprobe)
//with community we show the ad dialog
if(show != SW_HIDE && isprobe == wyFalse)
{
pGlobals->m_pcmainwin->m_connection->GetSQLyogEntDialog();
pGlobals->m_pcmainwin->m_connection->GetSQLyogUltimateDialog();
}
#endif

Expand Down
3 changes: 2 additions & 1 deletion src/MDIWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4509,6 +4509,7 @@ MDIWindow::ReConnect(Tunnel * tunnel, PMYSQL mysql, wyBool isssh, wyBool isimpor
wyWChar curdb[SIZE_512]= {0};
MYSQL *newmysql;
wyString currentdb;
wyUInt32 client = 0;

newmysql = tunnel->mysql_init((MYSQL*)NULL);

Expand All @@ -4534,7 +4535,7 @@ MDIWindow::ReConnect(Tunnel * tunnel, PMYSQL mysql, wyBool isssh, wyBool isimpor

newmysql = tunnel->mysql_real_connect(newmysql,(*mysql)->host,
(*mysql)->user,(*mysql)->passwd, NULL,
m_conninfo.m_localport, NULL,(*mysql)->client_flag | CLIENT_MULTI_RESULTS | CLIENT_REMEMBER_OPTIONS, NULL);
m_conninfo.m_localport, NULL, client | CLIENT_MULTI_RESULTS | CLIENT_REMEMBER_OPTIONS, NULL);

if(newmysql)
{
Expand Down
11 changes: 11 additions & 0 deletions src/MySQLVersionHelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,17 @@ IsMySQL80011(Tunnel * tunnel, PMYSQL mysql)
else
return wyFalse;
}
wyBool
IsMySQL80023(Tunnel * tunnel, PMYSQL mysql)
{
wyUInt32 me = mysql_get_server_version(*mysql);/* Only available from MySQLv8.1*/
const char *dbString = mysql_get_server_info(*mysql);

if (me >= 80023 && !strstr(dbString, "MariaDB"))
return wyTrue;
else
return wyFalse;
}
/*For bug issue 2250*/
wyBool
IsMySQL800(PMYSQL mysql)
Expand Down
2 changes: 1 addition & 1 deletion src/PreferenceBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1535,7 +1535,7 @@ PreferenceBase::InitOthersPrefValues()

if(pGlobals->m_pcmainwin->m_connection->m_enttype != ENT_NORMAL && pGlobals->m_pcmainwin->m_connection->m_enttype != ENT_ULTIMATE && pGlobals->m_pcmainwin->m_connection->m_enttype != ENT_TRIAL)
{
SetWindowText(GetDlgItem(m_hwnd, IDC_TRANSACTION), _(L"Transaction options (Enterprise/Ultimate only)"));
SetWindowText(GetDlgItem(m_hwnd, IDC_TRANSACTION), _(L"Transaction options (Ultimate only)"));
EnableWindow(GetDlgItem(m_hwnd, IDC_PROMPTTRANSACTION), FALSE);
EnableWindow(GetDlgItem(m_hwnd, IDC_PROMPTCLOSETRANSACTION), FALSE);
return;
Expand Down
Loading

0 comments on commit 51d3964

Please sign in to comment.