[MDEV-21595] typedef offset_t conflicts on AIX Created: 2020-01-29  Updated: 2020-05-21  Resolved: 2020-04-29

Status: Closed
Project: MariaDB Server
Component/s: Storage Engine - InnoDB
Affects Version/s: 10.4.12, 10.2, 10.3, 10.4
Fix Version/s: 10.2.32, 10.3.23, 10.4.13, 10.5.3

Type: Bug Priority: Major
Reporter: Etienne Guesnet Assignee: Eugene Kosov (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Environment:

AIX 7.1


Issue Links:
Problem/Incident
is caused by MDEV-20950 Reduce size of record offsets Closed

 Description   

Hi,
On 10.4.12, a new typedef has been introduced on InnoDB:

storage/innobase/include/rem0types.h:34: typedef short unsigned int offset_t

This typedef conflicts with an AIX typdef

/usr/include/sys/types.h:716: typedef long long int offset_t

It seems a mass substitution of ulint type to offset_t was made between mariadb10.4.11 and 10.4.12.

Thanks,
Etienne.



 Comments   
Comment by Etienne Guesnet [ 2020-01-30 ]

Related to MDEV-20950 and this commit.

Comment by Andy [ 2020-02-04 ]

Same problem on illumos platforms:

storage/innobase/include/rem0types.h:34:28: error: conflicting declaration 'typedef short unsigned int offset_t'
 typedef unsigned short int offset_t;
                            ^~~~~~~~
/usr/include/sys/types.h:242:20: note: previous declaration as 'typedef longlong_t offset_t'
 typedef longlong_t offset_t;
                    ^~~~~~~~

Comment by Elena Stepanova [ 2020-03-07 ]

The change was apparently performed in the scope of MDEV-20950

commit f0aa073f2bf3d8d85b3d028df89cdb4cdfc4002d
Author: Eugene Kosov <claprix@yandex.ru>
Date:   Mon Nov 4 22:30:12 2019 +0300
 
    MDEV-20950 Reduce size of record offsets
 
...

Comment by Etienne Guesnet [ 2020-03-11 ]

I agree (cf first comment).
Replacing offset_t by a more specific name, e.g. innodb_offset_t, would be enough.

Comment by Marko Mäkelä [ 2020-04-27 ]

kevg, could you please perform the following:

perl -i -pe 's/\<offset_t\>/rec_offs/g' $(git grep -w offset_t storage/innobase)

I think that the new type name should be of the same length as the old one, so that we can avoid reformatting any code.

Comment by Robert Bindar [ 2020-04-29 ]

Solved in PR-1491

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