Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.0.3
-
None
-
Ubuntu/Precise/LXContainer
Description
Weve got two tables accessing a my.cnf file.
The table mycnf accesses /etc/mysql/my.cnf this file belongs to root, so MySQLd is not able to change anything. The second mycnf2 is a file in the test schema belonging to mysql:mysql.
CREATE TABLE `mycnf` ( |
`section` char(20) DEFAULT NULL `flag`=1, |
`keyname` char(20) DEFAULT NULL `flag`=2, |
`value` char(200) DEFAULT NULL |
) ENGINE=CONNECT DEFAULT CHARSET=latin1 `table_type`=ini `file_name`='/etc/mysql/my.cnf' `option_list`='layout=Row' ; |
 |
CREATE TABLE `mycnf2` ( |
`section` char(20) DEFAULT NULL `flag`=1, |
`keyname` char(20) DEFAULT NULL `flag`=2, |
`value` char(200) DEFAULT NULL |
) ENGINE=CONNECT DEFAULT CHARSET=latin1 `table_type`=ini `file_name`='my.cnf' `option_list`='layout=Row'; |
Lets work with mycnf2:
MariaDB [test]> select * from mycnf2 where section='mysql'; |
+---------+----------------------+-------+ |
| section | keyname | value | |
+---------+----------------------+-------+ |
| mysql | #no-auto-rehash # fa | | |
+---------+----------------------+-------+ |
MariaDB [test]> insert into mycnf2 values('mysql','user','erkan'); |
Query OK, 1 row affected (0.00 sec)
|
MariaDB [test]> select * from mycnf2 where section='mysql'; |
+---------+----------------------+-------+ |
| section | keyname | value | |
+---------+----------------------+-------+ |
| mysql | #no-auto-rehash # fa | | |
| mysql | user | erkan | |
Ok everything worked. Now lets work with mycnf (/etc/mysql/my.cnf)
MariaDB [test]> select * from mycnf where section='mysql'; |
+---------+----------------------+-------+ |
| section | keyname | value | |
+---------+----------------------+-------+ |
| mysql | #no-auto-rehash # fa | | |
+---------+----------------------+-------+ |
MariaDB [test]> insert into mycnf values('mysql','user','erkan'); |
Query OK, 1 row affected (0.00 sec)
|
The same output as for mycnf2
MariaDB [test]> select * from mycnf where section='mysql'; |
+---------+----------------------+-------+ |
| section | keyname | value | |
+---------+----------------------+-------+ |
| mysql | #no-auto-rehash # fa | | |
+---------+----------------------+-------+ |
1 row in set (0.00 sec) |
I would expect an error if MySQL/ConnectSE is not able to perform the task because of insufficient permissions on filesystemlevel.
Regards
Erkan