Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit406ab79

Browse files
committed
2 parentsa43e07b +14d9fda commit406ab79

File tree

3 files changed

+43
-27
lines changed

3 files changed

+43
-27
lines changed

‎contrib/mmts/multimaster.c‎

Lines changed: 38 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2245,8 +2245,23 @@ MtmNoticeReceiver(void *i, const PGresult *res)
22452245

22462246
stripped_notice=palloc0(len);
22472247

2248-
/* Strip "NOTICE: " from beginning and "\n" from end of error string */
2249-
strncpy(stripped_notice,notice+9,len-1-9);
2248+
if (*notice=='N')
2249+
{
2250+
/* Strip "NOTICE: " from beginning and "\n" from end of error string */
2251+
strncpy(stripped_notice,notice+9,len-1-9);
2252+
elog(NOTICE,"%s",stripped_notice);
2253+
}
2254+
elseif (*notice=='W')
2255+
{
2256+
/* Strip "WARNING: " from beginning and "\n" from end of error string */
2257+
strncpy(stripped_notice,notice+10,len-1-10);
2258+
elog(WARNING,"%s",stripped_notice);
2259+
}
2260+
else
2261+
{
2262+
stripped_notice=notice;
2263+
elog(WARNING,"%s",stripped_notice);
2264+
}
22502265

22512266
MTM_LOG1("%s",stripped_notice);
22522267
pfree(stripped_notice);
@@ -2478,41 +2493,45 @@ static void MtmProcessUtility(Node *parsetree, const char *queryString,
24782493
caseT_PrepareStmt:
24792494
caseT_ExecuteStmt:
24802495
caseT_DeallocateStmt:
2481-
//case T_GrantStmt: /* XXX: we could replicate some of these these */;
2482-
//case T_GrantRoleStmt:
2483-
//case T_AlterDatabaseStmt:
2484-
//case T_AlterDatabaseSetStmt:
24852496
caseT_NotifyStmt:
24862497
caseT_ListenStmt:
24872498
caseT_UnlistenStmt:
24882499
caseT_LoadStmt:
24892500
caseT_ClusterStmt:/* XXX: we could replicate these */;
24902501
caseT_VacuumStmt:
24912502
caseT_ExplainStmt:
2492-
//case T_AlterSystemStmt:
24932503
caseT_VariableShowStmt:
2494-
caseT_DiscardStmt:
2495-
//case T_CreateEventTrigStmt:
2496-
//case T_AlterEventTrigStmt:
2497-
//case T_CreateRoleStmt:
2498-
//case T_AlterRoleStmt:
2499-
//case T_AlterRoleSetStmt:
2500-
//case T_DropRoleStmt:
25012504
caseT_ReassignOwnedStmt:
25022505
caseT_LockStmt:
2503-
//case T_ConstraintsSetStmt:
25042506
caseT_CheckPointStmt:
25052507
caseT_ReindexStmt:
25062508
skipCommand= true;
25072509
break;
2510+
caseT_DiscardStmt:
2511+
{
2512+
//DiscardStmt *stmt = (DiscardStmt *) parsetree;
2513+
//skipCommand = stmt->target == DISCARD_TEMP;
2514+
2515+
skipCommand= true;
2516+
2517+
if (MtmGUCBufferAllocated)
2518+
{
2519+
// XXX: move allocation somewhere to backend startup and check
2520+
// where buffer is empty in send routines.
2521+
MtmGUCBufferAllocated= false;
2522+
pfree(MtmGUCBuffer);
2523+
}
2524+
2525+
}
2526+
break;
25082527
caseT_VariableSetStmt:
25092528
{
25102529
VariableSetStmt*stmt= (VariableSetStmt*)parsetree;
25112530

25122531
skipCommand= true;
25132532

25142533
/* Prevent SET TRANSACTION from replication */
2515-
if (MtmTx.isTransactionBlock||stmt->kind==VAR_SET_MULTI)
2534+
if (stmt->kind==VAR_SET_MULTI)
25162535
break;
25172536

25182537
if (!MtmGUCBufferAllocated)
@@ -2525,13 +2544,10 @@ static void MtmProcessUtility(Node *parsetree, const char *queryString,
25252544
MtmGUCBufferAllocated= true;
25262545
}
25272546

2528-
//appendStringInfoString(MtmGUCBuffer, "SET ");
2529-
//appendStringInfoString(MtmGUCBuffer, stmt->name);
2530-
//appendStringInfoString(MtmGUCBuffer, " TO ");
2531-
//appendStringInfoString(MtmGUCBuffer, ExtractSetVariableArgs(stmt));
2532-
//appendStringInfoString(MtmGUCBuffer, "; ");
2533-
25342547
appendStringInfoString(MtmGUCBuffer,queryString);
2548+
2549+
// sometimes there is no ';' char at the end.
2550+
appendStringInfoString(MtmGUCBuffer,";");
25352551
}
25362552
break;
25372553
caseT_CreateStmt:

‎src/test/regress/expected/create_function_3.out‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ SELECT proname, proleakproof FROM pg_proc
127127
functext_e_2 | t
128128
(2 rows)
129129

130-
ALTER FUNCTION functext_E_2(int) NOT LEAKPROOF;-- removeleakproog attribute
130+
ALTER FUNCTION functext_E_2(int) NOT LEAKPROOF;-- removeleakproof attribute
131131
SELECT proname, proleakproof FROM pg_proc
132132
WHERE oid in ('functext_E_1'::regproc,
133133
'functext_E_2'::regproc) ORDER BY proname;

‎src/test/regress/serial_schedule‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,8 @@ test: join
9090
test: aggregates
9191
test: groupingsets
9292
test: transactions
93-
ignore: random
94-
test: random
93+
#ignore: random
94+
#test: random
9595
test: portals
9696
test: arrays
9797
test: btree_index
@@ -151,12 +151,12 @@ test: rangefuncs
151151
test: prepare
152152
test: without_oid
153153
test: conversion
154-
test: truncate
154+
#test: truncate
155155
test: alter_table
156156
test: sequence
157157
test: polymorphism
158158
test: rowtypes
159-
test: returning
159+
#test: returning
160160
test: largeobject
161161
test: with
162162
test: xml

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp