Can't compile query_response_time on Windows and Solaris

Bug #737947 reported by Vadim Tkachenko
30
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Percona Server moved to https://jira.percona.com/projects/PS
Fix Released
Critical
Laurynas Biveinis
5.1
Fix Released
Critical
Laurynas Biveinis
5.5
Fix Released
Critical
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/query_response_time.cc: In function `bool query_response_time::compare_and_swap(volatile uint32*, uint32, uint32)':
/home/admin/5.5/Percona-Server/sql/query_response_time.cc:183: error: `__sync_bool_compare_and_swap' undeclared (first use this function)
/home/admin/5.5/Percona-Server/sql/query_response_time.cc:183: error: (Each undeclared identifier is reported only once for each function it appears in.)
/home/admin/5.5/Percona-Server/sql/query_response_time.cc: In member function `void query_response_time::TimeCounter::add(uint64)':
/home/admin/5.5/Percona-Server/sql/query_response_time.cc:223: error: `__sync_fetch_and_add' undeclared (first use this function)
/home/admin/5.5/Percona-Server/sql/query_response_time.cc: In member function `void query_response_time::time_collector::collect(uint64)':
/home/admin/5.5/Percona-Server/sql/query_response_time.cc:264: error: `__sync_fetch_and_add' undeclared (first use this function)

Related branches

Revision history for this message
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).

Revision history for this message
Laurynas Biveinis (laurynas-biveinis) wrote :

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

Revision history for this message
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

Revision history for this message
Stewart Smith (stewart) wrote :
Revision history for this message
Stewart Smith (stewart) wrote :

and what's the status of it?

Revision history for this message
Oleg Tsarev (tsarev) wrote :

We should port my_atomic from 5.5/mariadb

Revision history for this message
Stewart Smith (stewart) wrote :

Maybe... but this looks like https://bugs.launchpad.net/percona-server/+bug/663757 which is marked as fix committed... so is this actually fixed?

Revision history for this message
Laurynas Biveinis (laurynas-biveinis) wrote :

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

Revision history for this message
Stewart Smith (stewart) wrote :

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

Revision history for this message
Oleg Tsarev (tsarev) wrote :

We have workaround - --without-response_time_distribution

Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PS-330

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

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.