~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/innobase/pars/pars0lex.l

  • Committer: Brian Aker
  • Date: 2010-10-09 17:44:13 UTC
  • mto: This revision was merged to the branch mainline in revision 1853.
  • Revision ID: brian@tangent.org-20101009174413-4cs0q58kw0fjd45y
First pass through adding back user_locks.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*****************************************************************************
2
2
 
3
 
Copyright (C) 1997, 2009, Innobase Oy. All Rights Reserved.
 
3
Copyright (c) 1997, 2009, Innobase Oy. All Rights Reserved.
4
4
 
5
5
This program is free software; you can redistribute it and/or modify it under
6
6
the terms of the GNU General Public License as published by the Free Software
12
12
 
13
13
You should have received a copy of the GNU General Public License along with
14
14
this program; if not, write to the Free Software Foundation, Inc., 59 Temple
15
 
Place, Suite 330, Boston, MA 02110-1301 USA
 
15
Place, Suite 330, Boston, MA 02111-1307 USA
16
16
 
17
17
*****************************************************************************/
18
18
 
40
40
 
41
41
#include "univ.i"
42
42
#include "pars0pars.h"
43
 
#include "pars0grm.hh"
 
43
#include "pars0grm.h"
44
44
#include "pars0sym.h"
45
45
#include "mem0mem.h"
46
46
#include "os0proc.h"
529
529
{ID}            {
530
530
                        yylval = sym_tab_add_id(pars_sym_tab_global,
531
531
                                                        (byte*)yytext,
532
 
                                                        strlen(yytext));
 
532
                                                        ut_strlen(yytext));
533
533
                        return(PARS_ID_TOKEN);
534
534
}
535
535
 
647
647
}
648
648
 
649
649
%%
650
 
 
651
 
/* yylex_destroy() is not defined before Flex 2.5.9
652
 
   so we attempt to define something that should be good enough
653
 
   for old Flex - such as that found on CentOS 5
654
 
*/
655
 
#if !defined(YY_FLEX_MAJOR_VERSION) || YY_FLEX_MAJOR_VERSION < 2 \
656
 
  || (YY_FLEX_MAJOR_VERSION == 2                                        \
657
 
      && (!defined(YY_FLEX_MINOR_VERSION) || YY_FLEX_MINOR_VERSION < 5  \
658
 
          || (YY_FLEX_MINOR_VERSION == 5                                \
659
 
              && (!defined(YY_FLEX_SUBMINOR_VERSION)                    \
660
 
                  || YY_FLEX_SUBMINOR_VERSION < 9))))
661
 
# define yylex_destroy() yy_delete_buffer(YY_CURRENT_BUFFER)
662
 
#endif
663
 
 
664
 
/**********************************************************************
665
 
Release any resources used by the lexer. */
666
 
UNIV_INTERN
667
 
void
668
 
pars_lexer_close(void)
669
 
/*==================*/
670
 
{
671
 
        yylex_destroy();
672
 
        free(stringbuf);
673
 
        stringbuf = NULL;
674
 
        stringbuf_len_alloc = stringbuf_len = 0;
675
 
}