Skip to content

BuildNot yet confirmed elsewhere1 publisher2 min readPublished

A FULLTEXT key turns MariaDB's instant ADD COLUMN into a table rebuild that blocks writes

MariaDB rebuilt a 320 MB table for a plain ADD COLUMN and blocked a write for over 30 seconds when a FULLTEXT key was present, a dev.to test found. An identical table without the index took 60 milliseconds.

The Engineer · Build desk

How we use AISend a correction

Illustration accompanying A FULLTEXT key turns MariaDB's instant ADD COLUMN into a table rebuild that blocks writes
Generated illustration
Two separate ALTERs took longer than one combined Timings from the author's local MariaDB reproduction with two identical tables, one with a FULLTEXT index and one without.

Key figures: in the reproduction, two separate ALTER statements took 177 seconds in total, versus 34 seconds for one combined statement. The change took 60 milliseconds without the FULLTEXT index. Each test table had 200,000 rows.

Two separate ALTERs took longer than one combined
FigureValueNoteClaim
Two separate ALTERs in total, vs 34 for one combined177 seconds16
Change, no FULLTEXT index60 milliseconds10
Rows per test table200,000 rows6

What happened

  • On the larger installs of a news CMS release, the articles table, a few hundred MB, was rebuilt, the release took minutes instead of seconds, and view-counter updates waited.
  • The only difference between the installs that rebuilt and those that finished at once was one line in the table definition: FULLTEXT KEY ft_search (title, body).
  • An in-place alter with LOCK=NONE on the FULLTEXT table returned ERROR 1846, and the server suggested LOCK=SHARED.

Why it matters

  • exposure A table that takes an UPDATE on every page view and carries a FULLTEXT key is exposed, because each visitor holds a connection while the rebuild runs.
  • constraint Development databases will not surface it. With a few hundred rows every ALTER finishes instantly, so only a schema check or an explicit algorithm will.
  • decision Teams with FULLTEXT tables choose between pinning ALGORITHM=INSTANT so the deploy fails fast, and planning the column add as a rebuild with a write stall.
  • cost Every extra ALTER statement on such a table is another full rebuild, so migrations should fold their column adds into one statement.

An ALTER that names no algorithm leaves the choice to the server. The CMS migration was three ADD COLUMN statements with no ALGORITHM clause [4], so the server was free to pick, and on the installs that rebuilt, it did [2]. The post gives MariaDB 10.3 and MySQL 8.0 as the versions where this add is usually instant [1].

The instant path changes metadata only and leaves existing rows physically untouched. Tables with a FULLTEXT index are excluded from it [12]. InnoDB ties each row to its full-text entries through auxiliary tables and a hidden FTS_DOC_ID column [11], so the server rebuilds the table and the full-text index with it. That index rebuild cannot run alongside concurrent writes [12]. The best the server offered was a shared lock [8]: reads continue and writes wait [9].

The author says this is documented behaviour in both MariaDB and MySQL [13]. The reproduction ran on a local MariaDB instance only [6].

The useful part of the test is the probe. Asking for ALGORITHM=INSTANT explicitly succeeded on the plain table and failed with ERROR 1845 on the FULLTEXT one [7]. A statement carrying that clause cannot turn into a rebuild without telling you. We would put it on every migration that is meant to be instant. The post shows the error on a 200,000-row table [6]. We'd expect the same refusal on a small development table, since it concerns the operation and not the row count, but the post does not test that.

Treat the timings as one laptop's, run with nothing else on it [10]. The author says numbers will differ on other hardware [17]. For the stall to transfer, your table has to be large enough that a rebuild takes real time, and something has to write to it on the hot path. The production table was a few hundred MB and the release took minutes [2], the same size class as the 320 MB test table [6]. The write was the counter update on every article page [5].

Batching shows an odd number. Two separate statements took 177 seconds against 34 for one combined statement [16], a ratio of about 5.2 [18]. Counting rebuilds alone, two against one predicts 2x [19]. The post does not explain the gap, and it is a single run. Production had three statements, each a full rebuild [15], and the fix was one ALTER carrying all three ADD COLUMN clauses [15].

What to watch

  • A repeat of the test on MySQL 8.0, which the post says behaves the same way but did not run.
  • Timings on server hardware for the 177 seconds versus 34 seconds comparison, which the post reports from a single laptop run.
  • Whether the CMS project's migration tooling adds an explicit ALGORITHM clause or a pre-flight FULLTEXT check.

Clarity's read

What the record supports and how the coverage leans. The claims behind it follow.

Reality

Evidence62
Adoption
Insufficient
Hype gap−5
Incentives
Insufficient
Confidence65
Why these scores

Claim ledger

Ranked by verification strength, evidence, and original report placement.

  1. [1]

    On MariaDB 10.3+ and MySQL 8.0+, adding a nullable column to an InnoDB table is usually an instant operation: a metadata change with no data copied.

    ReportedSupportedView cited source
  2. [2]

    On the larger installations of a news CMS release, the articles table (a few hundred MB) was rebuilt from scratch, the release took minutes instead of seconds, and every page view that tried to bump a view counter waited until the rebuild finished.

    ReportedSupportedView cited source
  3. [3]

    The difference between the installations that finished instantly and those that rebuilt was one line in the table definition: FULLTEXT KEY ft_search (title, body).

    ReportedSupportedView cited source

Sources

1 independent publisher whose own reporting we read for this story.

  1. dev.to

    1 article · October 12, 2026

    Instant ADD COLUMN, Until a FULLTEXT Index Shows Up: A MariaDB Migration That Froze Writes

Share your take

Let Clarity write the post for you.

Signed-in readers get a short post drafted on this story in the register they choose — narrative, analytical, or a direct position — editable to the last word before it goes anywhere. The share buttons at the top of this story work without an account.

Topics and entities

Follow any of these and your For You feed starts watching them — no settings page required.

Topics

Loading related stories