Skip to content

Commit 42fdbf2

Browse files
committed
tid
Signed-off-by: mohitkhullar <mkhullar1@bloomberg.net>
1 parent 1cdf811 commit 42fdbf2

File tree

4 files changed

+19
-3
lines changed

4 files changed

+19
-3
lines changed

db/comdb2.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ int gbl_uses_password;
236236
int gbl_unauth_tag_access = 0;
237237
int64_t gbl_num_auth_allowed = 0;
238238
int64_t gbl_num_auth_denied = 0;
239-
int gbl_allow_old_authn = 0;
239+
int gbl_allow_old_authn = 1;
240240
int gbl_uses_externalauth = 0;
241241
int gbl_uses_externalauth_connect = 0;
242242
int gbl_externalauth_warn = 0;

db/db_tunables.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2384,7 +2384,7 @@ REGISTER_TUNABLE("merge_table_enabled",
23842384
NULL, NULL);
23852385

23862386
REGISTER_TUNABLE("allow_old_authn", "Reuse old successful authentication for the connection",
2387-
TUNABLE_BOOLEAN, &gbl_uses_externalauth, NOARG | READEARLY,
2387+
TUNABLE_BOOLEAN, &gbl_allow_old_authn, NOARG | READEARLY,
23882388
NULL, NULL, NULL, NULL);
23892389

23902390
REGISTER_TUNABLE("externalauth", NULL, TUNABLE_BOOLEAN, &gbl_uses_externalauth, NOARG | READEARLY,

db/sqlinterfaces.c

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5289,6 +5289,22 @@ void cleanup_clnt(struct sqlclntstate *clnt)
52895289
int gbl_unexpected_last_type_warn = 1;
52905290
int gbl_unexpected_last_type_abort = 0;
52915291

5292+
/* Not final */
5293+
int cdb2_get_tid() {
5294+
struct sql_thread *thd = pthread_getspecific(query_info_key);
5295+
if (thd == NULL)
5296+
return 0;
5297+
5298+
struct sqlclntstate *clnt = thd->clnt;
5299+
if (clnt == NULL)
5300+
return 0;
5301+
5302+
if (clnt->dbtran.cursor_tran)
5303+
return clnt->dbtran.cursor_tran->id;
5304+
5305+
return 0;
5306+
}
5307+
52925308
void reset_clnt(struct sqlclntstate *clnt, int initial)
52935309
{
52945310
if (initial) {

tests/tunables.test/t00_all_tunables.expected

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
(name='allow_mismatched_tag_size', description='Allow variants in padding in static tag struct sizes', type='BOOLEAN', value='OFF', read_only='N')
3131
(name='allow_negative_column_size', description='Allow negative column size in csc2 schema. Added mostly for backwards compatibility. (Default: off)', type='BOOLEAN', value='OFF', read_only='Y')
3232
(name='allow_offline_upgrades', description='Allow machines marked offline to become master.', type='BOOLEAN', value='OFF', read_only='N')
33-
(name='allow_old_authn', description='Reuse old successful authentication for the connection', type='BOOLEAN', value='OFF', read_only='N')
33+
(name='allow_old_authn', description='Reuse old successful authentication for the connection', type='BOOLEAN', value='ON', read_only='N')
3434
(name='allow_parallel_rep_on_pagesplit', description='allow parallel rep on pgsplit', type='BOOLEAN', value='ON', read_only='N')
3535
(name='allow_parallel_rep_on_prefix', description='allow parallel rep on bam_prefix', type='BOOLEAN', value='ON', read_only='N')
3636
(name='allow_portmux_route', description='', type='BOOLEAN', value='ON', read_only='Y')

0 commit comments

Comments
 (0)