← Back to team overview

maria-developers team mailing list archive

Re: MariaDB C-API and specific P_S tables

 

BTW: the two tables do not exist in P_S in MariaDB 10.0.8

-- Peter


On Mon, Feb 24, 2014 at 4:02 PM, Peter Laursen <peter_laursen@xxxxxxxxxx>wrote:

>
> THis is probably a question that Gerog Richter (or possibly Wlad) could
> reply to.
>
> I came across this bug report:
> http://bugs.mysql.com/bug.php?id=71801
> .. files by former MySQL/Sun/Oracle supporter Veleriuy Kravtchuk
>
> We have a 64 bit C-application compiled with MariaDB C-API (on and for
> Windows 64 bit). I connect to MySQL 5.6.15 and execute
>
> SELECT * FROM `session_connect_attrs`;
>
> /*
> PROCESSLIST_ID ATTR_NAME ATTR_VALUE ORDINAL_POSITION
> -------------- --------------- ---------- ------------------
> 2 _os Windows 0
> 2 _client_name libmariadb 1
> 2 _pid 5012 2
> 2 _thread 4640 3
> 2 _platform x86 4
> 2 _client_version 1.1.2 5
> */
>
> With the MySQL CLI 5.6.15, you will get
>
> /*
> PROCESSLIST_ID ATTR_NAME ATTR_VALUE ORDINAL_POSITION
> -------------- --------------- ---------- ------------------
> 4 _os Win64 0
> 4 _client_name libmysql 1
> 4 _pid 4888 2
> 4 _thread 4320 3
> 4 _platform x86_64 4
> 4 program_name mysql 5
> 4 _client_version 5.6.15 6
> */
>
> The differences I notice are
>
> * Our application populates P_S with "Windows" - not "Win64" as the 5.6.15
> CLI
> * Our application populates 'P_S with "x86" and not "x86_64".
> * Our application does not populate P_S with a "program_name". But it has
> a name of course!
>
> MySQL 5.6 docs at
> http://dev.mysql.com/doc/refman/5.6/en/performance-schema-connection-attribute-tables.htmllists (as far as I can understand)  that the client should use
> mysql_options() and mysql_options4() C API functions to populate P_S with
> all information.
>
>
> I have two questions:
>
> 1)
> Will the first 2 differences listed require a patch in our code or in
> libmariadb?
>
> 2)
> Obviosuly the lacking program name in the P_S tables is something that we
> will neeed to take care of ourselves. However I think that mysql_options4()
> was added in MySQL 5.6 and the MariaDB API does not supprot it currently
> (it is targeted to be compatible with Oracle 5.5 API, I think). And to
> populate the program name we may need to use  mysql_options4(). Am I right?
>
>
>

Follow ups

References