@@ -2160,9 +2160,7 @@ int spider_get_sys_tables_connect_info(
2160
2160
) {
2161
2161
char *ptr;
2162
2162
int error_num = 0 ;
2163
- const int link_idx= 0 ;
2164
2163
DBUG_ENTER (" spider_get_sys_tables_connect_info" );
2165
- DBUG_PRINT (" info" ,(" spider link_idx:%d" , link_idx));
2166
2164
if ((ptr = get_field (mem_root, table->field [SPIDER_TABLES_PRIORITY_POS])))
2167
2165
{
2168
2166
share->priority = my_strtoll10 (ptr, (char **) NULL , &error_num);
@@ -2173,245 +2171,245 @@ int spider_get_sys_tables_connect_info(
2173
2171
!table->field [SPIDER_TABLES_SERVER_POS]->is_null () &&
2174
2172
(ptr = get_field (mem_root, table->field [SPIDER_TABLES_SERVER_POS]))
2175
2173
) {
2176
- share->server_names_lengths [link_idx ] = strlen (ptr);
2177
- share->server_names [link_idx ] =
2178
- spider_create_string (ptr, share->server_names_lengths [link_idx ]);
2174
+ share->server_names_lengths [0 ] = strlen (ptr);
2175
+ share->server_names [0 ] =
2176
+ spider_create_string (ptr, share->server_names_lengths [0 ]);
2179
2177
DBUG_PRINT (" info" ,(" spider server_name:%s" ,
2180
- share->server_names [link_idx ]));
2178
+ share->server_names [0 ]));
2181
2179
} else {
2182
- share->server_names_lengths [link_idx ] = 0 ;
2183
- share->server_names [link_idx ] = NULL ;
2180
+ share->server_names_lengths [0 ] = 0 ;
2181
+ share->server_names [0 ] = NULL ;
2184
2182
DBUG_PRINT (" info" ,(" spider server_name is NULL" ));
2185
2183
}
2186
2184
if (
2187
2185
!table->field [SPIDER_TABLES_SCHEME_POS]->is_null () &&
2188
2186
(ptr = get_field (mem_root, table->field [SPIDER_TABLES_SCHEME_POS]))
2189
2187
) {
2190
- share->tgt_wrappers_lengths [link_idx ] = strlen (ptr);
2191
- share->tgt_wrappers [link_idx ] =
2192
- spider_create_string (ptr, share->tgt_wrappers_lengths [link_idx ]);
2188
+ share->tgt_wrappers_lengths [0 ] = strlen (ptr);
2189
+ share->tgt_wrappers [0 ] =
2190
+ spider_create_string (ptr, share->tgt_wrappers_lengths [0 ]);
2193
2191
DBUG_PRINT (" info" ,(" spider tgt_wrapper:%s" ,
2194
- share->tgt_wrappers [link_idx ]));
2192
+ share->tgt_wrappers [0 ]));
2195
2193
} else {
2196
- share->tgt_wrappers_lengths [link_idx ] = 0 ;
2197
- share->tgt_wrappers [link_idx ] = NULL ;
2194
+ share->tgt_wrappers_lengths [0 ] = 0 ;
2195
+ share->tgt_wrappers [0 ] = NULL ;
2198
2196
DBUG_PRINT (" info" ,(" spider tgt_wrapper is NULL" ));
2199
2197
}
2200
2198
if (
2201
2199
!table->field [SPIDER_TABLES_HOST_POS]->is_null () &&
2202
2200
(ptr = get_field (mem_root, table->field [SPIDER_TABLES_HOST_POS]))
2203
2201
) {
2204
- share->tgt_hosts_lengths [link_idx ] = strlen (ptr);
2205
- share->tgt_hosts [link_idx ] =
2206
- spider_create_string (ptr, share->tgt_hosts_lengths [link_idx ]);
2202
+ share->tgt_hosts_lengths [0 ] = strlen (ptr);
2203
+ share->tgt_hosts [0 ] =
2204
+ spider_create_string (ptr, share->tgt_hosts_lengths [0 ]);
2207
2205
DBUG_PRINT (" info" ,(" spider tgt_host:%s" ,
2208
- share->tgt_hosts [link_idx ]));
2206
+ share->tgt_hosts [0 ]));
2209
2207
} else {
2210
- share->tgt_hosts_lengths [link_idx ] = 0 ;
2211
- share->tgt_hosts [link_idx ] = NULL ;
2208
+ share->tgt_hosts_lengths [0 ] = 0 ;
2209
+ share->tgt_hosts [0 ] = NULL ;
2212
2210
DBUG_PRINT (" info" ,(" spider tgt_host is NULL" ));
2213
2211
}
2214
2212
if (
2215
2213
!table->field [SPIDER_TABLES_PORT_POS]->is_null () &&
2216
2214
(ptr = get_field (mem_root, table->field [SPIDER_TABLES_PORT_POS]))
2217
2215
) {
2218
- share->tgt_ports [link_idx ] = atol (ptr);
2216
+ share->tgt_ports [0 ] = atol (ptr);
2219
2217
} else {
2220
- share->tgt_ports [link_idx ] = -1 ;
2218
+ share->tgt_ports [0 ] = -1 ;
2221
2219
}
2222
- DBUG_PRINT (" info" ,(" spider port:%ld" , share->tgt_ports [link_idx ]));
2220
+ DBUG_PRINT (" info" ,(" spider port:%ld" , share->tgt_ports [0 ]));
2223
2221
if (
2224
2222
!table->field [SPIDER_TABLES_SOCKET_POS]->is_null () &&
2225
2223
(ptr = get_field (mem_root, table->field [SPIDER_TABLES_SOCKET_POS]))
2226
2224
) {
2227
- share->tgt_sockets_lengths [link_idx ] = strlen (ptr);
2228
- share->tgt_sockets [link_idx ] =
2229
- spider_create_string (ptr, share->tgt_sockets_lengths [link_idx ]);
2225
+ share->tgt_sockets_lengths [0 ] = strlen (ptr);
2226
+ share->tgt_sockets [0 ] =
2227
+ spider_create_string (ptr, share->tgt_sockets_lengths [0 ]);
2230
2228
} else {
2231
- share->tgt_sockets_lengths [link_idx ] = 0 ;
2232
- share->tgt_sockets [link_idx ] = NULL ;
2229
+ share->tgt_sockets_lengths [0 ] = 0 ;
2230
+ share->tgt_sockets [0 ] = NULL ;
2233
2231
}
2234
2232
if (
2235
2233
!table->field [SPIDER_TABLES_USERNAME_POS]->is_null () &&
2236
2234
(ptr = get_field (mem_root, table->field [SPIDER_TABLES_USERNAME_POS]))
2237
2235
) {
2238
- share->tgt_usernames_lengths [link_idx ] = strlen (ptr);
2239
- share->tgt_usernames [link_idx ] =
2240
- spider_create_string (ptr, share->tgt_usernames_lengths [link_idx ]);
2236
+ share->tgt_usernames_lengths [0 ] = strlen (ptr);
2237
+ share->tgt_usernames [0 ] =
2238
+ spider_create_string (ptr, share->tgt_usernames_lengths [0 ]);
2241
2239
} else {
2242
- share->tgt_usernames_lengths [link_idx ] = 0 ;
2243
- share->tgt_usernames [link_idx ] = NULL ;
2240
+ share->tgt_usernames_lengths [0 ] = 0 ;
2241
+ share->tgt_usernames [0 ] = NULL ;
2244
2242
}
2245
2243
if (
2246
2244
!table->field [SPIDER_TABLES_PASSWORD_POS]->is_null () &&
2247
2245
(ptr = get_field (mem_root, table->field [SPIDER_TABLES_PASSWORD_POS]))
2248
2246
) {
2249
- share->tgt_passwords_lengths [link_idx ] = strlen (ptr);
2250
- share->tgt_passwords [link_idx ] =
2251
- spider_create_string (ptr, share->tgt_passwords_lengths [link_idx ]);
2247
+ share->tgt_passwords_lengths [0 ] = strlen (ptr);
2248
+ share->tgt_passwords [0 ] =
2249
+ spider_create_string (ptr, share->tgt_passwords_lengths [0 ]);
2252
2250
} else {
2253
- share->tgt_passwords_lengths [link_idx ] = 0 ;
2254
- share->tgt_passwords [link_idx ] = NULL ;
2251
+ share->tgt_passwords_lengths [0 ] = 0 ;
2252
+ share->tgt_passwords [0 ] = NULL ;
2255
2253
}
2256
2254
if (
2257
2255
!table->field [SPIDER_TABLES_SSL_CA_POS]->is_null () &&
2258
2256
(ptr = get_field (mem_root, table->field [SPIDER_TABLES_SSL_CA_POS]))
2259
2257
) {
2260
- share->tgt_ssl_cas_lengths [link_idx ] = strlen (ptr);
2261
- share->tgt_ssl_cas [link_idx ] =
2262
- spider_create_string (ptr, share->tgt_ssl_cas_lengths [link_idx ]);
2258
+ share->tgt_ssl_cas_lengths [0 ] = strlen (ptr);
2259
+ share->tgt_ssl_cas [0 ] =
2260
+ spider_create_string (ptr, share->tgt_ssl_cas_lengths [0 ]);
2263
2261
} else {
2264
- share->tgt_ssl_cas_lengths [link_idx ] = 0 ;
2265
- share->tgt_ssl_cas [link_idx ] = NULL ;
2262
+ share->tgt_ssl_cas_lengths [0 ] = 0 ;
2263
+ share->tgt_ssl_cas [0 ] = NULL ;
2266
2264
}
2267
2265
if (
2268
2266
!table->field [SPIDER_TABLES_SSL_CAPATH_POS]->is_null () &&
2269
2267
(ptr = get_field (mem_root, table->field [SPIDER_TABLES_SSL_CAPATH_POS]))
2270
2268
) {
2271
- share->tgt_ssl_capaths_lengths [link_idx ] = strlen (ptr);
2272
- share->tgt_ssl_capaths [link_idx ] =
2273
- spider_create_string (ptr, share->tgt_ssl_capaths_lengths [link_idx ]);
2269
+ share->tgt_ssl_capaths_lengths [0 ] = strlen (ptr);
2270
+ share->tgt_ssl_capaths [0 ] =
2271
+ spider_create_string (ptr, share->tgt_ssl_capaths_lengths [0 ]);
2274
2272
} else {
2275
- share->tgt_ssl_capaths_lengths [link_idx ] = 0 ;
2276
- share->tgt_ssl_capaths [link_idx ] = NULL ;
2273
+ share->tgt_ssl_capaths_lengths [0 ] = 0 ;
2274
+ share->tgt_ssl_capaths [0 ] = NULL ;
2277
2275
}
2278
2276
if (
2279
2277
!table->field [SPIDER_TABLES_SSL_CERT_POS]->is_null () &&
2280
2278
(ptr = get_field (mem_root, table->field [SPIDER_TABLES_SSL_CERT_POS]))
2281
2279
) {
2282
- share->tgt_ssl_certs_lengths [link_idx ] = strlen (ptr);
2283
- share->tgt_ssl_certs [link_idx ] =
2284
- spider_create_string (ptr, share->tgt_ssl_certs_lengths [link_idx ]);
2280
+ share->tgt_ssl_certs_lengths [0 ] = strlen (ptr);
2281
+ share->tgt_ssl_certs [0 ] =
2282
+ spider_create_string (ptr, share->tgt_ssl_certs_lengths [0 ]);
2285
2283
} else {
2286
- share->tgt_ssl_certs_lengths [link_idx ] = 0 ;
2287
- share->tgt_ssl_certs [link_idx ] = NULL ;
2284
+ share->tgt_ssl_certs_lengths [0 ] = 0 ;
2285
+ share->tgt_ssl_certs [0 ] = NULL ;
2288
2286
}
2289
2287
if (
2290
2288
!table->field [SPIDER_TABLES_SSL_CIPHER_POS]->is_null () &&
2291
2289
(ptr = get_field (mem_root, table->field [SPIDER_TABLES_SSL_CIPHER_POS]))
2292
2290
) {
2293
- share->tgt_ssl_ciphers_lengths [link_idx ] = strlen (ptr);
2294
- share->tgt_ssl_ciphers [link_idx ] =
2295
- spider_create_string (ptr, share->tgt_ssl_ciphers_lengths [link_idx ]);
2291
+ share->tgt_ssl_ciphers_lengths [0 ] = strlen (ptr);
2292
+ share->tgt_ssl_ciphers [0 ] =
2293
+ spider_create_string (ptr, share->tgt_ssl_ciphers_lengths [0 ]);
2296
2294
} else {
2297
- share->tgt_ssl_ciphers_lengths [link_idx ] = 0 ;
2298
- share->tgt_ssl_ciphers [link_idx ] = NULL ;
2295
+ share->tgt_ssl_ciphers_lengths [0 ] = 0 ;
2296
+ share->tgt_ssl_ciphers [0 ] = NULL ;
2299
2297
}
2300
2298
if (
2301
2299
!table->field [SPIDER_TABLES_SSL_KEY_POS]->is_null () &&
2302
2300
(ptr = get_field (mem_root, table->field [SPIDER_TABLES_SSL_KEY_POS]))
2303
2301
) {
2304
- share->tgt_ssl_keys_lengths [link_idx ] = strlen (ptr);
2305
- share->tgt_ssl_keys [link_idx ] =
2306
- spider_create_string (ptr, share->tgt_ssl_keys_lengths [link_idx ]);
2302
+ share->tgt_ssl_keys_lengths [0 ] = strlen (ptr);
2303
+ share->tgt_ssl_keys [0 ] =
2304
+ spider_create_string (ptr, share->tgt_ssl_keys_lengths [0 ]);
2307
2305
} else {
2308
- share->tgt_ssl_keys_lengths [link_idx ] = 0 ;
2309
- share->tgt_ssl_keys [link_idx ] = NULL ;
2306
+ share->tgt_ssl_keys_lengths [0 ] = 0 ;
2307
+ share->tgt_ssl_keys [0 ] = NULL ;
2310
2308
}
2311
2309
if (
2312
2310
!table->field [SPIDER_TABLES_SSL_VERIFY_SERVER_CERT_POS]->is_null () &&
2313
2311
(ptr = get_field (mem_root,
2314
2312
table->field [SPIDER_TABLES_SSL_VERIFY_SERVER_CERT_POS]))
2315
2313
) {
2316
- share->tgt_ssl_vscs [link_idx ] = atol (ptr);
2314
+ share->tgt_ssl_vscs [0 ] = atol (ptr);
2317
2315
} else
2318
- share->tgt_ssl_vscs [link_idx ] = -1 ;
2316
+ share->tgt_ssl_vscs [0 ] = -1 ;
2319
2317
if (
2320
2318
!table->field [SPIDER_TABLES_MONITORING_BINLOG_POS_AT_FAILING_POS]->
2321
2319
is_null () &&
2322
2320
(ptr = get_field (mem_root, table->
2323
2321
field[SPIDER_TABLES_MONITORING_BINLOG_POS_AT_FAILING_POS]))
2324
2322
) {
2325
- share->monitoring_binlog_pos_at_failing [link_idx ] = atol (ptr);
2323
+ share->monitoring_binlog_pos_at_failing [0 ] = atol (ptr);
2326
2324
} else
2327
- share->monitoring_binlog_pos_at_failing [link_idx ] = 0 ;
2325
+ share->monitoring_binlog_pos_at_failing [0 ] = 0 ;
2328
2326
if (
2329
2327
!table->field [SPIDER_TABLES_DEFAULT_FILE_POS]->is_null () &&
2330
2328
(ptr = get_field (mem_root, table->field [SPIDER_TABLES_DEFAULT_FILE_POS]))
2331
2329
) {
2332
- share->tgt_default_files_lengths [link_idx ] = strlen (ptr);
2333
- share->tgt_default_files [link_idx ] =
2334
- spider_create_string (ptr, share->tgt_default_files_lengths [link_idx ]);
2330
+ share->tgt_default_files_lengths [0 ] = strlen (ptr);
2331
+ share->tgt_default_files [0 ] =
2332
+ spider_create_string (ptr, share->tgt_default_files_lengths [0 ]);
2335
2333
} else {
2336
- share->tgt_default_files_lengths [link_idx ] = 0 ;
2337
- share->tgt_default_files [link_idx ] = NULL ;
2334
+ share->tgt_default_files_lengths [0 ] = 0 ;
2335
+ share->tgt_default_files [0 ] = NULL ;
2338
2336
}
2339
2337
if (
2340
2338
!table->field [SPIDER_TABLES_DEFAULT_GROUP_POS]->is_null () &&
2341
2339
(ptr = get_field (mem_root, table->field [SPIDER_TABLES_DEFAULT_GROUP_POS]))
2342
2340
) {
2343
- share->tgt_default_groups_lengths [link_idx ] = strlen (ptr);
2344
- share->tgt_default_groups [link_idx ] =
2345
- spider_create_string (ptr, share->tgt_default_groups_lengths [link_idx ]);
2341
+ share->tgt_default_groups_lengths [0 ] = strlen (ptr);
2342
+ share->tgt_default_groups [0 ] =
2343
+ spider_create_string (ptr, share->tgt_default_groups_lengths [0 ]);
2346
2344
} else {
2347
- share->tgt_default_groups_lengths [link_idx ] = 0 ;
2348
- share->tgt_default_groups [link_idx ] = NULL ;
2345
+ share->tgt_default_groups_lengths [0 ] = 0 ;
2346
+ share->tgt_default_groups [0 ] = NULL ;
2349
2347
}
2350
2348
if (
2351
2349
!table->field [SPIDER_TABLES_DSN_POS]->is_null () &&
2352
2350
(ptr = get_field (mem_root, table->field [SPIDER_TABLES_DSN_POS]))
2353
2351
) {
2354
- share->tgt_dsns_lengths [link_idx ] = strlen (ptr);
2355
- share->tgt_dsns [link_idx ] =
2356
- spider_create_string (ptr, share->tgt_dsns_lengths [link_idx ]);
2352
+ share->tgt_dsns_lengths [0 ] = strlen (ptr);
2353
+ share->tgt_dsns [0 ] =
2354
+ spider_create_string (ptr, share->tgt_dsns_lengths [0 ]);
2357
2355
} else {
2358
- share->tgt_dsns_lengths [link_idx ] = 0 ;
2359
- share->tgt_dsns [link_idx ] = NULL ;
2356
+ share->tgt_dsns_lengths [0 ] = 0 ;
2357
+ share->tgt_dsns [0 ] = NULL ;
2360
2358
}
2361
2359
if (
2362
2360
!table->field [SPIDER_TABLES_FILEDSN_POS]->is_null () &&
2363
2361
(ptr = get_field (mem_root, table->field [SPIDER_TABLES_FILEDSN_POS]))
2364
2362
) {
2365
- share->tgt_filedsns_lengths [link_idx ] = strlen (ptr);
2366
- share->tgt_filedsns [link_idx ] =
2367
- spider_create_string (ptr, share->tgt_filedsns_lengths [link_idx ]);
2363
+ share->tgt_filedsns_lengths [0 ] = strlen (ptr);
2364
+ share->tgt_filedsns [0 ] =
2365
+ spider_create_string (ptr, share->tgt_filedsns_lengths [0 ]);
2368
2366
} else {
2369
- share->tgt_filedsns_lengths [link_idx ] = 0 ;
2370
- share->tgt_filedsns [link_idx ] = NULL ;
2367
+ share->tgt_filedsns_lengths [0 ] = 0 ;
2368
+ share->tgt_filedsns [0 ] = NULL ;
2371
2369
}
2372
2370
if (
2373
2371
!table->field [SPIDER_TABLES_DRIVER_POS]->is_null () &&
2374
2372
(ptr = get_field (mem_root, table->field [SPIDER_TABLES_DRIVER_POS]))
2375
2373
) {
2376
- share->tgt_drivers_lengths [link_idx ] = strlen (ptr);
2377
- share->tgt_drivers [link_idx ] =
2378
- spider_create_string (ptr, share->tgt_drivers_lengths [link_idx ]);
2374
+ share->tgt_drivers_lengths [0 ] = strlen (ptr);
2375
+ share->tgt_drivers [0 ] =
2376
+ spider_create_string (ptr, share->tgt_drivers_lengths [0 ]);
2379
2377
} else {
2380
- share->tgt_drivers_lengths [link_idx ] = 0 ;
2381
- share->tgt_drivers [link_idx ] = NULL ;
2378
+ share->tgt_drivers_lengths [0 ] = 0 ;
2379
+ share->tgt_drivers [0 ] = NULL ;
2382
2380
}
2383
2381
if (
2384
2382
!table->field [SPIDER_TABLES_TGT_DB_NAME_POS]->is_null () &&
2385
2383
(ptr = get_field (mem_root, table->field [SPIDER_TABLES_TGT_DB_NAME_POS]))
2386
2384
) {
2387
- share->tgt_dbs_lengths [link_idx ] = strlen (ptr);
2388
- share->tgt_dbs [link_idx ] =
2389
- spider_create_string (ptr, share->tgt_dbs_lengths [link_idx ]);
2385
+ share->tgt_dbs_lengths [0 ] = strlen (ptr);
2386
+ share->tgt_dbs [0 ] =
2387
+ spider_create_string (ptr, share->tgt_dbs_lengths [0 ]);
2390
2388
} else {
2391
- share->tgt_dbs_lengths [link_idx ] = 0 ;
2392
- share->tgt_dbs [link_idx ] = NULL ;
2389
+ share->tgt_dbs_lengths [0 ] = 0 ;
2390
+ share->tgt_dbs [0 ] = NULL ;
2393
2391
}
2394
2392
if (
2395
2393
!table->field [SPIDER_TABLES_TGT_TABLE_NAME_POS]->is_null () &&
2396
2394
(ptr = get_field (mem_root, table->field [SPIDER_TABLES_TGT_TABLE_NAME_POS]))
2397
2395
) {
2398
- share->tgt_table_names_lengths [link_idx ] = strlen (ptr);
2399
- share->tgt_table_names [link_idx ] =
2400
- spider_create_string (ptr, share->tgt_table_names_lengths [link_idx ]);
2396
+ share->tgt_table_names_lengths [0 ] = strlen (ptr);
2397
+ share->tgt_table_names [0 ] =
2398
+ spider_create_string (ptr, share->tgt_table_names_lengths [0 ]);
2401
2399
} else {
2402
- share->tgt_table_names_lengths [link_idx ] = 0 ;
2403
- share->tgt_table_names [link_idx ] = NULL ;
2400
+ share->tgt_table_names_lengths [0 ] = 0 ;
2401
+ share->tgt_table_names [0 ] = NULL ;
2404
2402
}
2405
2403
if (
2406
2404
!table->field [SPIDER_TABLES_STATIC_LINK_ID_POS]->is_null () &&
2407
2405
(ptr = get_field (mem_root, table->field [SPIDER_TABLES_STATIC_LINK_ID_POS]))
2408
2406
) {
2409
- share->static_link_ids_lengths [link_idx ] = strlen (ptr);
2410
- share->static_link_ids [link_idx ] =
2411
- spider_create_string (ptr, share->static_link_ids_lengths [link_idx ]);
2407
+ share->static_link_ids_lengths [0 ] = strlen (ptr);
2408
+ share->static_link_ids [0 ] =
2409
+ spider_create_string (ptr, share->static_link_ids_lengths [0 ]);
2412
2410
} else {
2413
- share->static_link_ids_lengths [link_idx ] = 0 ;
2414
- share->static_link_ids [link_idx ] = NULL ;
2411
+ share->static_link_ids_lengths [0 ] = 0 ;
2412
+ share->static_link_ids [0 ] = NULL ;
2415
2413
}
2416
2414
DBUG_RETURN (error_num);
2417
2415
}
0 commit comments