| 1 |
# |
| 2 |
# get_ndb_connection_id.inc - get API node id used by this session |
| 3 |
# |
| 4 |
# Usage |
| 5 |
# --source suite/ndb/include/get_ndb_connection_id.inc |
| 6 |
# |
| 7 |
# $ndb_connection_id will be set to node id of current |
| 8 |
# session's API connection |
| 9 |
|
| 10 |
--disable_query_log |
| 11 |
--disable_result_log |
| 12 |
create table get_ndb_connection_id(a int primary key) engine=ndb; |
| 13 |
begin; |
| 14 |
insert into get_ndb_connection_id values (1); |
| 15 |
|
| 16 |
let $ndb_connection_id = query_get_value(select client_node_id from ndbinfo.cluster_operations where tableid = (select id from ndbinfo.dict_obj_info where fq_name like '%get_ndb_connection_id%') limit 1, client_node_id, 1); |
| 17 |
rollback; |
| 18 |
drop table get_ndb_connection_id; |
| 19 |
--enable_result_log |
| 20 |
--enable_query_log |