From 88295923d296e03793c12e3ab40120c35f219753 Mon Sep 17 00:00:00 2001 From: maryamwy Date: Thu, 25 Feb 2016 21:13:03 +0530 Subject: [PATCH] SQLyog 12.2.1 GA --- include/Version.h | 2 +- src/CopyDatabase.cpp | 1 + src/DataView.cpp | 15 ++++++++------- src/FrameWindowHelper.cpp | 4 +++- 4 files changed, 13 insertions(+), 9 deletions(-) diff --git a/include/Version.h b/include/Version.h index eb8d10d..2ed9e88 100644 --- a/include/Version.h +++ b/include/Version.h @@ -1,5 +1,5 @@ #define MAJOR_VERSION_INT 12 #define MINOR_VERSION_INT 2 -#define UPDATE_VERSION_INT 0 +#define UPDATE_VERSION_INT 1 #define RELEASE_VERSION_INT 0 #define EXTRAINFO "" diff --git a/src/CopyDatabase.cpp b/src/CopyDatabase.cpp index 6208b59..63074f1 100644 --- a/src/CopyDatabase.cpp +++ b/src/CopyDatabase.cpp @@ -3125,6 +3125,7 @@ CopyDatabase::ExportActualData(wyChar * table,wyBool *isvirtual) { startrowcount = endrowcount; endrowcount += chunklimit; + i=0; if(IsCopyStopped() == wyTrue) return wyTrue; diff --git a/src/DataView.cpp b/src/DataView.cpp index b86dbf4..3cae955 100644 --- a/src/DataView.cpp +++ b/src/DataView.cpp @@ -997,7 +997,8 @@ DataView::IsColumnVirtual(wyInt32 col) } } - + + return m_data->m_colvirtual[col]; } } @@ -1054,7 +1055,7 @@ DataView::AddDataToQuery(MYSQL_ROW data, wyString &query, const wyChar* delimite for(; i < max; i++) { //we ignore readonly columns - if(IsColumnReadOnly(i) == wyFalse && IsColumnVirtual(i) == wyFalse ) + if(IsColumnReadOnly(i) == wyFalse && IsColumnVirtual(i) != 1 ) { isblob = IsBinary(i); GetColumnName(colname, i); @@ -1127,7 +1128,7 @@ DataView::GenerateInsertQuery(wyString &query) myrow = m_data->m_rowarray->GetRowExAt(m_data->m_modifiedrow)->m_row; //ignore readonly columns and columns that are same - if(IsColumnReadOnly(i) == wyFalse && IsColumnVirtual(i) == wyFalse && (!m_data->m_oldrow || m_data->m_oldrow->m_row[i] != myrow[i] || fieldarray[i])) + if(IsColumnReadOnly(i) == wyFalse && IsColumnVirtual(i) != 1 && (!m_data->m_oldrow || m_data->m_oldrow->m_row[i] != myrow[i] || fieldarray[i])) { if(!fieldarray[i] && m_data->m_oldrow && m_data->m_oldrow->m_row[i] && myrow[i] && !strcmp(m_data->m_oldrow->m_row[i], myrow[i])) { @@ -1159,7 +1160,7 @@ DataView::GenerateInsertQuery(wyString &query) for(i = 0, k = 0; i < m_data->m_datares->field_count; i++) { //ignore readonly columns - if(IsColumnReadOnly(i) == wyFalse && IsColumnVirtual(i) == wyFalse && fieldarray[i]) + if(IsColumnReadOnly(i) == wyFalse && IsColumnVirtual(i) != 1 && fieldarray[i]) { if(k++) { @@ -3330,7 +3331,7 @@ DataView::HandleBlobValue(WPARAM wparam, LPARAM lparam) pib.m_data = GetCellValue(row, col, &len, wyFalse); //check whether the column is readonly or not - isedit = (IsColumnReadOnly(col) || IsColumnVirtual(col) )? wyFalse : wyTrue; + isedit = (IsColumnReadOnly(col) || IsColumnVirtual(col)==1 )? wyFalse : wyTrue; //if chardown is true then lparam = 1, else 0. if(!pib.m_data) @@ -6527,7 +6528,7 @@ DataView::UpdateRow() for(i = 0; pkcount && i < m_data->m_datares->field_count; ++i) { - if(IsColumnReadOnly(i) == wyFalse && IsColumnVirtual(i) == wyFalse) + if(IsColumnReadOnly(i) == wyFalse && IsColumnVirtual(i) != 1) { GetColumnName(colname, i); @@ -7702,7 +7703,7 @@ DataView::ShowContextMenu(wyInt32 row, wyInt32 col, LPPOINT pt) GetColumnName(column, col); //if the column is not read-only - if((iscolreadonly = IsColumnReadOnly(col)) == wyFalse && (iscolvirtual = IsColumnVirtual(col)) == 0 ) + if((iscolreadonly = IsColumnReadOnly(col)) == wyFalse && (iscolvirtual = IsColumnVirtual(col)) != 1 ) { //check whether the column is nullable iscolnullable = IsNullable(m_wnd->m_tunnel, m_data->m_fieldres, (wyChar*)column.GetString()); diff --git a/src/FrameWindowHelper.cpp b/src/FrameWindowHelper.cpp index aed6a85..5f458e8 100644 --- a/src/FrameWindowHelper.cpp +++ b/src/FrameWindowHelper.cpp @@ -2692,12 +2692,14 @@ 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);