[Spacewalk-devel] MySQL porting info

Miroslav Suchý msuchy at redhat.com
Tue Apr 28 10:28:23 EDT 2009


Tom Lane wrote:
> The usual experience AFAIR is that the queries have to be dumbed down to
> the point that they no longer perform well on Oracle (or Postgres),
> because of mysql's crummy optimizer and lack of support for advanced
> join strategies.

Eee, the plan is to *not* touch original code (unless it is dead as Jan 
pointed out).

The plan is to make database proxy, where Spacewalk will connect to this 
db proxy, which will transform queries in runtime and then will handle 
them to mysql, get the data and pass it back to Spacewalk

For example, if spacewalk will execute:
create table rhnActionPackage
(    parameter       varchar2(128) default 'upgrade'
             constraint rhn_act_p_param_ck
     CHECK(parameter IN ('upgrade', 'install')),
);

then proxy will translate it into *2* queries
create table rhnActionPackage
(    parameter       varchar(128) default 'upgrade');
CREATE TRIGGER rhn_act_p_param_ck BEFORE INSERT ON rhnActionPackage
BEGIN
   ....
END
Hmm, as I'm writing this we can rewrite it to use ENUMERATE type.
Anyway. This rewriting can be more complex. So what can not do mysql 
itself, we can probably do in code of db proxy itself.

-- 
Miroslav Suchy
Red Hat Satellite Engineering




More information about the Spacewalk-devel mailing list