followup: rename generated files to have distinct names

This commit is contained in:
Sergei Golubchik 2021-05-23 18:38:46 +02:00
parent dfbeddaa11
commit 4777097fee
12 changed files with 48 additions and 48 deletions

12
.gitignore vendored
View file

@ -196,12 +196,12 @@ sql/lex_hash.h
sql/mysql_tzinfo_to_sql
sql/mysqld
sql/sql_builtin.cc
sql/sql_yacc.cc
sql/sql_yacc.hh
sql/sql_yacc_mariadb.yy
sql/sql_yacc_ora.cc
sql/sql_yacc_ora.hh
sql/sql_yacc_ora.yy
sql/yy_mariadb.cc
sql/yy_mariadb.hh
sql/yy_mariadb.yy
sql/yy_oracle.cc
sql/yy_oracle.hh
sql/yy_oracle.yy
storage/heap/hp_test1
storage/heap/hp_test2
storage/maria/aria_chk

View file

@ -125,15 +125,15 @@ IF(NOT GIT_EXECUTABLE)
ENDIF()
# Copy bison output
CONFIGURE_FILE(${CMAKE_BINARY_DIR}/sql/sql_yacc.hh
${PACKAGE_DIR}/sql/sql_yacc.hh COPYONLY)
CONFIGURE_FILE(${CMAKE_BINARY_DIR}/sql/sql_yacc.cc
${PACKAGE_DIR}/sql/sql_yacc.cc COPYONLY)
CONFIGURE_FILE(${CMAKE_BINARY_DIR}/sql/yy_mariadb.hh
${PACKAGE_DIR}/sql/yy_mariadb.hh COPYONLY)
CONFIGURE_FILE(${CMAKE_BINARY_DIR}/sql/yy_mariadb.cc
${PACKAGE_DIR}/sql/yy_mariadb.cc COPYONLY)
# Copy bison output
CONFIGURE_FILE(${CMAKE_BINARY_DIR}/sql/sql_yacc_ora.hh
${PACKAGE_DIR}/sql/sql_yacc_ora.hh COPYONLY)
CONFIGURE_FILE(${CMAKE_BINARY_DIR}/sql/sql_yacc_ora.cc
${PACKAGE_DIR}/sql/sql_yacc_ora.cc COPYONLY)
CONFIGURE_FILE(${CMAKE_BINARY_DIR}/sql/yy_oracle.hh
${PACKAGE_DIR}/sql/yy_oracle.hh COPYONLY)
CONFIGURE_FILE(${CMAKE_BINARY_DIR}/sql/yy_oracle.cc
${PACKAGE_DIR}/sql/yy_oracle.cc COPYONLY)
# Add documentation, if user has specified where to find them
IF(MYSQL_DOCS_LOCATION)

View file

@ -31,9 +31,9 @@ ${SSL_INTERNAL_INCLUDE_DIRS}
SET(GEN_SOURCES
${CMAKE_BINARY_DIR}/sql/sql_yacc.hh
${CMAKE_BINARY_DIR}/sql/sql_yacc.cc
${CMAKE_BINARY_DIR}/sql/sql_yacc_ora.hh
${CMAKE_BINARY_DIR}/sql/sql_yacc_ora.cc
${CMAKE_BINARY_DIR}/sql/yy_mariadb.cc
${CMAKE_BINARY_DIR}/sql/yy_oracle.hh
${CMAKE_BINARY_DIR}/sql/yy_oracle.cc
${CMAKE_BINARY_DIR}/sql/lex_hash.h
)

View file

@ -66,13 +66,14 @@ ADD_CUSTOM_COMMAND(
)
ADD_CUSTOM_COMMAND(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/sql_yacc_mariadb.yy
${CMAKE_CURRENT_BINARY_DIR}/sql_yacc_ora.yy
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/yy_mariadb.yy
${CMAKE_CURRENT_BINARY_DIR}/yy_oracle.yy
COMMAND ${CMAKE_COMMAND} "-DVAL1=ORACLE" "-DVAL2=MARIADB"
"-DOUT1=${CMAKE_CURRENT_BINARY_DIR}/sql_yacc_ora.yy"
"-DOUT2=${CMAKE_CURRENT_BINARY_DIR}/sql_yacc_mariadb.yy"
"-DOUT1=${CMAKE_CURRENT_BINARY_DIR}/yy_oracle.yy"
"-DOUT2=${CMAKE_CURRENT_BINARY_DIR}/yy_mariadb.yy"
"-DIN=${CMAKE_CURRENT_SOURCE_DIR}/sql_yacc.yy"
-P ${CMAKE_CURRENT_SOURCE_DIR}/gen_yy_files.cmake
COMMENT "Building yy_mariadb.yy and yy_oracle.yy from sql_yacc.yy"
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/sql_yacc.yy
${CMAKE_CURRENT_SOURCE_DIR}/gen_yy_files.cmake
)
@ -84,8 +85,8 @@ IF(SSL_DEFINES)
ENDIF()
SET (SQL_SOURCE
${CMAKE_CURRENT_BINARY_DIR}/sql_yacc.cc
${CMAKE_CURRENT_BINARY_DIR}/sql_yacc_ora.cc
${CMAKE_CURRENT_BINARY_DIR}/yy_mariadb.cc
${CMAKE_CURRENT_BINARY_DIR}/yy_oracle.cc
../sql-common/client.c compat56.cc derror.cc des_key_file.cc
discover.cc ../sql-common/errmsg.c
field.cc field_conv.cc field_comp.cc
@ -328,7 +329,7 @@ FIND_PACKAGE(BISON 2.0)
# there
IF (NOT BISON_FOUND)
IF (NOT ${CMAKE_CURRENT_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_BINARY_DIR})
FOREACH(file sql_yacc.cc sql_yacc.hh sql_yacc_ora.cc sql_yacc_ora.hh)
FOREACH(file yy_mariadb.cc yy_mariadb.hh yy_oracle.cc yy_oracle.hh)
IF(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${file} AND (NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/${file}))
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/${file}
${CMAKE_CURRENT_BINARY_DIR}/${file} COPYONLY)
@ -336,7 +337,7 @@ IF (NOT BISON_FOUND)
ENDFOREACH()
ENDIF()
IF(NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/sql_yacc.cc)
IF(NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/yy_mariadb.cc)
# Output files are missing, bail out.
SET(ERRMSG
"Bison (GNU parser generator) is required to build MySQL."
@ -351,18 +352,17 @@ IF (NOT BISON_FOUND)
MESSAGE(FATAL_ERROR ${ERRMSG})
ENDIF()
ELSE()
BISON_TARGET(gen_mariadb_cc_hh ${CMAKE_CURRENT_BINARY_DIR}/sql_yacc_mariadb.yy
${CMAKE_CURRENT_BINARY_DIR}/sql_yacc.cc
DEFINES_FILE ${CMAKE_CURRENT_BINARY_DIR}/sql_yacc.hh
BISON_TARGET(gen_mariadb_cc_hh ${CMAKE_CURRENT_BINARY_DIR}/yy_mariadb.yy
${CMAKE_CURRENT_BINARY_DIR}/yy_mariadb.cc
COMPILE_FLAGS "-p MYSQL -S ${CMAKE_CURRENT_SOURCE_DIR}/myskel.m4")
BISON_TARGET(gen_oracle_cc_hh ${CMAKE_CURRENT_BINARY_DIR}/sql_yacc_ora.yy
${CMAKE_CURRENT_BINARY_DIR}/sql_yacc_ora.cc
BISON_TARGET(gen_oracle_cc_hh ${CMAKE_CURRENT_BINARY_DIR}/yy_oracle.yy
${CMAKE_CURRENT_BINARY_DIR}/yy_oracle.cc
COMPILE_FLAGS "-p ORA -S ${CMAKE_CURRENT_SOURCE_DIR}/myskel.m4")
ENDIF()
IF(NOT CMAKE_CROSSCOMPILING OR DEFINED CMAKE_CROSSCOMPILING_EMULATOR)
ADD_EXECUTABLE(gen_lex_token gen_lex_token.cc
${CMAKE_CURRENT_BINARY_DIR}/sql_yacc.hh)
${CMAKE_CURRENT_BINARY_DIR}/yy_mariadb.hh)
ADD_EXECUTABLE(gen_lex_hash gen_lex_hash.cc)
ENDIF()
@ -381,8 +381,8 @@ ADD_CUSTOM_TARGET(
DEPENDS
${CMAKE_CURRENT_BINARY_DIR}/lex_hash.h
${CMAKE_CURRENT_BINARY_DIR}/lex_token.h
${CMAKE_CURRENT_BINARY_DIR}/sql_yacc.cc
${CMAKE_CURRENT_BINARY_DIR}/sql_yacc_ora.cc
${CMAKE_CURRENT_BINARY_DIR}/yy_mariadb.cc
${CMAKE_CURRENT_BINARY_DIR}/yy_oracle.cc
)
IF(WIN32 OR HAVE_DLOPEN AND NOT DISABLE_SHARED)
@ -397,8 +397,8 @@ CONFIGURE_FILE(
ADD_CUSTOM_TARGET(dist
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_BINARY_DIR}/make_dist.cmake
DEPENDS ${CMAKE_BINARY_DIR}/sql/sql_yacc.cc ${CMAKE_BINARY_DIR}/sql/sql_yacc.hh
DEPENDS ${CMAKE_BINARY_DIR}/sql/sql_yacc_ora.cc ${CMAKE_BINARY_DIR}/sql/sql_yacc_ora.hh
DEPENDS ${CMAKE_BINARY_DIR}/sql/yy_mariadb.cc ${CMAKE_BINARY_DIR}/sql/yy_mariadb.hh
DEPENDS ${CMAKE_BINARY_DIR}/sql/yy_oracle.cc ${CMAKE_BINARY_DIR}/sql/yy_oracle.hh
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
)

View file

@ -19,7 +19,7 @@
/* We only need the tokens here */
#define YYSTYPE_IS_DECLARED
#include <sql_yacc.hh>
#include <yy_mariadb.hh>
#include <lex.h>
#include <welcome_copyright_notice.h> /* ORACLE_WELCOME_COPYRIGHT_NOTICE */

View file

@ -2761,7 +2761,7 @@ public:
{ return get_item_copy<Item_func_udf_str>(thd, this); }
};
#else /* Dummy functions to get sql_yacc.cc compiled */
#else /* Dummy functions to get yy_*.cc files compiled */
class Item_func_udf_float :public Item_real_func
{

View file

@ -1766,7 +1766,7 @@ public:
{ return get_item_copy<Item_sum_udf_decimal>(thd, this); }
};
#else /* Dummy functions to get sql_yacc.cc compiled */
#else /* Dummy functions to get yy_*.cc files compiled */
class Item_sum_udf_float :public Item_sum_double
{

View file

@ -32,7 +32,7 @@
#include "sql_get_diagnostics.h"
/* Generated code */
#include "sql_yacc.hh"
#include "yy_mariadb.hh"
#define LEX_TOKEN_WITH_DEFINITION
#include "lex_token.h"

View file

@ -355,7 +355,7 @@ void binlog_unsafe_map_init();
#ifdef MYSQL_SERVER
/*
The following hack is needed because sql_yacc.cc does not define
The following hack is needed because yy_*.cc do not define
YYSTYPE before including this file
*/
#ifdef MYSQL_YACC
@ -363,10 +363,10 @@ void binlog_unsafe_map_init();
#else
#include "lex_symbol.h"
#ifdef MYSQL_LEX
#include "item_func.h" /* Cast_target used in sql_yacc.hh */
#include "sql_get_diagnostics.h" /* Types used in sql_yacc.hh */
#include "item_func.h" /* Cast_target used in yy_mariadb.hh */
#include "sql_get_diagnostics.h" /* Types used in yy_mariadb.hh */
#include "sp_pcontext.h"
#include "sql_yacc.hh"
#include "yy_mariadb.hh"
#define LEX_YYSTYPE YYSTYPE *
#else
#define LEX_YYSTYPE void *

View file

@ -10374,8 +10374,8 @@ bool check_host_name(LEX_CSTRING *str)
}
extern int MYSQLparse(THD *thd); // from sql_yacc.cc
extern int ORAparse(THD *thd); // from sql_yacc_ora.cc
extern int MYSQLparse(THD *thd); // from yy_mariadb.cc
extern int ORAparse(THD *thd); // from yy_oracle.cc
/**

View file

@ -392,7 +392,7 @@ enum enum_yes_no_unknown
*/
/* sql_yacc.cc */
/* yy_*.cc */
#ifndef DBUG_OFF
extern void turn_parser_debug_on_MYSQLparse();
extern void turn_parser_debug_on_ORAparse();

View file

@ -165,7 +165,7 @@ static void yyerror(THD *thd, const char *s)
void _CONCAT_UNDERSCORED(turn_parser_debug_on,yyparse)()
{
/*
MYSQLdebug is in sql/sql_yacc.cc, in bison generated code.
MYSQLdebug is in sql/yy_*.cc, in bison generated code.
Turning this option on is **VERY** verbose, and should be
used when investigating a syntax error problem only.
@ -17791,7 +17791,7 @@ uninstall:
}
;
/* Avoid compiler warning from sql_yacc.cc where yyerrlab1 is not used */
/* Avoid compiler warning from yy_*.cc where yyerrlab1 is not used */
keep_gcc_happy:
IMPOSSIBLE_ACTION
{