Questions tagged [innodb]

InnoDB : MySQL's ACID-compliant Storage Engine

InnoDB is the ACID-compliant Storage Engine used in MySQL. InnoDB also features the use for MVCC (Multiversion Concurrency Control) to support Transaction Isolation Levels for InnoDB. InnoDB is not a standalone database product. It has been distributed as a part of the MySQL database during its early years of InnoBase Oy as a partner with MySQL AB.

In the early days of MySQL, InnoDB was made available to MySQL as an additional transactional storage along with BDB. The company that developed InnoDB, InnoBase Oy, was purchased by Oracle in October 2005. Percona has contributed great improvements to its own Open Source version of InnoDB (XtraDB). Oracle, who eventually became the owner of MySQL via purchasing Sun, has incorporated most of those changes into InnoDB, as well adding improvements of their own. As a result, InnoDB has transformed into a more mature storage engine that handles mulitprocessing and multithreading more robustly. As of December 2010, InnoDB has become the default storage engine for MySQL 5.5.

MySQL 5.5 also has enhancements to facilitate InnoDB in engaging multiple CPUs. Those enhancements were introduced in MySQL 5.1.38 in the InnoDB Plugin only. Those enhancements have now been included with MySQL 5.5.

MySQL 5.5 also comes with new features such as Semisynchronous Replication, Multiple InnoDB Buffers Pools, plugins for user-defined authentication, performance metrics instrumentation, and more !!!

In a recent Oracle press release, one of the new features for MySQL 5.6 is to have InnoDB with FULLTEXT searching. This will be a major step forward for this storage engine as this was one of the most requested and sought after features.

The basic infrastructure of InnoDB centers around three major files

  • ibdata1, or System Tablespace (See InnoDB Architecture)
  • ib_logfile0 (See InnoDB Architecture)
  • ib_logfile1 (See InnoDB Architecture)

In conjunction with memory structures, ibdata1 processes info for 6 basic data structures

  • Table Data Pages
  • Table Index Pages
  • Table MetaData (List of Tablespace IDs + Misc Info)
  • MVCC Records
    • Rollback Segments
    • Undo Space
  • Double Write Buffer (Allows Background Page Writes)
  • Insert Buffer (For Collecting/Processing Changes to Secondary Indexes)

InnoDB Architecture

InnoDB Architecture

InnoDB Configurations can accommodate the following

  • Separating Table Data and Index Pages from the System Tablespace
  • Storing the System Tablespace in a Raw Disk Partition
  • Creating Multiple System Tablespace Files
  • Creating Multiple Log Files
  • and more...

There is important cache known as the InnoDB Buffer Pool. As of MySQL 5.5, you can configure multiple buffer pool instances. Prior to MySQL 5.5, there is only one buffer pool instance.

24 questions
35
votes
3 answers

MySQL InnoDB lost tables but files exist

I have a MySQL InnoDB which has all the database table files, but MySQL doesn't see them, and isn't loading them. The problem happened because I deleted these three files: ibdata1, ib_logfile0 and ib_logfile1 because I was having issues with mysql…
21
votes
3 answers

Cannot start mysql: InnoDB: Upgrade after a crash is not supported

I am trying to run MySQL from a Homebrew installation, but it keeps failing when trying mysql.server start. My /usr/local/var/mysql/.local.err reads as so, and keeps sending this error message every few seconds. 2018-06-20T20:38:54.6NZ…
rib3ye
  • 1,214
8
votes
2 answers

How to fix MariaDB when it gets stuck during shutdown (Waiting for page_cleaner)?

I am running MariaDB (v 10.3.13) on Arch Linux (Manjaro). It worked normally for the last months but now there are some issues. When I try to reboot the computer, it gets stuck at A stop job is running for MariaDB 10.3.13 database server The time…
jost21
  • 857
4
votes
2 answers

Can't start mysql (xampp) after installing on external drive

I decided to move my XAMPP installation to external drive. It's USB3 3TB Seagate drive. Unfortunately mysql doesn't want to start. All works fine if I install XAMPP to C drive but doesn't work when I try the same on external drive. I uninstalled and…
Klikerko
  • 171
3
votes
1 answer

How to find whether mysql database my key_buffer and innodb_buffer_pool contending

Server infrastructure: I'm having a centos server running nginx + wordpress + mysql. Problem: mysql frequently getting shutodown and wordpress showing the "cannot connect to database" alerts. Problem found: Seems the problem was due to…
MohanBabu
  • 143
2
votes
1 answer

MYSQL fails with: InnoDB: Operating system error number 30 in a file operation

My MYSQL server has been stopping recently about once a week. It requires a reboot to get is working again. But once its rebooted, it will work again for another week or two. The error in question is number 30. According to url in the error log…
Jon
  • 123
2
votes
0 answers

Loading an SQL dump is slow

note: I initially asked this question on stackoverflow, but was told superuser would be a better place for it. I'm having performance issues while loading an sql dump into a new schema on my development machine: Creating the dump is quite fast…
1
vote
1 answer

XAMPP on external 4 TB USB 3.0 drive not working as expected

I can't seem to start MySQL on my external USB 3.0 drive. In the past, I haven't had problems working off of external drives. This is the first time using a large drive. Any help will be appreciated. Thank you. This is from my error log. 130718…
s_p
  • 315
1
vote
2 answers

Mysql InnoDB Disabled

I have modified the my.cnf for a MySQL 5 installation and now I receive the following error in syslog: InnoDB: Error: log file ./ib_logfile0 is of different size 0 5242880 bytes InnoDB: than specified in the .cnf file 0 268435456 bytes! [ERROR]…
James
  • 153
1
vote
0 answers

Rollbacks in transactional DDL statements for innodb in MySQL 8.0

System: MySQL 8.0, Storage engine - Innodb In a given scenario, I obtain an explicit transaction in application layer, and run some DDL and DML statements. If tx fails, I roll-back it. But only DML statements roll-back. Do I need to explicitly…
uzumas
  • 111
1
vote
0 answers

Restoring InnoDB-Table does not work

i have some issue while restoring data from ibd and ibdata-file. I had worked with these instructions, Recovering A Corrupt MySQL Database and it worked fine until I took a look at the data. The problem is that a database has crashed and two of…
1
vote
1 answer

Is it possible or desirable to run MySQL without any MyISAM tables?

We would like to avoid using MyISAM tables because they don't support transactions. However, I've noticed that many internal tables in MySQL use MyISAM. I can get a list like this: select table_name from information_schema.tables where engine =…
0
votes
2 answers

innodb buffer pool size and munin

I was looking at the below graph of one of my db server's memory usage and have the following question. Is the mysql innodb buffer pool included in the apps or the cache memory allocation? Right now I know we've got 12300 MB allocated to the…
Josh
  • 41
  • 2
0
votes
1 answer

Why there is always a tilde (~) sign in the result message in mysql

Whenever I refresh or search anything in the table in mysql, the result message always shows result like this. Showing rows 0 - 10 ( ~11 total , Query took 0.0004 sec) When it is showing the exact number of rows why it is always show a "~" sign…
Waseem
  • 223
0
votes
2 answers

MySQL server stopped working

Yesterday, out of the blue, the MySQL working as a backend for my private postfix server stopped working. No log entries, nothing, it just won't start. I reinstalled it and it worked until I copied the origanl databases to /var/lib/mysql. To be more…
mcandril
  • 123
1
2