[gnome-db] Error in impl_GDA_Connection_close & more



	Hi!

	I was trying to connect to a mysql DB and, as I couldn't do it,
	I exec'd the mysql server standalone 'gda-mysql-srv' to see what
	happens.

	PART I
	-----------------

	I got a bonobo error and the server died due to a SIGSEGV after
	closing the mysql connection both in 'gda-mysql-srv' and
	'gda-postgres-srv'.

	The reasons and (proposed) solutions:

		a) impl_GDA_Connection_close() calls
		gda_server_connection_free() which then calls
		bonobo_object_unref(cnc). When
		gda_server_connection_free() returns it tries, again, to
		unref the same object. 

		The (proposed) solution is to remove the call to
		bonobo_object_unref() in impl_GDA_Connection_close().

		This make the bonobo error not to appear any more.

		b) The SIGSEGV is received when there are no more
		connections and the server is supposed to finish. So I
		put an 'exit(0);' inmediately after the call to
		gda_server_stop() in gda_server_connection_destroy() and
		the SIGSEGV dissapeared! 

	
	PART II
	-----------------

	Testing the data source under gnomedb-fe I was unable to connect
	to the mysql backend because in the DSN I put HOST and 
	UNIX_SOCKET which are incompatible. Instead of getting an error
	message telling me what was wrong, 'gda-mysql-srv' dies
	(SIGSEGV).

	I'm sending the proposed solution as a patch to
	gda-mysql-connection.c . Later on I realized that the same
	problem was already solved in the same way for the postgresql
	provider.

	Anyway I didn't get the real error telling me that I shouldn't
	use UNIX_SOCKET and HOST or PORT. I get a string ("NO
	DESCRIPTION"). The REAL problem is that
	gda_error_set_description() is called twice: one in the generic
	gda_server_connection_add_error_string() and one in the
	particular error function in each provider.






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]