Can't compile query_response_time on Windows and Solaris

Bug #737947 reported by Vadim Tkachenko on 2011-03-19
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Percona Server
Laurynas Biveinis
Laurynas Biveinis
Laurynas Biveinis

Bug Description

Query_response_time was made without taking into account compatibility with other platforms.
I have the similar error during compilation on both Solaris and Windows

/home/admin/5.5/Percona-Server/sql/ In function `bool query_response_time::compare_and_swap(volatile uint32*, uint32, uint32)':
/home/admin/5.5/Percona-Server/sql/ error: `__sync_bool_compare_and_swap' undeclared (first use this function)
/home/admin/5.5/Percona-Server/sql/ error: (Each undeclared identifier is reported only once for each function it appears in.)
/home/admin/5.5/Percona-Server/sql/ In member function `void query_response_time::TimeCounter::add(uint64)':
/home/admin/5.5/Percona-Server/sql/ error: `__sync_fetch_and_add' undeclared (first use this function)
/home/admin/5.5/Percona-Server/sql/ In member function `void query_response_time::time_collector::collect(uint64)':
/home/admin/5.5/Percona-Server/sql/ error: `__sync_fetch_and_add' undeclared (first use this function)

Related branches

Stewart Smith (community): Approve on 2011-06-21
Valentine Gostev: Pending (qa) requested 2011-06-21
Percona developers: Pending requested 2011-06-07
Valentine Gostev (community): Needs Fixing (qa) on 2011-06-14
Laurynas Biveinis: Approve (code) on 2011-06-09
Oleg Tsarev (community): Approve on 2011-06-07
Valentine Gostev: Pending (qa) requested 2011-06-07
Stewart Smith (stewart) wrote :

Check out the atomics compat stuff we have in Drizzle, it may be able to be easily brought across for this. (or at least ideas).

I have fixed this for Windows in my in-progress Windows port. Not for Solaris though.

Stewart Smith (stewart) wrote :

okay - please mark in progress and connect to branch that's being worked in.

do check out how we did it in Drizzle - this uses various atomics (including SunStudio ones) and falls back to pthread mutex if no atomics available

Stewart Smith (stewart) wrote :

and what's the status of it?

Oleg Tsarev (tsarev) wrote :

We should port my_atomic from 5.5/mariadb

Stewart Smith (stewart) wrote :

Maybe... but this looks like which is marked as fix committed... so is this actually fixed?

#663757 fix is about FreeBSD only, it still does not work on Solaris and Windows.

Stewart Smith (stewart) wrote :

Moving to Critical as we have Solaris in supported platforms list.

Oleg Tsarev (tsarev) wrote :

We have workaround - --without-response_time_distribution

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers