Adding support for OR REPLACE, IF NOT EXISTS and IF EXISTS (Pencils down)
Hello All,
Yesterday was the the hard 'pencils down' date for Google Summer of Code'2014. If you have been following my blog, you would know that I had been working on adding support for OR REPLACE, IF NOT EXISTS and DROP...IF EXISTS commands into MariaDB for all objects. MDEV-5359 gives details about the project. This blog post is to summarize the work I have done in last three months.
I started with studying the MariaDB code base. I started off with bazaar and launchpad but immediately moved to github repo as I am more comfortable with git. Also, my projects changes will be applied to MariaDB version 10.1, so it allowed me to switch to github.
After getting into the coding standards and the work flow of the "query execution" in MariaDB in the first week. I picked up the most simple command of them all which required very little code changes (at least this is what I thought at that time), CREATE OR REPLACE DATABASE.
At the end of second week I was all into coding. I thought of writing blog posts every week to keep track of what I do each week and my mentor, Alexander, also gave a thumbs up to that. Believe me, writing blog was the first most important decision I took, this helped me a lot. The response that I got for my blog was also great. Many developers from MariaDB mailing lists joined in and gave their inputs about what should be there in the blog and what should not be there. So, thanks to all of them, my blog got better and better.
Again, making use of the blog that I have written and simplifying my job, following are the links to the work I have done each week starting from first week to the last. Please, visit them all and get yourself acquainted with all the changes that I have made.
CREATE OR REPLACE DATABASE, CREATE USER/ROLE/SERVER IF NOT EXISTS and DROP USER/ROLE IF EXISTS
CREATE PROCEDURE/VIEW IF NOT EXISTS
CREATE TRIGGER/FUNCTION(STORED and UDF) IF NOT EXISTS, DROP FUNCTION(UDF) IF EXISTS
All about bin logging
Fixed MDEV-6409
CREATE OR REPLACE SERVER/TRIGGER
CREATE OR REPLACE PROCEDURE/FUNCTION(STORED)/EVENT
CREATE OR REPLACE FUNCTION(UDF)/USER/ROLE, CREATE DATABASE IF NOT EXISTS and permission checks
Test cases and bug fixes
CREATE OR REPLACE INDEX, Replication test cases and bug fixes
I have also made some changes in the last week which can be checked on my repository. You can find my repository here.
Ending this, I would like to thank everyone for allowing we to work on such an amazing project, and everyone who helped me out, on IRC, on the mailing lists, and everywhere else. :)
Thanks a lot!








