| 1 | /* |
| 2 | A temporary header to resolve WebScaleSQL vs MariaDB differences |
| 3 | when porting MyRocks to MariaDB. |
| 4 | */ |
| 5 | #ifndef RDB_MARIADB_PORT_H |
| 6 | #define RDB_MARIADB_PORT_H |
| 7 | |
| 8 | #include "my_global.h" /* ulonglong */ |
| 9 | #include "atomic_stat.h" |
| 10 | |
| 11 | // These are for split_into_vector: |
| 12 | #include <vector> |
| 13 | #include <string> |
| 14 | |
| 15 | /* The following is copied from storage/innobase/univ.i: */ |
| 16 | #ifndef MY_ATTRIBUTE |
| 17 | #if defined(__GNUC__) |
| 18 | # define MY_ATTRIBUTE(A) __attribute__(A) |
| 19 | #else |
| 20 | # define MY_ATTRIBUTE(A) |
| 21 | #endif |
| 22 | #endif |
| 23 | |
| 24 | /* Struct used for IO performance counters, shared among multiple threads */ |
| 25 | struct my_io_perf_atomic_struct { |
| 26 | atomic_stat<ulonglong> bytes; |
| 27 | atomic_stat<ulonglong> requests; |
| 28 | atomic_stat<ulonglong> svc_time; /*!< time to do read or write operation */ |
| 29 | atomic_stat<ulonglong> svc_time_max; |
| 30 | atomic_stat<ulonglong> wait_time; /*!< total time in the request array */ |
| 31 | atomic_stat<ulonglong> wait_time_max; |
| 32 | atomic_stat<ulonglong> slow_ios; /*!< requests that take too long */ |
| 33 | }; |
| 34 | typedef struct my_io_perf_atomic_struct my_io_perf_atomic_t; |
| 35 | |
| 36 | //////////////////////////////////////////////////////////////////////////// |
| 37 | |
| 38 | /* |
| 39 | Temporary stand-in for |
| 40 | fae59683dc116be2cc78b0b30d61c84659c33bd3 |
| 41 | Print stack traces before committing suicide |
| 42 | |
| 43 | */ |
| 44 | #define abort_with_stack_traces() { abort(); } |
| 45 | |
| 46 | //////////////////////////////////////////////////////////////////////////// |
| 47 | typedef struct my_io_perf_struct my_io_perf_t; |
| 48 | |
| 49 | std::vector<std::string> split_into_vector(const std::string& input, |
| 50 | char delimiter); |
| 51 | |
| 52 | void |
| 53 | mysql_bin_log_commit_pos(THD *thd, ulonglong *out_pos, const char **out_file); |
| 54 | |
| 55 | #endif |
| 56 | |