2861 Marc Alff 2009-04-10
Bug#44190 Performance schema: nanosecond and ticks timers not implemented on windows
Test cleanup
modified:
mysql-test/suite/perfschema/r/schema.result
unittest/mysys/my_rdtsc-t.c
2860 Marc Alff 2009-04-10
Bug#44190 Performance schema: nanosecond and ticks timers not implemented on windows
Some timers may not be implemented on all platforms, and this is an expected
edge condition that is not properly handled.
Fixed the code for non implemented timers to:
- be robust, in the timer to picosecond conversion
- display NULL in PERFORMANCE_TIMERS
Fixed the unit test my_rdtsc-t to handle non implemented timers.
modified:
scripts/mysql_system_tables.sql
storage/perfschema/pfs_timer.cc
storage/perfschema/table_performance_timers.cc
storage/perfschema/table_performance_timers.h
unittest/mysys/my_rdtsc-t.c
=== modified file 'mysql-test/suite/perfschema/r/schema.result'
--- a/mysql-test/suite/perfschema/r/schema.result 2009-04-07 19:52:12 +0000
+++ b/mysql-test/suite/perfschema/r/schema.result 2009-04-10 21:54:51 +0000
@@ -161,9 +161,9 @@ show create table PERFORMANCE_TIMERS;
Table Create Table
PERFORMANCE_TIMERS CREATE TABLE `PERFORMANCE_TIMERS` (
`TIMER_NAME` enum('CYCLE','NANOSECOND','MICROSECOND','MILLISECOND','TICK') NOT NULL,
- `TIMER_FREQUENCY` bigint(20) NOT NULL,
- `TIMER_RESOLUTION` bigint(20) NOT NULL,
- `TIMER_OVERHEAD` bigint(20) NOT NULL
+ `TIMER_FREQUENCY` bigint(20) DEFAULT NULL,
+ `TIMER_RESOLUTION` bigint(20) DEFAULT NULL,
+ `TIMER_OVERHEAD` bigint(20) DEFAULT NULL
) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
show create table PROCESSLIST;
Table Create Table
=== modified file 'unittest/mysys/my_rdtsc-t.c'
--- a/unittest/mysys/my_rdtsc-t.c 2009-04-10 18:56:32 +0000
+++ b/unittest/mysys/my_rdtsc-t.c 2009-04-10 21:54:51 +0000
@@ -105,7 +105,7 @@ void test_cycle()
if (myt.cycles_routine != 0)
ok((nonzero != 0), "The cycle timer is implemented");
else
- ok((nonzero == LOOP_COUNT), "The cycle timer is not implemented and returns 0");
+ ok((nonzero == 0), "The cycle timer is not implemented and returns 0");
}
void test_nanosecond()
@@ -131,7 +131,7 @@ void test_nanosecond()
if (myt.nanoseconds_routine != 0)
ok((nonzero != 0), "The nanosecond timer is implemented");
else
- ok((nonzero == LOOP_COUNT), "The nanosecond timer is not implemented and returns 0");
+ ok((nonzero == 0), "The nanosecond timer is not implemented and returns 0");
}
void test_microsecond()
@@ -157,7 +157,7 @@ void test_microsecond()
if (myt.microseconds_routine != 0)
ok((nonzero != 0), "The microsecond timer is implemented");
else
- ok((nonzero == LOOP_COUNT), "The microsecond timer is not implemented and returns 0");
+ ok((nonzero == 0), "The microsecond timer is not implemented and returns 0");
}
void test_millisecond()
@@ -183,7 +183,7 @@ void test_millisecond()
if (myt.milliseconds_routine != 0)
ok((nonzero != 0), "The millisecond timer is implemented");
else
- ok((nonzero == LOOP_COUNT), "The millisecond timer is not implemented and returns 0");
+ ok((nonzero == 0), "The millisecond timer is not implemented and returns 0");
}
void test_tick()
@@ -209,7 +209,7 @@ void test_tick()
if (myt.ticks_routine != 0)
ok((nonzero != 0), "The tick timer is implemented");
else
- ok((nonzero == LOOP_COUNT), "The tick timer is not implemented and returns 0");
+ ok((nonzero == 0), "The tick timer is not implemented and returns 0");
}
int main(int argc __attribute__((unused)),
| Thread |
|---|
| • bzr push into mysql-6.0-perf branch (marc.alff:2860 to 2861) Bug#44190 | Marc Alff | 10 Apr |