Re: [gnome-db] possible bug on oracle sql parsing
- From: Vivien Malerba <vmalerba gmail com>
- To: Andrea Zagli <azagli libero it>
- Cc: gnome-db-list gnome org
- Subject: Re: [gnome-db] possible bug on oracle sql parsing
- Date: Wed, 9 Jan 2013 21:50:57 +0100
On 3 January 2013 17:24, Andrea Zagli
<azagli libero it> wrote:
libgda change the following sql statement
SELECT p.pr_cod_prat, p.pr_prat_num1, p.pr_prat_num2, p.pr_prat_num3,
p.pr_dat_fin, pr.gi_num_provv2, pr.gi_dat_ini,
COALESCE (p.pr_prat_desc || '\n', '') || COALESCE (n.pr_prat_note1, '') || COALESCE (n.pr_prat_note2, '') || COALESCE (n.pr_prat_note3, '') || COALESCE (n.pr_prat_note4, '') AS note,
s.gi_dat_ini AS data_vendita,
r.gi_dat_sca
FROM m1_tabpr_prat p
LEFT JOIN gi_tab_stopr s ON p.pr_cod_prat = s.pr_prat_succ
LEFT JOIN m1_tabpr_note n ON p.pr_cod_prat = n.pr_cod_prat
LEFT JOIN gi_tab_provv pr ON p.pr_cod_prat = pr.pr_cod_prat
LEFT JOIN gi_tab_provril r ON pr.gi_num_provv1 = r.gi_num_provv1
AND pr.gi_num_provv2 = r.gi_num_provv2 AND pr.gi_num_provv3 = r.gi_num_provv3
WHERE p.pr_prat_num1 IN ('AMB', 'IAMB')
AND s.pr_cod_prat IS NULL
AND (pr.gi_num_provv1 = 'AUTAM' OR pr.gi_seq_provv IS NULL)
ORDER BY p.pr_prat_num3, p.pr_prat_num2
removing parenthesis on penultimate line
i'm using libgda from git branch 4.2
Hi!
The problem is not present with the current git's master branch (which will hopefully soon be version 5.2): if you run the example attached program, you'll get the following output which shows the bug is not there:
$ ./test
SELECT
p.pr_cod_prat,
p.pr_prat_num1,
p.pr_prat_num2,
p.pr_prat_num3,
p.pr_dat_fin,
pr.gi_num_provv2,
pr.gi_dat_ini,
(COALESCE ((p.pr_prat_desc || '
'), '') || COALESCE (n.pr_prat_note1, '') || COALESCE (n.pr_prat_note2, '') || COALESCE (n.pr_prat_note3, '') || COALESCE (n.pr_prat_note4, '')) AS note,
s.gi_dat_ini AS data_vendita,
r.gi_dat_sca
FROM m1_tabpr_prat AS p
LEFT JOIN gi_tab_stopr AS s ON ((p.pr_cod_prat = s.pr_prat_succ))
LEFT JOIN m1_tabpr_note AS n ON ((p.pr_cod_prat = n.pr_cod_prat))
LEFT JOIN gi_tab_provv AS pr ON ((p.pr_cod_prat = pr.pr_cod_prat))
LEFT JOIN gi_tab_provril AS r ON (((pr.gi_num_provv1 = r.gi_num_provv1) AND (pr.gi_num_provv2 = r.gi_num_provv2) AND (pr.gi_num_provv3 = r.gi_num_provv3)))
WHERE (p.pr_prat_num1 IN ('AMB', 'IAMB')) AND (s.pr_cod_prat IS NULL) AND ((pr.gi_num_provv1 = 'AUTAM') OR (pr.gi_seq_provv IS NULL))
ORDER BY p.pr_prat_num3 ASC, p.pr_prat_num2 ASC
I suggest you use a more recent version of Libgda.
Regards,
Vivien
Attachment:
bugtester.txz
Description: Binary data
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]