• unknown's avatar
    Bug#20028 (Function with select return no data) · 81569524
    unknown authored
    This patch reverts a change introduced by Bug 6951, which incorrectly
    set thd->abort_on_warning for stored procedures.
    
    As per internal discussions about the SQL_MODE=TRADITIONAL,
    the correct behavior is to *not* abort on warnings even inside an INSERT/UPDATE
    trigger.
    
    Tests for Stored Procedures, Stored Functions, Triggers involving SQL_MODE
    have been included or revised, to reflect the intended behavior.
    
    
    mysql-test/include/sp-vars.inc:
      Tests for SQL_MODE='TRADITIONAL'
    mysql-test/r/sp-vars.result:
      Tests for SQL_MODE='TRADITIONAL'
    mysql-test/r/sp.result:
      Tests for SQL_MODE='TRADITIONAL'
    mysql-test/r/trigger.result:
      Tests for SQL_MODE='TRADITIONAL'
    mysql-test/t/sp-vars.test:
      Tests for SQL_MODE='TRADITIONAL'
    mysql-test/t/sp.test:
      Tests for SQL_MODE='TRADITIONAL'
    mysql-test/t/trigger.test:
      Tests for SQL_MODE='TRADITIONAL'. Revised the expected behavior for triggers
    sql/sp_head.cc:
      For SQL_MODE='TRADITIONAL',
      thd->abort_on_warning should be set only when assigning a *column*
    81569524
sp-vars.inc 3.28 KB