~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_parse.cc

  • Committer: Monty Taylor
  • Date: 2008-12-07 23:42:51 UTC
  • mto: This revision was merged to the branch mainline in revision 670.
  • Revision ID: monty@inaugust.com-20081207234251-yxtbg06jpylwej29
Finally removed all of the my_malloc stuff.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2427
2427
  if (!lex->yacc_yyvs)
2428
2428
    old_info= *yystacksize;
2429
2429
  *yystacksize= set_zone((*yystacksize)*2,MY_YACC_INIT,MY_YACC_MAX);
2430
 
  if (!(lex->yacc_yyvs= (unsigned char*)
2431
 
        my_realloc(lex->yacc_yyvs,
2432
 
                   *yystacksize*sizeof(**yyvs),
2433
 
                   MYF(MY_ALLOW_ZERO_PTR | MY_FREE_ON_ERROR))) ||
2434
 
      !(lex->yacc_yyss= (unsigned char*)
2435
 
        my_realloc(lex->yacc_yyss,
2436
 
                   *yystacksize*sizeof(**yyss),
2437
 
                   MYF(MY_ALLOW_ZERO_PTR | MY_FREE_ON_ERROR))))
2438
 
    return 1;
 
2430
  if (!(lex->yacc_yyvs= (lex->yacc_yyvs) 
 
2431
        ? (unsigned char*)realloc(lex->yacc_yyvs,
 
2432
                                  *yystacksize* sizeof(**yyvs))
 
2433
        : (unsigned char*)malloc(*yystacksize*sizeof(**yyvs))))
 
2434
      return 1;
 
2435
  if (!(lex->yacc_yyss= (lex->yacc_yyss) 
 
2436
        ? (unsigned char*)realloc(lex->yacc_yyss,
 
2437
                                  *yystacksize* sizeof(**yyss))
 
2438
        : (unsigned char*)malloc(*yystacksize*sizeof(**yyss))))
 
2439
      return 1;
2439
2440
  if (old_info)
2440
2441
  {                                             // Copy old info from stack
2441
2442
    memcpy(lex->yacc_yyss, *yyss, old_info*sizeof(**yyss));