[MDEV-21286] bison warnings on ubuntu 20.04 on deprecated directive in sql_yacc.yy Created: 2019-12-10  Updated: 2021-09-22  Resolved: 2021-09-22

Status: Closed
Project: MariaDB Server
Component/s: Compiling, Parser
Affects Version/s: 10.2, 10.3, 10.4, 10.5
Fix Version/s: 10.5.13, 10.6.5, 10.7.0

Type: Bug Priority: Major
Reporter: Alexey Bychko (Inactive) Assignee: Anel Husakovic
Resolution: Fixed Votes: 0
Labels: not-10.6

Issue Links:
Duplicate
is duplicated by MDEV-25225 Warning on deprecated directive in sq... Closed
Relates
relates to MDEV-23908 Implement SELECT ... OFFSET ... FETCH... Closed

 Description   

Generating sql_yacc.cc, sql_yacc.h
cd /tmp/es-build/build/sql && /usr/bin/bison -y -p MYSQL --output=/tmp/es-build/build/sql/sql_yacc.cc --defines=/tmp/es-build/build/sql/sql_yacc.h /tmp/es-build/sql/sql_yacc.yy
/tmp/es-build/sql/sql_yacc.yy:1021.1-12: warning: POSIX Yacc does not support %pure-parser [-Wyacc]
 1021 | %pure-parser                                    /* We have threads */
      | ^~~~~~~~~~~~
/tmp/es-build/sql/sql_yacc.yy:1021.1-12: warning: deprecated directive, use '%define api.pure' [-Wdeprecated]
 1021 | %pure-parser                                    /* We have threads */
      | ^~~~~~~~~~~~
/tmp/es-build/sql/sql_yacc.yy:1028.1-7: warning: POSIX Yacc does not support %expect [-Wyacc]
 1028 | %expect 101
      | ^~~~~~~
/tmp/es-build/sql/sql_yacc.yy: warning: fix-its can be applied.  Rerun with option '--update'. [-Wother]



 Comments   
Comment by Daniel Black [ 2021-03-24 ]

cvicentiu in https://github.com/MariaDB/server/commit/cf2e494bbb9b07f5847fd64cbb9029045c39236f bb-10.6-refactor-limit has snuck a test in through testing with the code change:

sql_yacc.yy:
-%pure-parser /* We have threads */
+%define api.pure /* We have threads */

While some buildbots are failing compiling due to issues unrelated to this one, and indeed bb-10.6-refactor-limit, all of them have passed the stage of bison running.

So it might actually be almost time to do this. Give MDEV-23908 a little more time and if its merged with the above change, passing buildbot, it can be backported without a workaround for older bisons.

Comment by Daniel Black [ 2021-03-27 ]

Notes from another project on bison availability across platforms:

https://savannah.gnu.org/bugs/?55613#comment6

Comment by Anel Husakovic [ 2021-09-13 ]

Hi wlad can you please review the patch https://github.com/MariaDB/server/commit/5f210c381826dafea5012431784866d16240122b
for 10.5+ ?
Additionally there is the second commit related to this topic: https://github.com/MariaDB/server/commit/60f3847b1bcb00c474bc49232c01d8cd4209d816
to generate grammar output files (MYSQL,ORA) in Debug builds which allow better diagnostic of the states. The output files can be used with serg's script https://github.com/MariaDB/mariadb.org-tools/blob/master/serg/y.output-to-html

Comment by Anel Husakovic [ 2021-09-22 ]

Pushed to 10.5 the commit edabb12509fa5a8c.

Generated at Thu Feb 08 09:05:59 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.