~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_parse.cc

  • Committer: Brian Aker
  • Date: 2008-12-09 17:33:02 UTC
  • mfrom: (656.1.54 devel)
  • Revision ID: brian@tangent.org-20081209173302-aptngvc7efxnatnt
Merge from Monty.

Show diffs side-by-side

added added

removed removed

Lines of Context:
626
626
    save_db= session->db;
627
627
    save_user_connect= session->user_connect;
628
628
 
629
 
    if (!(session->security_ctx->user= my_strdup(user, MYF(0))))
 
629
    if (!(session->security_ctx->user= strdup(user)))
630
630
    {
631
631
      session->security_ctx->user= save_security_ctx.user;
632
632
      my_message(ER_OUT_OF_RESOURCES, ER(ER_OUT_OF_RESOURCES), MYF(0));
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
  unsigned char *tmpptr= NULL;
 
2431
  if (!(tmpptr= (unsigned char *)realloc(lex->yacc_yyvs,
 
2432
                                         *yystacksize* sizeof(**yyvs))))
 
2433
      return 1;
 
2434
  lex->yacc_yyvs= tmpptr;
 
2435
  tmpptr= NULL;
 
2436
  if (!(tmpptr= (unsigned char*)realloc(lex->yacc_yyss,
 
2437
                                        *yystacksize* sizeof(**yyss))))
 
2438
      return 1;
 
2439
  lex->yacc_yyss= tmpptr;
2439
2440
  if (old_info)
2440
2441
  {                                             // Copy old info from stack
2441
2442
    memcpy(lex->yacc_yyss, *yyss, old_info*sizeof(**yyss));