After creating  a filter skeleton for our filter, I took a look at the regex filter which I used to implement the methods we earlier defined for our filter skeleton. Much of the code was borrowed from the regex filter. The commits can be found on Github here The Ideas is to have a functional copy of the regex filter which we will modify in the next milestone  to parse SQL Server syntax and replace it with MariaDB variant.
However, I will be writing my end of semester Exams in the upcoming  days so I am not sure of any significant activity on this project during my Exams week.

I Also took a look at the pcre2  Library for regular expession functions. Maxscale rewrites some of these functions as wrappers in server/core/maxscale_pcre2.c. A sample function is :

mxs_pcre2_result_t mxs_pcre2_substitute(pcre2_code *re, const char *subject, const char *replace,
 char** dest, size_t* size)

which is a wrapper function to the invocation of pcre2_substitute for replacing all occurrences of a pattern with the provided replacement and places the end result into @c dest parameter.

It is always good idea to start writing tests early so I equally created a tests directory for our mssqlserverfilter and added a simple test configuration to it for the concatenation syntax.
The Sql server query  for concatenating strings was executed on our virtual machine instance before adding it t the test input file. More test cases will be covered subsequently.
the commits can be found here. and the complete branch here.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s