When an SQL query has comments then those were deleted
when switching to design view. This is fixed and the comments
are maintained. In the case the query is edited in design
view then the comments are inevitably lost.
Change-Id: Ibcf6e36fce88a526c7340d352aca9859b1b3714e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205441
Tested-by: Jenkins
Reviewed-by: Vissarion Fisikopoulos <vfisikop@libreoffice.org>
and
cid#1633780 Initialization or destruction ordering is unspecified
cid#1633778 Initialization or destruction ordering is unspecified
cid#1633777 Initialization or destruction ordering is unspecified
cid#1633776 Initialization or destruction ordering is unspecified
Change-Id: I8ae7cbede6df2ad747fe57d0ac2800e1b6a31038
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175576
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
Add DATEADD function to SQL parser, so the function can be used in
Query's Design and can produce editable queries
Change-Id: I14f9d88f6a96021b0f9199fd79df18c8f4bb5ea3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155071
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Add one of the Firebird's DATEDIFF syntax to the parser so now it is possible to execute DATEDIFF(unit, datetime, datetime) in the
Base Query designer and don't need to execute it in SQL direct anymore
Change-Id: I0514542785c47a2a4693cba26de1815c96ee1b9e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155027
Tested-by: Julien Nabet <serval2412@yahoo.fr>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
since my adaption of i18npool to use OUStringLiteral, this
data structure might get torn down after the i18npool data is
has pointers to.
Change-Id: If83d232d5bfb003ed4dbfb70d47f707a73d2bcc1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153121
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
the only change should be to the two trailing cases in
OSQLParseNode::substituteParameterNames which do seem to leak. The
closest I got to triggering the actual code is toggling into sqlview
mode of a query but couldn't quite construct a sql statement to trigger
it.
Change-Id: I320dc4df3b18a18b236c91ee30329c10001c9a08
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140081
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
bison rule
window_specification:
'(' window_specification_details ')'
{
$$ = SQL_NEW_RULE;
$$->append(newNode("(", SQLNodeType::Punctuation));
$$->append($2);
$$->append(newNode(")", SQLNodeType::Punctuation));
}
;
makes it look like rule "window_specification_details" is a single
node, but in reality it is a sequence of four nodes:
window_specification_details:
opt_existing_window_name
opt_window_partition_clause
opt_order_by_clause
opt_window_frame_clause
;
The result is that only the "opt_existing_window_name" clause was
being put in the parse tree, and the other three were simply
discarded.
Since that will forever be a trap, and this is the only place
where window_specification_details is used, we inline it into
window_specification and remove it.
Change-Id: I568904355174d2bc36155bde1d4dd09f57759cd2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92894
Reviewed-by: Lionel Elie Mamane <lionel@mamane.lu>
Tested-by: Jenkins
regression from
commit d425658bd9
Date: Wed Dec 19 16:10:51 2018 +0200
pass OSQLParseNode around by unique_ptr
We have a OSQLNode being deleted at
connectivity::OSQLParseNodesContainer::clearAndDelete() at
connectivity/source/parse/sqlnode.cxx:2781
connectivity::OSQLParser::parseTree(rtl::OUString&, rtl::OUString
const&, bool)
(this=0x38eba90, rErrorMessage="syntax error, unexpected UNION,
expecting $end", rStatement="CREATE VIEW \"View1\" AS SELECT
\"Tab1\".\"Name\" AS \"Name1\", \"Tab1\".\"Geburtsdatum\" AS
\"Geburtsdatum1\", 1 AS \"MonatZahl1\",
COALESCE(\"Tab1\".\"MonatZaehler\",999) AS \"MonatZaehler1\", 'Januar'
AS \"Monat1\", \"Tab2"..., bInternational=false)
at workdir/YaccTarget/connectivity/source/parse/sqlbison.cxx:10914
namespace)::parseStatement_throwError(connectivity::OSQLParser&,
rtl::OUString const&,
com::sun::star::uno::Reference<com::sun::star::uno::XInterface> const&)
(_rParser=..., _rStatement="CREATE VIEW \"View1\" AS SELECT
\"Tab1\".\"Name\" AS \"Name1\", \"Tab1\".\"Geburtsdatum\" AS
\"Geburtsdatum1\", 1 AS \"MonatZahl1\",
COALESCE(\"Tab1\".\"MonatZaehler\",999) AS \"MonatZaehler1\", 'Januar'
AS \"Monat1\", \"Tab2"..., _rxContext=uno::Reference to
(dbaccess::OSingleSelectQueryComposer *) 0x38eb8d0)
at dbaccess/source/core/api/SingleSelectQueryComposer.cxx:106
and then again at
std::unique_ptr<connectivity::OSQLParseNode,
std::default_delete<connectivity::OSQLParseNode>
>::operator=(decltype(nullptr))
(this=0x38eba90) at connectivity/source/parse/sqlnode.cxx:1500
Change-Id: I292627a06369208e0010743063c7eb5a38921a19
Reviewed-on: https://gerrit.libreoffice.org/77106
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
rtl/string.hxx and rtl/ustring.hxx both unnecessarily #include <sal/log.hxx> (and don't make use of it themselves), but many other files happen to depend on it.
This is a continuation of commit 6ff2d84ade to be able to remove those unneeded includes.
This commit adds missing headers to every file found by:
grep -FwL sal/log.hxx $(git grep -Elw 'SAL_INFO|SAL_INFO_IF|SAL_WARN|SAL_WARN_IF|SAL_DETAIL_LOG_STREAM|SAL_WHERE|SAL_STREAM|SAL_DEBUG')
to directories from connectivity to cui
Change-Id: I9903c10d0a04bbeb93d0f776d1d252b152459499
Reviewed-on: https://gerrit.libreoffice.org/57408
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
(Normally hidden by T_YACCFLAGS containing -l in connectivity/Library_dbtools.mk
suppressing #line directives; some loplugin:cstylecast would remain in bison-
provided expansions of $1 etc. variables.)
Change-Id: Ic93bea0b2fe0ec5f741c4bc41f25cc72fec0498f
Apparently some time before inital CVS import a global
search-and-replace went horribly wrong and added spurious namespace
prefixes everywhere.
Change-Id: I4009bc3ab4b1d4c80412f75ad0e4628a382f99f0