Skip to content
  • Dmitry Lenev's avatar
    52ae03c1
    Bug#30214965 "GENERATION OF FK NAMES IS NOT RE-EXECUTION SAFE". · 52ae03c1
    Dmitry Lenev authored
    
    
    Attempt to re-execute prepared statement or statement in a stored
    routine which added foreign key without explicit name resulted in
    unwarranted duplicate foreign key name error.
    
    This problem occurred because the code responsible for generation
    of names for foreign keys without explicit name stored generated
    names in Foreign_key_spec objects (this is necessary for NDB SE
    to see these names). During statement re-execution these objects
    were reused as is, resulting in attempt to create foreign key with
    the same name as during the first execution (since it was assumed
    that presence of the name meant that it was provided explicitly).
    
    This fix adds a flag to Foreign_key_spec class to allow to differ
    cases when names were provided explicitly from cases when names
    were generated. During statement re-execution we re-generate names
    if they were not provided explicitly.
    
    Reviewed-by: default avatarSivert Sorumgaard <sivert.sorumgaard@oracle.com>
    52ae03c1
    Bug#30214965 "GENERATION OF FK NAMES IS NOT RE-EXECUTION SAFE".
    Dmitry Lenev authored
    
    
    Attempt to re-execute prepared statement or statement in a stored
    routine which added foreign key without explicit name resulted in
    unwarranted duplicate foreign key name error.
    
    This problem occurred because the code responsible for generation
    of names for foreign keys without explicit name stored generated
    names in Foreign_key_spec objects (this is necessary for NDB SE
    to see these names). During statement re-execution these objects
    were reused as is, resulting in attempt to create foreign key with
    the same name as during the first execution (since it was assumed
    that presence of the name meant that it was provided explicitly).
    
    This fix adds a flag to Foreign_key_spec class to allow to differ
    cases when names were provided explicitly from cases when names
    were generated. During statement re-execution we re-generate names
    if they were not provided explicitly.
    
    Reviewed-by: default avatarSivert Sorumgaard <sivert.sorumgaard@oracle.com>
Loading