TMyEmbConnection: Second connection failed.
TMyEmbConnection: Second connection failed.
Hello
For a strange problem in my project, I created a test application for TMyEmbConnection.
Environment is Win2k+MySQL v4.1.20
I found that if I used TMyEmbConnection, I must set the Params "--skip-innodb". Otherwise, the second connection always fails unless the user manually delete all the ibdata files in the datadir.
It is a MyDAC problem, or MySQL problem?
			
									
									
						For a strange problem in my project, I created a test application for TMyEmbConnection.
Environment is Win2k+MySQL v4.1.20
I found that if I used TMyEmbConnection, I must set the Params "--skip-innodb". Otherwise, the second connection always fails unless the user manually delete all the ibdata files in the datadir.
It is a MyDAC problem, or MySQL problem?
This is MySQL Embedded Server issue. Please see following threads for more information:
- Trouble with myembconection
- Assertion failure...
			
									
									
						- Trouble with myembconection
- Assertion failure...
Hello
The connection is not established during design time.
As my project only use MyISAM type engine, so such setting is a work around for me.
But if my project need InnoDB engine, then it seems TMyEmbConnection have problem with the lastest MySQL classic server (v4.1.20), that for the second connection, the ibdata files must be deleted manually first, otherwise connection is always a failure.
So I would like to verify whether the problem is due to MySQL server or MyDAC component.
			
									
									
						The connection is not established during design time.
As my project only use MyISAM type engine, so such setting is a work around for me.
But if my project need InnoDB engine, then it seems TMyEmbConnection have problem with the lastest MySQL classic server (v4.1.20), that for the second connection, the ibdata files must be deleted manually first, otherwise connection is always a failure.
So I would like to verify whether the problem is due to MySQL server or MyDAC component.
If I make application that works with embedded server (--skip-innodb option is off) and close IDE, I can run the application, open dataset and exit the application. If I run the application again, I'll be able to open dataset again. But if I try to open two instances of the application that work with the same database at the same time, I'll get error when establishing second connection. This is MyDAC behaviour to prevent embedded server crash and data corrupting.
			
									
									
						Hello
I made a test project, and showing TMyEmbConnection has compatible problem with MySQL v4.1.20.
You can do the following to make a test:
Drop one TMyEmbConnection and two TButton components to a form,
the TButtons are corresponding to "
MyEmbConnection1->Connect(), and MyEmbConnection1->Disconnect() respectively.
Build the application, and check the libmysqld.dll and share/english/... are existing in the path.
Run the application, upon connect(), ibdata files will be created. Disconnect and reconnect again, all has no problem.
Now you exit the application, start the application again, click connect, and error messages are coming out.
I can also provide the test project source code on demand.
			
									
									
						I made a test project, and showing TMyEmbConnection has compatible problem with MySQL v4.1.20.
You can do the following to make a test:
Drop one TMyEmbConnection and two TButton components to a form,
the TButtons are corresponding to "
MyEmbConnection1->Connect(), and MyEmbConnection1->Disconnect() respectively.
Build the application, and check the libmysqld.dll and share/english/... are existing in the path.
Run the application, upon connect(), ibdata files will be created. Disconnect and reconnect again, all has no problem.
Now you exit the application, start the application again, click connect, and error messages are coming out.
I can also provide the test project source code on demand.
Hello
The reason is finally located in MySQL server version.
For copyright reason, we have purchased and used classic version of MySQL server, which is no transaction supported.
So in this point of view, inno DB is naturely disabled. Besides, it must also be disable from server parameter setting.
So now TMyEmbConnect works perfectly in our application.
			
									
									
						The reason is finally located in MySQL server version.
For copyright reason, we have purchased and used classic version of MySQL server, which is no transaction supported.
So in this point of view, inno DB is naturely disabled. Besides, it must also be disable from server parameter setting.
So now TMyEmbConnect works perfectly in our application.