[MDEV-7480] [PATCH] Cannot initialize or use raw device as InnoDB File (also on MySQL 5.6.22) Created: 2015-01-19  Updated: 2018-01-03  Resolved: 2018-01-01

Status: Closed
Project: MariaDB Server
Component/s: Storage Engine - XtraDB
Affects Version/s: 10.0.15
Fix Version/s: 10.0.21, 10.1.7, 10.2.0, 10.3.0

Type: Bug Priority: Minor
Reporter: Joshua Ruehlig Assignee: Sergei Golubchik
Resolution: Fixed Votes: 0
Labels: upstream
Environment:

FreeBSD 10.1 amd64



 Description   

I am getting the same error as https://mariadb.atlassian.net/browse/MDEV-6057 but on version 10.0.15. I also tested this with MySQL 5.6.22 and am experiencing the same issue.
This leads me to believe it is specific to the "os_file_get_status" function and FreeBSD.

This works as expected on MariaDB 5.5

My FreeBSD bug report is here.
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=196895



 Comments   
Comment by Elena Stepanova [ 2015-01-23 ]

Hi,

Did you happen to file a bugreport for MySQL (at bugs.mysql.com) as well?

Comment by Joshua Ruehlig [ 2015-01-24 ]

Here it is.
http://bugs.mysql.com/bug.php?id=75616

Comment by Joshua Ruehlig [ 2015-02-03 ]

I found the cause of the issue. FreeBSD doesn't present disks as block devices but instead as character devices.
https://www.freebsd.org/doc/en/books/arch-handbook/driverbasics-block.html

"case S_IFCHR:" should be added directly above or below "case S_IFBLK:" here.
http://bazaar.launchpad.net/~mysql/mysql-server/5.6/view/head:/storage/innobase/os/os0file.cc#L3167

####

What do I need to do to get this fix merged in? Thanks.

Comment by Joshua Ruehlig [ 2015-02-19 ]

Is there anything I can do to get this looked at? I can try patching it and compiling on FreeBSD, it should be pretty easy to do so from ports if you need me to verify the fix I proposed works.

Also this affects linux as well, if a char device is used.

Comment by Sergei Golubchik [ 2015-02-20 ]

In cases like this we generally wait for an upstream bug fix to avoid complex code merges.
Unless upstream refuses to fix the bug, of course.

Comment by Joshua Ruehlig [ 2015-06-24 ]

It looks like this was fixed in mysql 5.6.25
https://github.com/mysql/mysql-server/commit/aee6bc8ed15e14fb2a532cd0ebffa0ec161c0e77
I haven't had a chance to test it yet, but will as soon as the FreeBSD mysql56 port is updated to 5.6.25

When applying this changes to mariadb I think these need to also be applied to the storage/xtradb versions of the files. Finally, I'd very happy if this can be backported to mariadb10.0

Comment by Joshua Ruehlig [ 2015-07-13 ]

I made a PR for the 10.0 branch here. It might also cleanly apply to 10.1
https://github.com/MariaDB/server/pull/85

Comment by Daniel Black [ 2018-01-01 ]

PR merged by jplindst

Generated at Thu Feb 08 07:19:55 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.