Re: [gnome-db] Guess we have found a bug



On Tue, Dec 04, 2001 at 08:38:13PM -0200, Cleber Rodrigues Rosa Junior wrote:
> - A query like "SELECT this, that FROM you, me WHERE color LIKE '%ish%'"
> works just fine.
> - A query like "SELECT this, that FROM you, me WHERE color LIKE '%ish%'
> AND size LIKE 'Big%'" fails miserably
[...]
> GLib-WARNING **: g_printf_string_upper_bound(): unable to handle `V' while parsing format
> gda-mysql-srv: ../sysdeps/generic/printf_fphex.c:163: __printf_fphex: Assertion `*decimal != '\0' && decimalwc != L'\0'' failed.

	Well, right now I'm at work and have not time to take a look at
	the source code, but it seems that the problem has an easy
	solution :-).

	Problem: The cause is that any how, the query string is passed as a
	format string to g_printf_string_upper_bound(), so it does
	normal parsing of printf formatting sequences and tries to guess
	what is a %V!!!
	
	Solution A: The easy way -> before the call to g_printf...
	escape the '%' characters.

	Solution B: don't pass the query string as a format string to
	g_printf...

	Bye!

	P.S.: this afternoon, if I can, I'll take a look and the code if
	no one else does.




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