MySQL code size over releases

As the start of a bit of a delve into the various MySQL branches and patch sets that have been around, let’s start looking at the history of MySQL itself. This is how big MySQL has been over all of the major releases since the beginning (where beginning=3.23). (edit: These numbers were all gathered using sloccount and only counting C++ and C source files.)

Codebase LoC (C, C++) +/- from previous MySQL
MySQL 3.23.58 371,987 0
MySQL 4.0.30 368,695 -3,292 (from MySQL 3.23)
MySQL 4.1.24 859,572 +490,877 (from MySQL 4.0)
+174,352 excluding NDB
MySQL 5.0.96 916,667 +57,095 (from MySQL 4.1)
MySQL 5.1.68 1,052,636 +135,969 (from MySQL 5.0)
MySQL 5.5.30 1,189,747 +137,111 (from MySQL 5.1)
MySQL 5.6.10 1,544,202 +354,455 (from MySQL 5.5)
increase in MySQL source code size over version

MySQL code size over major versions

Note the sharp increase in 5.6

LoC Delta for major MySQL release

We can see that MySQL has had some interesting code size changes over time, the big jump in 4.1 over 4.0 was mostly due to the introduction of MySQL Cluster, but even so, it was a big jump.

MySQL 5.6 is the largest MySQL code size increase in a MySQL version ever. The last time we saw anything like this was with the merging of MySQL Cluster in 4.1. At the very least, Oracle is paying people to write lines of code to extent that nobody has before.

10 thoughts on “MySQL code size over releases

  1. Where/how does InnoDB come in? It was an add-on to 3.23.

  2. However the source code was still in the MySQL source tree (at least in BZR it is, I can’t speak for CVS/BitKeeper at the time)

  3. This post just deals with total lines of code size, so it doesn’t take into account modified lines, only how many extra there are. I’ll try and publish something in the future that’s diffstat numbers for the different versions.

  4. Pingback: MariaDB code size | Ramblings

  5. Pingback: Other MySQL branch code sizes | Ramblings

  6. How many in those 1.5 mil lines of code are logic code and how many are test/computer generated code?

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.