• unknown's avatar
    Bug #21086: server crashes when VIEW defined with a SELECT with COLLATE clause is called · 1b3cdb60
    unknown authored
      When executing INSERT over a view with calculated columns it was assuming all
      elements of the fields collection are actually Item_field instances.
      This may not be true when inserting into a view and that view has columns that are 
      such expressions that allow updating (like setting a collation for example).
      Corrected to access field information through the filed_for_view_update() function and 
      retrieve correctly the field info even for "update-friendly" non-Item_field items.
    
    
    mysql-test/r/view.result:
      Bug #21086: server crashes when VIEW defined with a SELECT with COLLATE clause is called
       - test suite
    mysql-test/t/view.test:
      Bug #21086: server crashes when VIEW defined with a SELECT with COLLATE clause is called
       - test suite
    sql/item_strfunc.h:
      Bug #21086: server crashes when VIEW defined with a SELECT with COLLATE clause is called
       - obvious typo fixed
    sql/sql_base.cc:
      Bug #21086: server crashes when VIEW defined with a SELECT with COLLATE clause is called
       - must access field information through the filed_for_view_update() function to retrieve
         correctly the field info even for "update-friendly" non-Item_field items.
    1b3cdb60
view.result 82.6 KB