Monty: I received your email and am re-posting to the maria developers list. It is truly amazing that maria developers are HAPPY with replication as it stands right now. binary logs, Single SLAVE reading from individual masters, bla-bla-bla..... All the current replication code is like walking on the edge of a cliff, anything goes wrong and the replication process STOPS with an error. And a HUMAN BEING must wake up from their blissful sleep to get the process started again and figure out what happened. And I just LOVE having to: LOCK TABLES; RESET MASTER SET SLAVE OFF; MYSQLDUMP; COPY FILES TO SLAVE; SET MASTER TO 'sql_log_bin=45678945"; SET SLAVE ON; SECONDS BEHIND MASTER... WRITE A THESIS FOR MY PHD IN ROCKET SCIENCE Oh my GOD!!!!!! What an absolute nightmare of a design, it works, just not well. I have not made an in depth study of galera, but I refuse to make replication another research project, replication should be EASY, auto-healing, self analyzing, N-MASTER and with simple source code. I will open source the files that I use to change the MYSQLD daemon. The best way to debug MariaDB on Linux is to run the program in Netbeans 7.1.2. You can even give it command line parameters to work against a currently installed system with the data/conf files in place. Your trace idea is very nice, but there is nothing like STEPPING THROUGH the code in NetBeans/GDB in a nice IDE instead of cryptic command line GDB. Cheers, md On 1/2/2013 5:21 AM, Michael Widenius wrote:
Hi!
A better place to send emails like this is to maria-developers@lists.launchpad.net; That way you can get all MariaDB developers to answer you questions.
"md" == md <md@rpzdesign.com> writes: md> Hello: md> Does anybody know the name(s) of the source files I could find the code md> that processes the Table/Procedure Drop/Create/Update, Alter Table, etc md> statements.
md> I want to intercept these SQL statement calls in mysqld before md> they get sent to the specific storage engine like Aria or Xtradb.
sql_parse.cc proably contains the code you are looking for. Another place to look is in the the current replication code, ie the sql_repl.cc
md> I am working on an asynchronous external replication daemon md> that handles all of the data and structure synchronization md> replication issues (N-master-master, Hot Insert Master additions, DDL md> changes, etc)
Sounds very intersting. Is this a open source project ?
md> This is one of the missing pieces of the puzzle for MariaDB. md> (oh yeah, mysql does not exist to me anymore, only Aria/Xtradb)
:)
md> I need to have the mysqld daemon issue a signal that a structural change md> has taken place and the external replication daemon will pick it up md> and handle all the changes processing across ALL the masters (WITHOUT A md> HUMAN BEING INVOLVED!!!!)
md> I figured I would ask since most of you are fluent in the source md> code and just know where everything is, you would know right away.
That's ok, but best way to get quick responce is to ask on the maria-developers list or at #maria channel on Freenode.
md> I am using MariaDB 5.5.28a from source.
On thing you can do is:
./BUILD/compile-pentium-debug-max mysqld --debug
And then start 'mysql' and execute a CREATE TABLE command.
You can find then find a full trace of all executed functions in: /tmp/mysqld.trace
That's probably one of the best ways to learn how MariaDB works.
See:
https://kb.askmonty.org/en/creating-a-trace-file/
Regards, Monty