MySQL Forums
Forum List  »  InnoDB

How does MySQL still function even though I move .ibd file to arbitrary places?
Posted by: Utku Gultopu
Date: September 12, 2016 02:11PM

I have a table Person. AFAIU, the data for this table is stored in /usr/local/mysql/data/my_database/person.ibd.

Now, I make an insert. Then I check out the contents of person.ibd with vim. The data I have just entered is indeed there.

Then, I move the person.ibd to my home directory. I again make an insert and check out the contents of person.ibd with vim. The new data is inserted into the file even though the file is now in my home directory, instead of being at /usr/local/mysql/data/my_database/person.ibd.

I repeat this action by moving the person.ibd to various other places, such as to /etc/. The new data is always inserted.

So, what's going on? How does this happen? Does MySQL search the whole file system before writing the insert to a file in the file system?

Furthermore:

I open the person.ibd with vim and edit a varchar type field of a record and save the file. Then I run a select but MySQL sees the old data. I exit from MySQL and enter again, but MySQL still sees the old data even though that data does not exist anymore in person.ibd and it is replaced by the new content which I have edited into the person.ibd file using vim.

So again, what's going on?

Options: ReplyQuote


Subject
Views
Written By
Posted
How does MySQL still function even though I move .ibd file to arbitrary places?
1488
September 12, 2016 02:11PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.