mirror of https://github.com/citusdata/citus.git
Merge pull request #6069 from citusdata/assertion-fix
fix assertion bugs related to list lengthimprove_locking_try_3
commit
c085ac026a
|
@ -652,7 +652,7 @@ PostprocessAlterTableSchemaStmt(Node *node, const char *queryString)
|
|||
List *tableAddresses = GetObjectAddressListFromParseTree((Node *) stmt, true);
|
||||
|
||||
/* the code-path only supports a single object */
|
||||
Assert(list_length(tableAddress) == 1);
|
||||
Assert(list_length(tableAddresses) == 1);
|
||||
|
||||
/* We have already asserted that we have exactly 1 address in the addresses. */
|
||||
ObjectAddress *tableAddress = linitial(tableAddresses);
|
||||
|
|
|
@ -120,7 +120,7 @@ PreprocessRenameTypeAttributeStmt(Node *node, const char *queryString,
|
|||
List *typeAddresses = GetObjectAddressListFromParseTree((Node *) stmt, false);
|
||||
|
||||
/* the code-path only supports a single object */
|
||||
Assert(list_length(objectAddresses) == 1);
|
||||
Assert(list_length(typeAddresses) == 1);
|
||||
|
||||
if (!ShouldPropagateAnyObject(typeAddresses))
|
||||
{
|
||||
|
|
|
@ -182,7 +182,7 @@ WorkerCreateOrReplaceObject(List *sqlStatements)
|
|||
*/
|
||||
Node *parseTree = ParseTreeNode(linitial(sqlStatements));
|
||||
List *addresses = GetObjectAddressListFromParseTree(parseTree, true);
|
||||
Assert(list_length(viewAddresses) == 1);
|
||||
Assert(list_length(addresses) == 1);
|
||||
|
||||
/* We have already asserted that we have exactly 1 address in the addresses. */
|
||||
ObjectAddress *address = linitial(addresses);
|
||||
|
|
Loading…
Reference in New Issue