Change query to use COUNT(*)

No point implying we're fetching the entire record
This commit is contained in:
Ian Barwick
2015-01-12 12:24:27 +09:00
parent 5fb84b9627
commit a5ead16d6f
2 changed files with 8 additions and 3 deletions

View File

@@ -1275,14 +1275,13 @@ check_node_configuration(void)
char sqlquery[QUERY_STR_LEN];
/*
* Check if we have my node information in repl_nodes
* Check if this node has an entry in `repl_nodes`
*/
log_info(_("%s Checking node %d in cluster '%s'\n"),
progname, local_options.node, local_options.cluster_name);
// ZZZ change to COUNT(*) ???
sqlquery_snprintf(sqlquery,
"SELECT * "
"SELECT COUNT(*) "
" FROM %s.repl_nodes "
" WHERE id = %d "
" AND cluster = '%s' ",