Hi!
>>>>> "Sergei" == Sergei Golubchik <serg@stripped> writes:
Sergei> Hi, Marc!
Sergei> On Mar 19, Marc Alff wrote:
>>
>> Replying in English for the other readers
>>
>> The problem:
>>
>> In include/mysql/psi.h today, the proposed change is to use macros like
>>
>> #ifdef HAVE_PERFORMANCE_SCHEMA
>> #define MYSQL_FILE_PREAD <one way>
>> #else
>> #define MYSQL_FILE_PREAD <another way>
>> #endif
>>
>> (Let's call this solution [1])
>>
>> and change the code from
>>
>> my_pread(...)
>>
>> to
>>
>> MYSQL_FILE_PREAD(...)
Sergei> One comment about the style.
Sergei> I'd prefer the instrumentation to mostly as transparent as possible to
Sergei> the most of the code. And using UPPERCASE for commonly used functions
Sergei> (or macros pretending to be functions) is very annoying.
Sergei> Could this be mysql_file_pread() ? Pretty please ?
That would require us to change all code to use my_file_pread(),
which is a big change and hard to remember.
In this case it would be easier to just just change the mysys
functions to be called my_internal_pread() and have macro that modifies
how my_pread() is interpreted. This way you have to do very little
changes in the main code.
It should also be possible to have any external function that is
calling my_internal_pread() to work independently how MySQL is
compiled.
With a little bit of work in this direction, you can achieve that an
external module compiled WITHOUT instrumentation would work with a
MySQL server compiled with or without instrumentation.
Regards,
Monty