Skip to content

Commit

Permalink
SQLyog 12.4.1 GA
Browse files Browse the repository at this point in the history
  • Loading branch information
wyvijay committed Mar 1, 2017
1 parent dc5840d commit 3b03624
Show file tree
Hide file tree
Showing 15 changed files with 283 additions and 55 deletions.
12 changes: 12 additions & 0 deletions include/ExportAsSQL.h
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ typedef struct __schdextra_options
wyBool m_flushslave;
wyBool m_autocommit;
wyBool m_locktablewrite;
wyBool m_hextoblob;
wyBool m_singletransaction; //single transaction
wyBool m_struconly;
wyBool m_completeinsert;
Expand Down Expand Up @@ -486,6 +487,9 @@ class MySQLDump
/// Flag to set fk_checks = 0 and 1
wyBool m_setfkchecks;

/// Flag to set hex to blob conversion to 0 or 1
wyBool m_sethexblob;

///Flag to set all databases
wyBool m_alldb;

Expand Down Expand Up @@ -956,6 +960,14 @@ class MySQLDump
*/
void SetFKChecks (wyBool flag);

/// Sets the hex to blob in export dialog
/**
@param flag : IN set hex to blob ?
@returns void
*/

void SetHexBlob (wyBool flag);

/// Enables or disables the file append mode
/**
@param val : IN Enabled or disabled ?
Expand Down
6 changes: 3 additions & 3 deletions include/FrameWindowHelper.h
Original file line number Diff line number Diff line change
Expand Up @@ -396,9 +396,9 @@ 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 BUYLABEL "Buy SQLyog"
#define BUYLABEL "click here"
#if IS_FROM_WINDOWS_STORE == 1
#define BUYURL "https://www.webyog.com/product/sqlyogpricing/?utm_source=sqlyogapp&utm_medium=referral&utm_campaign=windowsstore"
#define BUYURL "https://www.webyog.com/product/sqlyog/?utm_source=sqlyogapp&utm_medium=referral&utm_campaign=windowsstore"
#else
#define BUYURL "http://www.webyog.com/product/sqlyogpricing"
#endif
Expand All @@ -414,7 +414,7 @@ All Files(*.*)\0*.*\0"
#define SUPPORTURL "https://www.webyog.com/customer?ref=sqlyog"

#if IS_FROM_WINDOWS_STORE == 1
#define BUYENT "https://www.webyog.com/product/sqlyogpricing/?utm_source=sqlyogapp&utm_medium=referral&utm_campaign=windowsstore"
#define BUYENT "https://www.webyog.com/product/sqlyog/?utm_source=sqlyogapp&utm_medium=referral&utm_campaign=windowsstore"
#else
#define BUYENT "http://www.webyog.com/product/sqlyogpricing"
#endif
Expand Down
23 changes: 12 additions & 11 deletions include/SQLyog.rc
Original file line number Diff line number Diff line change
Expand Up @@ -972,7 +972,7 @@ BEGIN
CONTROL 662,IDC_STATIC,"Static",SS_BITMAP | SS_CENTERIMAGE,7,9,100,220
END

IDD_EXPORTDATA DIALOGEX 150, 50, 391, 339
IDD_EXPORTDATA DIALOGEX 150, 50, 391, 378
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION " SQL Dump"
FONT 8, "MS Shell Dlg", 0, 0, 0x1
Expand All @@ -982,7 +982,7 @@ BEGIN
LTEXT "Database na&me",IDC_TEXT2,6,34,51,8
COMBOBOX IDC_EXPORT_DBCOMBO,6,47,128,137,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_GROUP | WS_TABSTOP
LTEXT "&Object(s)",IDC_TEXT4,6,62,54,8
CONTROL "",IDC_EXPORTTREE,"SysTreeView32",TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | TVS_CHECKBOXES | WS_BORDER | WS_HSCROLL | WS_GROUP | WS_TABSTOP,6,72,172,212
CONTROL "",IDC_EXPORTTREE,"SysTreeView32",TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | TVS_CHECKBOXES | WS_BORDER | WS_HSCROLL | WS_GROUP | WS_TABSTOP,6,74,172,234
GROUPBOX "",IDC_GROUP1,142,2,243,26
CONTROL "Str&ucture only",IDC_CHK_STRUCTURE,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,153,12,57,11
CONTROL "&Data only",IDC_CHK_DATAONLY,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,232,12,43,11
Expand All @@ -994,7 +994,7 @@ BEGIN
CONTROL "Loc&k tables for read",IDC_CHK_LOCKFORREAD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,202,79,97,12
CONTROL "Flush lo&gs before dump",IDC_CHK_FLUSHLOGS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,202,91,87,12
CONTROL "&Single transaction",IDC_SINGLE_TRANSACTION,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,202,103,104,12
GROUPBOX "Options written to file",IDC_GROUP3,183,121,199,119
GROUPBOX "Options written to file",IDC_GROUP3,183,118,199,139
CONTROL "Include ""USE d&atabase"" statement",IDC_CHK_USEDBNAME,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,202,132,124,11
CONTROL "Include ""&CREATE database"" statement",IDC_CHK_CREATEDB,
Expand All @@ -1009,15 +1009,16 @@ BEGIN
CONTROL "Ignore DEFINER",IDC_CHK_DEFINER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,202,216,105,11
CONTROL "Include version information in backup file",IDC_CHK_VERSION,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,202,228,168,11
GROUPBOX "Advance options",IDC_GROUP4,186,242,199,43
CONTROL "Prefix with Timestamp",IDC_TIMESTAMP_PREFIX,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,202,250,87,12
CONTROL "File per object",IDC_FILE_TABLE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,202,263,104,12
CONTROL "",IDC_PROGRESS,"msctls_progress32",WS_BORDER,6,293,379,14,WS_EX_TRANSPARENT
GROUPBOX "Advance options",IDC_GROUP4,184,263,199,41
CONTROL "Prefix with Timestamp",IDC_TIMESTAMP_PREFIX,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,202,274,87,12
CONTROL "File per object",IDC_FILE_TABLE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,202,288,104,12
CONTROL "",IDC_PROGRESS,"msctls_progress32",WS_BORDER,6,323,379,14,WS_EX_TRANSPARENT
LTEXT "",IDC_MESSAGE2,6,307,249,18
DEFPUSHBUTTON "&Export",IDOK,280,311,50,15
PUSHBUTTON "C&lose",IDCANCEL,335,311,50,15
PUSHBUTTON "Do&ne",IDDONE,335,311,50,15,NOT WS_VISIBLE | WS_DISABLED
DEFPUSHBUTTON "&Export",IDOK,280,345,50,15
PUSHBUTTON "C&lose",IDCANCEL,335,345,50,15
PUSHBUTTON "Do&ne",IDDONE,335,346,50,15,NOT WS_VISIBLE | WS_DISABLED
LTEXT "Grip",IDC_EXPDAT_GRIP,215,310,14,8
CONTROL "Convert BLOB to HEX",IDC_CHK_HEXBLOB,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,202,240,168,11
END

IDD_ABOUTDIALOG DIALOGEX 125, 125, 334, 107
Expand Down Expand Up @@ -2490,7 +2491,7 @@ BEGIN

IDD_EXPORTDATA, DIALOG
BEGIN
BOTTOMMARGIN, 280
BOTTOMMARGIN, 319
END

IDD_ABOUTDIALOG, DIALOG
Expand Down
1 change: 1 addition & 0 deletions include/resource.h
Original file line number Diff line number Diff line change
Expand Up @@ -507,6 +507,7 @@
#define IDC_CHK_VERSION 1096
#define IDC_ONEROW 1097
#define IDC_NULLREPLACEBY 1098
#define IDC_CHK_HEXBLOB 1098
#define IDC_OBFONT 1099
#define IDC_NULLCHAR 1099
#define IDC_COMBO 1101
Expand Down
77 changes: 63 additions & 14 deletions src/CalendarCtrl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,7 @@ wyInt32 CALLBACK CalendarCtrl::CalendarProc(HWND hwnd, UINT message, WPARAM wPar
case WM_LBUTTONDOWN:
SendMessage(pcc->m_hwnd, WM_NEXTDLGCTL, (WPARAM)GetDlgItem(pcc->m_hwnd,IDC_DATETIMEPICKER1), TRUE);
SetFocus(GetDlgItem(pcc->m_hwnd,IDC_DATETIMEPICKER1));
EnableWindow(GetDlgItem(pcc->m_hwnd,IDOK), TRUE);
break;
}
return pcc->m_calproc(hwnd,message,wParam,lParam);
Expand Down Expand Up @@ -294,37 +295,77 @@ CalendarCtrl::ConvertCtrlValues()
void
CalendarCtrl::InitCalendarValues()
{
wyInt32 iszerodateflag=0;
wyString temp,temp2;
m_row = CustomGrid_GetCurSelRow(m_hwndparent);
m_col = CustomGrid_GetCurSelCol(m_hwndparent);
wyChar tempchar[5]= "";


if(m_orgdata.Substr(0,4)==NULL)
strcpy(tempchar,"0");
wyString year,month,day;
wyChar * tempstr = NULL;

// Year Section
tempstr = m_orgdata.Substr(0,4);
if(tempstr !=NULL)
{
year.SetAs(tempstr);
if(year.CompareI("0000")==0)
{
strcpy(tempchar,"1970");
iszerodateflag=-1;
}
else
strcpy(tempchar,year.GetString());
}
else
strcpy(tempchar,m_orgdata.Substr(0,4));
{
strcpy(tempchar,"0");
}
temp.Add(tempchar);
m_datetime.wYear=temp.GetAsUInt32();
temp.Clear();


if(m_orgdata.Substr(5,2)==NULL)
strcpy(tempchar,"0");

// Month Section
tempstr = m_orgdata.Substr(5,2);
if(tempstr !=NULL)
{
month.SetAs(tempstr);
if(month.CompareI("00")==0)
{
strcpy(tempchar,"01");
iszerodateflag=-1;
}
else
strcpy(tempchar,month.GetString());
}
else
strcpy(tempchar,m_orgdata.Substr(5,2));
{
strcpy(tempchar,"0");
}
temp.Add(tempchar);
m_datetime.wMonth=temp.GetAsUInt32();
temp.Clear();
// Date Section

if(m_orgdata.Substr(8,2)==NULL)
strcpy(tempchar,"0");
tempstr = m_orgdata.Substr(8,2);
if(tempstr !=NULL)
{
day.SetAs(tempstr);
if(day.CompareI("00")==0)
{
strcpy(tempchar,"01");
iszerodateflag=-1;
}
else
strcpy(tempchar,day.GetString());
}
else
strcpy(tempchar,m_orgdata.Substr(8,2));
{
strcpy(tempchar,"0");
}
temp.Add(tempchar);
m_datetime.wDay=temp.GetAsUInt32();
temp.Clear();


if(m_orgdata.Substr(11,2)==NULL)
strcpy(tempchar,"0");
Expand Down Expand Up @@ -354,6 +395,13 @@ CalendarCtrl::InitCalendarValues()
m_datetime.wMilliseconds=0;



/* to check if the user has entered a date containg year as zero or month as zero or day as zero*/

if(iszerodateflag==-1){
EnableWindow(GetDlgItem(m_hwnd, IDOK), FALSE);
}

MonthCal_SetCurSel(GetDlgItem(m_hwnd,IDC_MONTHCALENDAR1), &m_datetime);
if(!m_isDate)
{
Expand Down Expand Up @@ -524,6 +572,7 @@ CalendarCtrl::OnClickNow()
wyString temp;
SYSTEMTIME seltime;
GetLocalTime(&seltime);
EnableWindow(GetDlgItem(m_hwnd, IDOK), TRUE);
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);
Expand Down
18 changes: 14 additions & 4 deletions src/EditorProcs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,12 +151,22 @@ EditorProcs::ExecuteAllQuery(wyInt32 * stop)
GetCompleteText(query);
wyChar *tmp = AllocateBuff(query.GetLength() + 1);
strcpy(tmp,query.GetString());
wyChar *tmp1 = AllocateBuff(query.GetLength() * 2 + 1);
AddCRToLF(tmp, tmp1);
wyString temp;
/*
All stored procedures created via workbench will contain /n as new line character between BEGIN and END which will
disturb the formatting when altered via SQLyog hence changing all \n to \r\n and then changing \r\r back to \r
Previously this was done via function AddCRToLF/ChangeCRtoLF
*/
temp.SetAs(tmp);
temp.FindAndReplace("\n","\r\n");
temp.FindAndReplace("\r\r","\r");
//wyChar *tmp1 = AllocateBuff(query.GetLength() * 2 + 1);
//AddCRToLF(tmp, tmp1);
//ChangeCRToLF(tmp);
query.SetAs(tmp1);
//query.SetAs(tmp1);
query.SetAs(temp.GetString());
free(tmp);
free(tmp1);
//free(tmp1);
/* set the flag to executing */
wnd->SetExecuting(wyTrue);
*stop = 0;
Expand Down
20 changes: 16 additions & 4 deletions src/EditorQuery.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ EditorQuery::ExecuteAllQuery(wyInt32 *stop)
wyString query;
wyChar *tmp;
wyBool selquery = wyFalse;

wyString temp;

MDIWindow *wnd;
HWND hwnd;
TabMgmt *ptabmgmt = NULL;
Expand Down Expand Up @@ -131,9 +132,20 @@ EditorQuery::ExecuteAllQuery(wyInt32 *stop)
SendMessage(m_hwnd, SCI_GETSELTEXT, 0, (LPARAM)tmp);
}
// Commented Because to Solve an Extra '\n' appending bug in http://www.webyog.com/forums//index.php?showtopic=3556
ChangeCRToLF(tmp);
query.SetAs(tmp);
free(tmp);
// ChangeCRToLF(tmp);
//query.SetAs(tmp);

temp.SetAs(tmp);
/*
All stored procedures created via workbench will contain /n as new line character between BEGIN and END which will
disturb the formatting when altered via SQLyog hence changing all \n to \r\n and then changing \r\r back to \r
Previously this was done via function AddCRTOLF in editorproc which disturbed the schema when executed via query editor instead of
EditorProc
*/
temp.FindAndReplace("\n","\r\n");
temp.FindAndReplace("\r\r","\r");
query.SetAs(temp.GetString());
free(tmp);

/* set the flag to executing */
wnd->SetExecuting(wyTrue);
Expand Down
Loading

0 comments on commit 3b03624

Please sign in to comment.