[MDEV-20972] `or` alterative operator breaking windows build Created: 2019-11-04 Updated: 2019-11-22 Resolved: 2019-11-22 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Server |
| Affects Version/s: | 10.4 |
| Fix Version/s: | 10.4.11 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Seth Shelnutt | Assignee: | Anel Husakovic |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Windows 10, vs 2015 |
||
| Issue Links: |
|
||||||||
| Description |
|
Commit b44171428ab2ea25db82f7cd27349e67812e4921 introduced the `or` operator in sql/item_subselect.cc:126 . This has caused us some problems with building on windows with vs2015. I searched the code base and could not find another use of `or` as the alternative operator. I propose removing the user of `or` and using the traditional `||`. I'll push a PR against 10.4 shortly to address this. |
| Comments |
| Comment by Anel Husakovic [ 2019-11-21 ] |
|
Hi Shelnutt2, |
| Comment by Seth Shelnutt [ 2019-11-21 ] |
|
Hello @Anel Husakovic . We are building in release mode, I did not try debug mode but it doesn't appear the code is wrapped in any preprocessors to change debug vs release build. While the Microsoft docs say that the `/Za` flag should allow the `or` operator this compile flag did not effect the build. Since there was no other use of the or operator in the entire MariaDB codebase I pushed the patch to replace it with `||`. |
| Comment by Anel Husakovic [ 2019-11-21 ] |
|
Yes Seth, I have seen, will check some further tests and let you know soon. |