| 71 | } thr_info_t; |
| 72 | |
| 73 | void create_tbls(int N) |
| 74 | { |
| 75 | cdb2_hndl_tp *h; |
| 76 | int rc = cdb2_open(&h, dbname, "default", 0); |
| 77 | if (rc != 0) |
| 78 | rc = cdb2_open(&h, dbname, "local", 0); |
| 79 | if (rc != 0) { |
| 80 | fprintf(stderr, "Error: cdb2_open failed: %d\n", rc); |
| 81 | exit(1); |
| 82 | } |
| 83 | cdb2_set_max_retries(999999); |
| 84 | |
| 85 | for(int i = 0 ; i < N; i++) { |
| 86 | usleep(500); |
| 87 | { |
| 88 | std::ostringstream ss; |
| 89 | ss << "drop table if exists tt" << i; |
| 90 | std::string s = ss.str(); |
| 91 | runsql(h, s); |
| 92 | } |
| 93 | usleep(500); |
| 94 | { |
| 95 | std::ostringstream ss; |
| 96 | ss << "create table tt" << i << "(i int )"; |
| 97 | std::string s = ss.str(); |
| 98 | runsql(h, s); |
| 99 | } |
| 100 | } |
| 101 | cdb2_close(h); |
| 102 | } |
| 103 | |
| 104 | void *thr(void *arg) |
| 105 | { |
nothing calls this directly
no test coverage detected