Showing entries 1 to 2
Displaying posts with tag: mysql source code (reset)
Playing with MySQL Source code; Adding “STOP ALL SLAVES” command

This blog post is a result of reading book.
To be clear -> “Expert MySQL” by Charles Bell -> http://www.apress.com/gp/book/9781430246596
This book explain internals of MySQL based on 5.6.x version. So relatively new and really good resource to use.

So the task is:
Chapter 8, “Extending MySQL High Availability” -> page 310, “Extending Replication”.
Where we should add new command -> “SQLCOM_STOP_SLAVES” executed on master and causing to STOP IO_THREAD on all slaves.
The basic idea is to run “STOP ALL SLAVES” on master, which in turn will appear on binary log and then it will applied on slaves.

Great
MySQL version is 5.6.32.

So, as book advice go to sql/lex.h. “We are adding the new symbol for the command. This file contains the symbol array stored in …

[Read more]
MySQL Windows Users – Use Grep to Search MySQL Source Code

For Windows users, if you try searching the MySQL source code for various strings, you know you will often come up empty with the built-in Windows search.

It wasn’t too long ago and I was searching the source for “MALLOC_OVERHEAD”. My Windows search came up empty, and someone suggested I try grep for Windows.

Well, I downloaded it, extracted it to the location I wanted, and added the .exe to the $PATH.

Now I can grep away!

See the new results when searching for “MALLOC_OVERHEAD”:

C:\mysql-5.5\mysql-5.5>grep -r "MALLOC_OVERHEAD" .
./client/mysql.cc:   (longlong) 2*1024L*1024L*1024L, MALLOC_OVERHEAD, 1024, 0},
./client/mysql.cc:   REQUIRED_ARG, 16384, 1024, 512*1024*1024L, MALLOC_OVERHEAD, 1024, 0},
./client/mysqldump.c:   (longlong) 2L*1024L*1024L*1024L, MALLOC_OVERHEAD, 1024, 0},
./client/mysqldump.c: …
[Read more]
Showing entries 1 to 2