mirror of
https://github.com/MariaDB/server.git
synced 2025-01-22 14:54:20 +01:00
105f46ffb8
In the InnoDB internal SQL parser, there is the keyword DOES_NOT_FIT_IN_MEMORY that is never specified in any CREATE TABLE statement that is passed to the InnoDB SQL parser (que_eval_sql() or pars_sql() or yyparse()). If this keyword were ever present, it would set the flag dict_table_t::does_not_fit_in_memory which is only present in debug builds. Let us remove all traces of this. Also, fix storage/innobase/pars/make_flex.sh so that no the generated file storage/innobase/pars/lexyy.cc works as is. FIXME: Always generate the InnoDB Bison files at build time, similar to how sql/sql_yacc.yy is handled. (This would still leave the generated scanner files, unless we want to add a build-time dependency for Flex.)
51 lines
2 KiB
Bash
Executable file
51 lines
2 KiB
Bash
Executable file
#!/bin/bash
|
|
#
|
|
# Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved.
|
|
# Copyright (c) 2017, MariaDB Corporation.
|
|
#
|
|
# This program is free software; you can redistribute it and/or modify it under
|
|
# the terms of the GNU General Public License as published by the Free Software
|
|
# Foundation; version 2 of the License.
|
|
#
|
|
# This program is distributed in the hope that it will be useful, but WITHOUT
|
|
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
|
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
|
#
|
|
# You should have received a copy of the GNU General Public License along with
|
|
# this program; if not, write to the Free Software Foundation, Inc.,
|
|
# 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA
|
|
#
|
|
# generate lexer files from flex input files.
|
|
|
|
set -eu
|
|
|
|
TMPFILE=_flex_tmp.cc
|
|
OUTFILE=lexyy.cc
|
|
|
|
flex -o $TMPFILE pars0lex.l
|
|
|
|
# AIX needs its includes done in a certain order, so include "univ.i" first
|
|
# to be sure we get it right.
|
|
echo '#include "univ.i"' > $OUTFILE
|
|
|
|
# flex assigns a pointer to an int in one place without a cast, resulting in
|
|
# a warning on Win64. Add the cast. Also define some symbols as static.
|
|
sed -e '
|
|
s/'"$TMPFILE"'/'"$OUTFILE"'/;
|
|
s/^void yyset_extra *(YY_EXTRA_TYPE *user_defined *);//
|
|
s/\(int offset = \)\((yy_c_buf_p) - (yytext_ptr)\);/\1(int)(\2);/;
|
|
s/\(void yy\(restart\|_\(delete\|flush\)_buffer\)\)/static \1/;
|
|
s/\(void yy_switch_to_buffer\)/MY_ATTRIBUTE((unused)) static \1/;
|
|
s/\(void yy\(push\|pop\)_buffer_state\)/MY_ATTRIBUTE((unused)) static \1/;
|
|
s/\(YY_BUFFER_STATE yy_create_buffer\)/static \1/;
|
|
s/\(\(int\|void\) yy[gs]et_\)/MY_ATTRIBUTE((unused)) static \1/;
|
|
s/\(void \*\?yy\(\(re\)\?alloc\|free\)\)/static \1/;
|
|
s/extern int yy\(leng\|_flex_debug\|lineno\);//;
|
|
s/\(int yy\(leng\|lineno\|_flex_debug\)\)/static \1/;
|
|
s/\(int yylex_destroy\)/MY_ATTRIBUTE((unused)) static \1/;
|
|
s/^\(\(FILE\|char\) *\* *yyget\)/MY_ATTRIBUTE((unused)) static \1/;
|
|
s/^extern \(\(FILE\|char\) *\* *yy\).*//;
|
|
s/^\(FILE\|char\) *\* *yy/static &/;
|
|
' < $TMPFILE >> $OUTFILE
|
|
|
|
rm $TMPFILE
|