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) |
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.
Where/how does InnoDB come in? It was an add-on to 3.23.
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)
Running numbers on InnoDB itself could be kind of interesting though… see how much/little it has expanded over time.
@stewartsmith how much of the 5.6 LOC came from pre-Oracle internal branches though? (probably impossible to measure)
According to http://www.computerwoche.de/a/die-zukunft-von-mysql-gestalten-wir,2533344 MariaDB differs from MySQL 5.5 in more than one million lines of code.
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.
Oh, I’ll also cover MariaDB and the differences between it and MySQL.
Pingback: MariaDB code size | Ramblings
Pingback: Other MySQL branch code sizes | Ramblings
How many in those 1.5 mil lines of code are logic code and how many are test/computer generated code?