Skip to content

wrong variable is used in init_params() #1402

Closed

Description

@bigplaice

Bug Report

In src/backend/commands/sequence.c: init_param() function, there is following code:

            else if(strcmp(defel->defname, "shard_extend") == 0 || strcmp(defel->defname, "shard_noextend") == 0
                    || strcmp(defel->defname, "noshard") == 0)
            {
                    shardcnt++;
                    if(keepcnt > 1)
                    {
                            ereport(ERROR,
                                    (errcode(ERRCODE_SYNTAX_ERROR),
                                     errmsg("dumplicate or conflicting SHARD EXTEND/NOEXTEND specifications"),
                                     parser_errposition(pstate, defel->location)));
                    }
            }

Obviously the shardcnt instead of keepcnt should be used to be compared to 1.

IvorySQL Version

IvorySQL master branch

OS Version (uname -a)

N/A

Configuration options ( config.status --config )

Current Behavior

Expected behavior/code

Step to reproduce

Additional context that can be helpful for identifying the problem

Activity

  1. added
    bug
    on Jul 15, 2026
  2. bigplaice commented on Jul 15, 2026

    @bigplaice
    CollaboratorAuthor

    addressed by PR #1401

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions