Bug #32488 Add "get field by name" function in the client library

Submitted: 19 Nov 2007 6:59 Modified: 25 Nov 2010 10:49
Reporter: Vasil Dimov Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: C API (client library) Severity:S4 (Feature request)
Version: OS:Any
Assigned to: CPU Architecture:Any
Tags: Contribution

[19 Nov 2007 6:59] Vasil Dimov
Description:
Open a bug report in order not to overlook this:

http://lists.mysql.com/internals/34073
http://lists.mysql.com/internals/34151
http://lists.mysql.com/internals/34296

Hi,

I think that it would be useful to have a function (in the C API) which
returns a field's value by its name. Something like this:

char *mysql_get_field_by_name(const char *column_name, auxiliary_params);

So one can write code like this:

--- example code begins here ---
const char	*query = "SELECT c1,c2 FROM t";
MYSQL_ROW	row;
char		*c1;
char		*c2;

while ((row = mysql_fetch_row(res)) != NULL)
{
	c1 = mysql_get_field_by_name("c1");
	c2 = mysql_get_field_by_name("c2");

	/* do something */
}
--- example code ends here ---

...

How to repeat:
N/A

Suggested fix:
Implementation is posted on the internals@ list
http://lists.mysql.com/internals/34296
[20 Nov 2007 14:29] Valeriy Kravchuk
Thank you for a reasonable feature request and code contributed.
[8 Jun 2009 22:51] liz drachnik
Hello Vasil - 

In order for us to continue the process of reviewing your contribution to MySQL - We need you to review and sign the Sun|MySQL contributor agreement (the "SCA")

The process is explained here: 
http://forge.mysql.com/wiki/Sun_Contributor_Agreement

Getting a signed/approved SCA on file will help us facilitate your contribution-- this one, and others in the future.

Thank you ! 

Liz Drachnik  - Program Manager - MySQL
[2 Sep 2009 19:12] Liz Drachnik
I agree, I withdraw the request for an SCA
[15 Sep 2009 15:44] Liz Drachnik
Re-requesting the SCA - please fill out the SCA - I realize Vasil works for Oracle - but we still need the SCA - thanks!
[15 Oct 2009 23:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
[11 Mar 2010 16:35] Vasil Dimov
Reopening now that we are in one company. Hope no SCA is needed anymore!

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.056 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.