List:Commits« Previous MessageNext Message »
From:Marc Alff Date:July 15 2008 3:45am
Subject:bzr push into mysql-5.1 tree (marc.alff:2699 to 2699) Bug#35577
View as plain text  
------------------------------------------------------------
revno: 2699
revision-id: marc.alff@stripped
parent: ramil@stripped
parent: marc.alff@stripped
committer: Marc Alff <marc.alff@stripped>
branch nick: mysql-5.1-35577-merge
timestamp: Mon 2008-07-14 19:43:12 -0600
message:
  Bug#35577, manual merge mysql-5.0-bugteam -> mysql-5.1-bugteam
added:
  mysql-test/r/parser_stack.result parser_stack.result-20080710213555-qr1nm5k011b23116-1
  mysql-test/t/parser_stack.test parser_stack.test-20080710213601-cvl5jef5im7hzzbl-1
modified:
  sql/event_data_objects.cc     
sp1f-event_timed.cc-20051205104456-ckd2gzuwhr4u5umqbncmt43nvv45pxmf
  sql/mysql_priv.h              
sp1f-mysql_priv.h-19700101030959-4fl65tqpop5zfgxaxkqotu2fa2ree5ci
  sql/sp.cc                     
sp1f-sp.cc-20021212121421-6xwuvxq5bku2b4yv655kp2e5gsvautd5
  sql/sp_head.cc                
sp1f-sp_head.cc-20021208185920-jtgc5wvyqdnu2gvcdus3gazrfhxbofxd
  sql/sql_class.cc              
sp1f-sql_class.cc-19700101030959-rpotnweaff2pikkozh3butrf7mv3oero
  sql/sql_class.h               
sp1f-sql_class.h-19700101030959-jnqnbrjyqsvgncsibnumsmg3lyi7pa5s
  sql/sql_lex.cc                
sp1f-sql_lex.cc-19700101030959-4pizwlu5rqkti27gcwsvxkawq6bc2kph
  sql/sql_lex.h                 
sp1f-sql_lex.h-19700101030959-sgldb2sooc7twtw5q7pgjx7qzqiaa3sn
  sql/sql_parse.cc              
sp1f-sql_parse.cc-19700101030959-ehcre3rwhv5l3mlxqhaxg36ujenxnrcd
  sql/sql_partition.cc          
sp1f-sql_partition.cc-20050718113038-57h5bzswps6cel2y7k7qideue3ghbg3u
  sql/sql_prepare.cc            
sp1f-sql_prepare.cc-20020612210720-gtqjjiu7vpmfxb5xct2qke7urmqcabli
  sql/sql_trigger.cc            
sp1f-sql_trigger.cc-20040907122911-35k3wamrp6g7qsupxe7hisftpobcwin5
  sql/sql_view.cc               
sp1f-sql_view.cc-20040715221517-nw4p4mja6nzzlvwwhzfgfqb4umxqobe4
  sql/sql_yacc.yy               
sp1f-sql_yacc.yy-19700101030959-wvn4qyy2drpmge7kaq3dysprbhlrv27j
    ------------------------------------------------------------
    revno: 1810.3744.2
    revision-id: marc.alff@stripped
    parent: marc.alff@stripped
    parent: gshchepa@stripped
    committer: Marc Alff <marc.alff@stripped>
    branch nick: mysql-5.0-35577-merge
    timestamp: Mon 2008-07-14 15:47:34 -0600
    message:
      Merge
    modified:
      sql/item_strfunc.cc           
sp1f-item_strfunc.cc-19700101030959-yl2pwnrngmla3nmlgiuiwrztx3iu4ffl
    ------------------------------------------------------------
    revno: 1810.3744.1
    revision-id: marc.alff@stripped
    parent: azundris@stripped
    committer: Marc Alff <marc.alff@stripped>
    branch nick: mysql-5.0-35577-merge
    timestamp: Mon 2008-07-14 15:41:30 -0600
    message:
      Bug#35577 (CREATE PROCEDURE causes either crash or syntax error depending on
      build)
      
      The crash was caused by freeing the internal parser stack during the parser
      execution.
      This occured only for complex stored procedures, after reallocating the parser
      stack using my_yyoverflow(), with the following C call stack:
      - MYSQLparse()
      - any rule calling sp_head::restore_lex()
      - lex_end()
      - x_free(lex->yacc_yyss), xfree(lex->yacc_yyvs)
      
      The root cause is the implementation of stored procedures, which breaks the
      assumption from 4.1 that there is only one LEX structure per parser call.
      
      The solution is to separate the LEX structure into:
      - attributes that represent a statement (the current LEX structure),
      - attributes that relate to the syntax parser itself (Yacc_state),
      so that parsing multiple statements in stored programs can create multiple
      LEX structures while not changing the unique Yacc_state.
      
      Now, Yacc_state and the existing Lex_input_stream are aggregated into
      Parser_state, a structure that represent the complete state of the (Lexical +
      Syntax) parser.
    added:
      mysql-test/r/parser_stack.result
parser_stack.result-20080710213555-qr1nm5k011b23116-1
      mysql-test/t/parser_stack.test parser_stack.test-20080710213601-cvl5jef5im7hzzbl-1
    modified:
      sql/sp.cc                     
sp1f-sp.cc-20021212121421-6xwuvxq5bku2b4yv655kp2e5gsvautd5
      sql/sp_head.cc                
sp1f-sp_head.cc-20021208185920-jtgc5wvyqdnu2gvcdus3gazrfhxbofxd
      sql/sql_class.cc              
sp1f-sql_class.cc-19700101030959-rpotnweaff2pikkozh3butrf7mv3oero
      sql/sql_class.h               
sp1f-sql_class.h-19700101030959-jnqnbrjyqsvgncsibnumsmg3lyi7pa5s
      sql/sql_lex.cc                
sp1f-sql_lex.cc-19700101030959-4pizwlu5rqkti27gcwsvxkawq6bc2kph
      sql/sql_lex.h                 
sp1f-sql_lex.h-19700101030959-sgldb2sooc7twtw5q7pgjx7qzqiaa3sn
      sql/sql_parse.cc              
sp1f-sql_parse.cc-19700101030959-ehcre3rwhv5l3mlxqhaxg36ujenxnrcd
      sql/sql_prepare.cc            
sp1f-sql_prepare.cc-20020612210720-gtqjjiu7vpmfxb5xct2qke7urmqcabli
      sql/sql_trigger.cc            
sp1f-sql_trigger.cc-20040907122911-35k3wamrp6g7qsupxe7hisftpobcwin5
      sql/sql_view.cc               
sp1f-sql_view.cc-20040715221517-nw4p4mja6nzzlvwwhzfgfqb4umxqobe4
      sql/sql_yacc.yy               
sp1f-sql_yacc.yy-19700101030959-wvn4qyy2drpmge7kaq3dysprbhlrv27j

Attachment: [text/text/x-diff] patch-2699.diff
Thread
bzr push into mysql-5.1 tree (marc.alff:2699 to 2699) Bug#35577Marc Alff15 Jul