Forum Replies Created
-
AuthorPosts
-
jan marco alkemaMember
Hello,
I downloaded the SQLYog source code with:
svn checkout http://sqlyog.googlecode.com/svn/trunk/ sqlyog-read-only-20120826
I get errors when I compiled it on 64 bits (Windows 7):
Rebuild All started: Project: SQLyogCommunity, Configuration: Debug x64
Build started 8/26/2012 10:08:23 PM.
_PrepareForClean:
Deleting file “DebugSQLyogCommunity.lastbuildstate”.
InitializeBuildStatus:
Creating “DebugSQLyogCommunity.unsuccessfulbuild” because “AlwaysCreate” was specified.
ClCompile:
AutoCompleteInterface.cpp
BlobMgmt.cpp
..srcBlobMgmt.cpp(102): error C2065: 'GWL_USERDATA' : undeclared identifier
..srcBlobMgmt.cpp(107): error C2065: 'GWL_USERDATA' : undeclared identifier
..srcBlobMgmt.cpp(194): error C2065: 'GWL_USERDATA' : undeclared identifier
.
.
I see that the 'source port' to VS2010 has gone well–), but when will SQLYog (Community part) be ported to 64 bits?
Greetings Jan Marco
jan marco alkemaMemberKhushboo,
X86 (32 bits) and X64 (64 bits) SQLYog seems to work good in my environment. Only I use dll htmlayout.dll (besides system dll's). I can't include the source of htmlayout.dll, because it is not open source code.
X86Debug:
Size File
774,144 htmlayout.dll
116,736 Keywords.db
9,481,728 SQLYog.exe
x64Debug
Size File
3,756,544 htmlayout.dll
116,736 Keywords.db
11,567,104 SQLYog.exe
I changed all SendMessage to SendMessage(.., (WPARAM) x3, (LPARAM) x4);
I found two SendMessage which have parameter x3 (LPARAM) type casting instead of type casting (WPARAM).
Checked out revision 265;Line 461;EditorBase.cpp://::SendMessage(m_hwnd, SCI_REPLACESEL, (LPARAM)TRUE, (LPARAM)textstr.GetString());
I changed to:
::SendMessage(m_hwnd, SCI_REPLACESEL, (WPARAM)TRUE, (LPARAM)textstr.GetString());
Line 530:EditorBase.cpp://::SendMessage(m_hwnd, SCI_REPLACESEL, (LPARAM)TRUE, (LPARAM)text);
I changed to:
::SendMessage(m_hwnd, SCI_REPLACESEL, (WPARAM)TRUE, (LPARAM)text);
Greetings Jan Marco
jan marco alkemaMemberKhushboo ,
I got a 64 bits Windows7 crash on:
EditorFont.cpp: pixelwidth = 4 + linenumwidth * (SendMessage(hwndedit, SCI_TEXTWIDTH, STYLE_LINENUMBER, (long)”9″));
Changed type casting of last parameter. It seems to prevent crashing in 64 bits mode:
pixelwidth = 4 + linenumwidth * (SendMessage(hwndedit, SCI_TEXTWIDTH, STYLE_LINENUMBER, (LONG_PTR) “9”));
I changed all type casting of last parameter of all SendMessage-routine to (LONG_PTR). SQLyog seems to work in 64 bits mode in my environment —)
Not tested, Maybe better change the type casting of the last two parameters to (WPARAM), (LPARAM) for all SendMessage routines -> for example:
pixelwidth = 4 + linenumwidth * (SendMessage(hwndedit, SCI_TEXTWIDTH, (WPARAM) STYLE_LINENUMBER, (LPARAM) “9”));
Greetings Jan Marco
jan marco alkemaMemberVishal, Thank you, for your good advise/feedback —)
//Checked out revision 263, XP, VS2005:
LexMySQL.cxx and LexMySQL.h are not included in http://sourceforge.net/projects/scintilla/files/scintilla/1.72/scintilla172.zip/download I included both files from revision 263. I put entry “LINK_LEXER(lmMySQL);” in file 'KeyWords.cxx'.
The obtained DLL 'SciLexer.dll' works properly in SQLYog!
I prefer to link a static build version of scintilla172 in SQLYog
I build scintilla172 als library output, and linkt it in SQLYog, I changed in WinMain.cpp linenumber 123:
#ifdef STATIC_BUILD
Scintilla_LinkLexers();
Scintilla_RegisterClasses(hinstance);
#else
VERIFY(hsci = ::LoadLibrary(L”SciLexer.dll”));
if(!hsci)
{
DisplayErrorText(GetLastError(), “Error loading SciLexer.dll”);
VERIFY(FreeLibrary(hsci));
return 0;
}
#endif
Static build version works properly also (in 32 bits),
Greeting Jan Marco
jan marco alkemaMemberChecked out revision 261, VS2005, XP:
1>c:devsqlyog-20100807srcwystring.cpp(1198) : error C2440: '=' : cannot convert from 'const char *' to 'wyChar *'
1>c:devsqlyog-20100807srcwystring.cpp(1205) : error C2440: '=' : cannot convert from 'const char *' to 'wyChar *'
In LogMgmt.cpp :
#define DEBUG_LOG_FILE “c:\sqlyogdeb.log”
I don't think that Window7 (32|64) likes to put files in C: directory
jan marco alkemaMemberKhushboo,
Quote:We will look into it while migrating our project from VS 2003 to VS 2010.1) When will the migration be planned to execute?
2) Is there a (technical) dependency on porting SQLYog to 64 bits and the migration of “VS 2003 to VS 2010”?
See http://msdn.microsoft.com/en-us/library/aa384242(VS.85).aspx for the Rules for Using Pointers:
Quote:For example, the following code does not compile:SetWindowLong(hWnd, GWL_WNDPROC, (LONG)MyWndProc);
It should be changed as follows:
SetWindowLongPtr(hWnd, GWLP_WNDPROC, (LONG_PTR)MyWndProc);
LONG_PTR is declared in basetsd.h ( http://www.virtualbox.org/svn/vbox/trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/basetsd.h ).
SQLYog uses different type casting (wyInt32, DWORD, LONG) for parameter dwNewLong in routine ‘SetWindowLong’:
//SetWindowLong(hwnd, GWL_USERDATA,(wyInt32)pcquerywnd);
SetWindowLongPtr(hwnd, GWLP_USERDATA, (LONG_PTR) pcquerywnd);
//m_wporigproc =(WNDPROC)SetWindowLong(hwndedit, GWL_WNDPROC,(DWORD)TabHistory::WndProc);
m_wporigproc =(WNDPROC)SetWindowLongPtr(hwndedit, GWLP_WNDPROC,(LONG_PTR) TabHistory::WndProc);
//SetWindowLong(hDlg, GWL_USERDATA,(LONG)lParam);
SetWindowLongPtr(hDlg, GWLP_USERDATA, (LONG_PTR) lParam);
If you use (large) arrays (see http://stackoverflow.com/questions/1271748/dword-ptr-int-ptr-long-ptr-uint-ptr-ulong-ptr-when-how-and-why ) :
Quote:By using these _PTR types, one codebase can compile for both Win32 and Win64 targets. When performing pointer arithmetic, these types should also be used in 32bit code that needs to be compatible with 64bit. So, if you need to access an array with more than 4billion elements, you would need to use an INT_PTR rather than an INTCHAR* pHuge = new CHAR[0x200000000]; // allocate 8 billion bytes
INT idx;
INT_PTR idx2;
pHuge[idx]; // can only access the 1st 4 billion elements.
pHuge[idx2]; // can access all 64bits of potential array space.
Detect whether operating system is 32-bit or 64-bit (Hans Dietrich):
// Detect whether OS is 32-bit or 64-bit
BOOL Is64BitOS()
{
BOOL bIs64Bit = FALSE;
#if defined(_WIN64)
bIs64Bit = TRUE; // 64-bit programs run only on Win64
#elif defined(_WIN32)
// Note that 32-bit programs run on both 32-bit and 64-bit Windows
typedef BOOL (WINAPI *LPFNISWOW64PROCESS) (HANDLE, PBOOL);
LPFNISWOW64PROCESS pfnIsWow64Process = (LPFNISWOW64PROCESS)GetProcAddress(GetModuleHandle(_T(“kernel32”)), “IsWow64Process”);
if (pfnIsWow64Process)
pfnIsWow64Process(GetCurrentProcess(), &bIs64Bit);
#endif
return bIs64Bit;
}
Greetings Jan Marco
jan marco alkemaMemberKhushboo,
http://social.msdn.microsoft.com/Forums/en-US/vcgeneral/thread/c62b1bf5-6a03-4c66-b24b-ea9fec3f2695 -> http://msdn.microsoft.com/en-us/library/ms644898
I renamed:
SetWindowLong to SetWindowLongPtr
GetWindowLong to GetWindowLongPtr
and
GWL_USERDATA to GWLP_USERDATA
GWL_WNDPROC to GWLP_WNDPROC
You get some errors like:
>error C2664: 'DialogBoxParamW' : cannot convert parameter 4 from 'wyInt32 (__cdecl *)(HWND,UINT,WPARAM,LPARAM)' to 'DLGPROC'
//ret = DialogBoxParam(pGlobals->m_hinstance, MAKEINTRESOURCE(IDD_COPYDATABASE), hwndparent, CopyDatabase::WndProc,(LONG)this);
ret = DialogBoxParam(pGlobals->m_hinstance, MAKEINTRESOURCE(IDD_COPYDATABASE), hwndparent, (DLGPROC) CopyDatabase::WndProc,(LONG)this);
delete HTMLayout.lib from Property pages -> Linker -> Input -> Additional Dependencies and put it under “compiler switch”:
#if defined _M_IX86
#pragma comment( lib, “../lib/HTMLayout.lib” )
#elif defined _M_X64
#pragma comment( lib, “../lib/HTMLayout64.lib” )
#endif
The same can be done with “../lib/pcre.lib” and “/lib/sqlited.lib”. N.B. I will do it another way, I will include the source code of pcre and sqlited in WinMain.cpp.
=============
1>Linking…
1>WinMain.obj : error LNK2019: unresolved external symbol sqlite3_close referenced in function “public: static enum wyBool __cdecl FrameWindow::CheckForAutoKeywords(void)” (?CheckForAutoKeywords@FrameWindow@@SA?AW4wyBool@@XZ)
1>WinMain.obj : error LNK2019: unresolved external symbol sqlite3_open referenced in function “public: static enum wyBool __cdecl FrameWindow::CheckForAutoKeywords(void)” (?CheckForAutoKeywords@FrameWindow@@SA?AW4wyBool@@XZ)
1>WinMain.obj : error LNK2001: unresolved external symbol pcre_free
1>WinMain.obj : error LNK2019: unresolved external symbol pcre_exec referenced in function “int __cdecl MatchStringPattern(char const *,char *,int *,int)” (?MatchStringPattern@@YAHPEBDPEADPEAHH@Z)
1>WinMain.obj : error LNK2019: unresolved external symbol pcre_compile referenced in function “int __cdecl MatchStringPattern(char const *,char *,int *,int)” (?MatchStringPattern@@YAHPEBDPEADPEAHH@Z)
1>WinMain.obj : error LNK2019: unresolved external symbol sqlite3_exec referenced in function “int __cdecl YogSqliteExec(struct sqlite3 *,char const *,int (__cdecl*)(void *,int,char * *,char * *),void *,char * *)” (?YogSqliteExec@@YAHPEAUsqlite3@@PEBDP6AHPEAXHPEAPEAD3@Z23@Z)
1>WinMain.obj : error LNK2019: unresolved external symbol sqlite3_busy_timeout referenced in function “enum wyBool __cdecl OpenKeyWordsDB(struct sqlite3 * *)” (?OpenKeyWordsDB@@YA?AW4wyBool@@PEAPEAUsqlite3@@@Z)
1>DebugBinary/SQLyog.exe : fatal error LNK1120: 7 unresolved externals
Greetings Jan Marco
jan marco alkemaMemberQuote:Please update and check.32 bits compilation works again (Checked out revision 258):
Visual studio 2005:
1>
Rebuild All started: Project: SQLyogCommunity, Configuration: Debug Win32
1>SQLyogCommunity – 0 error(s), 773 warning(s)
Visual studio 2008:
1>
Rebuild All started: Project: SQLyogCommunity, Configuration: Debug Win32
1>SQLyogCommunity – 0 error(s), 781 warning(s)
jan marco alkemaMemberHello DonQuichote,
After 4 days (hard) work, I have build the good environment to compile and link Openoffice successfully. Especially I am interested in Calc. Maybe SQLyog and Calc could be integrated in some way.
Quote:SQLyog is like a swiss army knife. It is not suited for a specific business process, but a general database front-end. In my opinion, an extension possibility would fit the kind of application it is.I think you have good advice for me: The intended purpose of SQLyog is an general front-end!
Only, I will trying to use the code for launch business programs/transactions for my own purpose also.
For example: I made a ProofOfConcept testtask scheduler with worker threads concepts. I use the concepts of http://en.wikipedia.org/wiki/Vertex_(graph_theory) and http://www.utm.edu/departments/math/graph/glossary.html to make a MySQL scheduler version. I use console (dox box) program for testing:
scheduler2 -findendpoints
scheduler2 -scheduleforward
scheduler2 -schedulebackward
scheduler2 -main
I use parts of http://www.codeproject.com/KB/system/RunUser.aspx also. I see another (newer) version on the internet: http://lab.mediaservice.net/code/RunAsUser.zip
A ‘testtask’, could be a backup, “set database engine in single user mode”, wget, etc. I need to work on the code, to implement more functionality. Maybe better putting the code in an standalone demon program.
Quote:But I can understand why you would not implement all kinds of editors.For example SQLYog and PowerEditor (NotePadPlus) uses both Scintilla source. Maybe I could integrated it in one program–)
Quote:If C scares you, you could try to adapt CrunchyFrog. It is an open source application written in Python with a plugin structure. It is not as feature-complete as SQLyog, but it is easily extended.MFC, Python, Perl and QT scares me. I love (‘Plain’) C in a Visual Studio (2005) environment.
Greetings Jan Marco
March 20, 2010 at 7:57 am in reply to: Sqlyog Disappears In Taskmanager When Viewing A 'large' Table #30429jan marco alkemaMemberHello Navya,
I talked to database specialists. They tell me, it could be better solved in database design. They mean selection on id is preferred above the limit selection method.
I made a test program to test the performance on retrieving display length =150 records random in a table of 5056088 records.
My conclusion is that the id_selection method (Appendix B ) is 15 times faster than the limit selection method (Appendix A ).
Navya, Why not load only the display length records in memory. If the user enters
or keys, load new records on demand if the are out of the display records boundaries. For example 150 records. I think it could be programmaly be determined which field is an index/key index field. Greetings Jan Marco
Appendix A: Limit method:
0!2010-03-20 07:58:16!QUERY1= select * from white_subscriber limit 3684932,150;!2010-03-20 07:58:18!duration= 2!
1!2010-03-20 07:58:18!QUERY1= select * from white_subscriber limit 3912782,150;!2010-03-20 07:58:20!duration= 2!
2!2010-03-20 07:58:20!QUERY1= select * from white_subscriber limit 4267014,150;!2010-03-20 07:58:23!duration= 3!
.
.
997!2010-03-20 08:23:19!QUERY1= select * from white_subscriber limit 927186,150;!2010-03-20 08:23:20!duration= 1!
998!2010-03-20 08:23:20!QUERY1= select * from white_subscriber limit 567862,150;!2010-03-20 08:23:20!duration= 0!
999!2010-03-20 08:23:20!QUERY1= select * from white_subscriber limit 790336,150;!2010-03-20 08:23:20!duration= 0!
counter=1000!total_duration_seconds=1504!avg duration= 1 second(s)!
Appendix A: Id selection method:
0!2010-03-20 08:25:39!QUERY1=select * from white_subscriber where (id >=1889324) AND (id < 1889474);!2010-03-20 08:25:39!duration= 0! 1!2010-03-20 08:25:39!QUERY1=select * from white_subscriber where (id >=3179392) AND (id < 3179542);!2010-03-20 08:25:40!duration= 1! 2!2010-03-20 08:25:40!QUERY1=select * from white_subscriber where (id >=450716) AND (id < 450866);!2010-03-20 08:25:40!duration= 0! . . 997!2010-03-20 08:27:18!QUERY1=select * from white_subscriber where (id >=2427516) AND (id < 2427666);!2010-03-20 08:27:19!duration= 1! 998!2010-03-20 08:27:19!QUERY1=select * from white_subscriber where (id >=3875214) AND (id < 3875364);!2010-03-20 08:27:19!duration= 0! 999!2010-03-20 08:27:19!QUERY1=select * from white_subscriber where (id >=4867814) AND (id < 4867964);!2010-03-20 08:27:19!duration= 0! counter=1000!total_duration_seconds= 99!avg duration= 0 second(s)!
jan marco alkemaMemberHello Peter,
Quote:But still you should not expect us to take any such initiative. We are providing standardized software – we are not providing customized solutions.It depends on how you look to the matter what is standard software components or not. I belief a lot of applications uses the ´same´ infrastructure components (like stun, openssl, memory watcher(Google Chrome), etc).
An example of how I see the “Wish: Edit Blob Field In External Editor”:
Notepad ( http://notepad-plus.sourceforge.net/uk/site.htm or http://www.flos-freeware.ch/notepad2.html ) could (I think) be merged with SQLyog code if an user want to work in one client application. The first project I prefer, maybe there are better one’s. See the screen dump “notepad_plus_interaction.zip” as an example what I suggest. Load file out of the content blob field in table ‘file’. After altering the file, restore the file in the blob field ‘content’, when clicking on option “save”. I retrieve the files from file system. The extension field is blank or has a ‘.’ character in front. If I use “filesystem_x” as extension field value, I could use a file system in the blob field ‘content’, with source code like ( http://code.google.com/p/whefs/ , http://nodadev.wordpress.com/nds-projects/efs-library/ and http://icculus.org/physfs/ )
Greetings Jan Marco
February 27, 2010 at 5:52 am in reply to: Sqlyog Disappears In Taskmanager When Viewing A 'large' Table #30427jan marco alkemaMemberHello Peter,
I use Trail SQLyog v8.3 beta 2,
Quote:But you do have an option to do page-wise display in both DATA and RESULT tab and that is what we recommend.How can I select “page-wise display”? Which option must I select in which window?
Greetings Jan Marco
February 26, 2010 at 7:41 am in reply to: Sqlyog Disappears In Taskmanager When Viewing A 'large' Table #30425jan marco alkemaMemberHello Navya, I have used Vista home Premium, 4 Gb RAM.
The dumpfile is empty. I sqlyog.err appears when I try to close SQLyog icon in “tasklist bar”.
When it crashes I see an empty window on screen and an extra icon in “tasklist bar”. I think that the message “Not enough memory, application terminated!” is meant to be printed in the new (crash) window.
Greetings Jan Marco
Type sqlyog.err
Not enough memory, application terminated!
Directory of C:UsersalkemaAppDataRoamingSQLyog
26-02-2010 08:25
. 26-02-2010 08:25
.. 26-02-2010 08:18 16.384 ColumnAttributes.db
26-02-2010 08:25 0 dir.txt
17-05-2009 14:57
Favorites 24-02-2010 09:27 180 sja.log
24-02-2010 09:27 42 sjasession.xml
26-02-2010 08:19 45 sqlyog.err
26-02-2010 08:17 2.138 sqlyog.ini
26-02-2010 08:17 0 SQLyog_Dump_000.dmp
February 21, 2010 at 12:10 pm in reply to: Sqlyog Disappears In Taskmanager When Viewing A 'large' Table #30421jan marco alkemaMemberHello Navya,
I use “SQLyog 8.3 Beta1”.
If I open table “white_subscriber” with number of Rows = 1,300,000 rows. It works good. See included “Second_screen.zip” also.
If I open table “white_subscriber” with number of Rows = 1,400,000 rows. SQLyog don’t disappear, but has the process status “not reponding”. At the moment it 'crashes' there will appear more than 1 copies of “SQLyog Trail..” in the “task list tool bar= bottom ‘row’ in my screen dump”. See “Third_screen.zip” for the details.
Jan Marco
P.S. Mem.zip is little program to monitor the current memory usage.
jan marco alkemaMemberHello Peter,
Quote:People who use SQLyog will have one or more applications (web applications, adminsitrative applications etc.). There is no need to use a GUI client (except for learning situations) if there is no other application – because there would be no data then. The application(s) will be what *users* see – mostly only *maintainer(s)* will see data in SQLyog. For that reason SQLyog will have to let data be *as they are*.Even this Forums itself would stop working if SQLyog changed data as stored by the Forums system.
Peter, You have good feedback.—) How you see the roadmap for SQLYog.
My point of view: Mayor companies don’t use MySQL for their core business applications. They use Oracle, DB2 (IBM) or MS-SQL instead. A transaction monitor (for example ‘Tuxedo’, see http://en.wikipedia.org/wiki/Tuxedo_(software) ) is used to solve your stated problem above, see http://en.wikipedia.org/wiki/Transaction_processing_system also
I think most people will install MySQL to store personal information on their own Personal Computer (PC) and use a GUI like “SQLyog” if they can use is very user friendly.
Only for design discussion purpose, I made a desired_screendump.bmp to give an example what I mean. See include screendump also.
Peter, My be you have advise for me. Other solutions, Is it realistic or not?
My building blocks:
1) Put SQLyog in OpenOffice Calc; (I haven’t compiled Calc yet);
2) Make pop up menu (right mouse click) dynamical. Call the Qutecom Voip routines;
3) Make splash screen, when one call your peer like “Qutecom”;
4) Import all routines in Chrome (web browser (source code)) framework . (I have compiled Chrome and seems to me, very good source code).
Greetings Jan Marco
-
AuthorPosts