summaryrefslogtreecommitdiff
path: root/connectivity
AgeCommit message (Collapse)AuthorFilesLines
2019-01-18Fix typoAndrea Gelmini1-1/+1
Change-Id: I80e83c04f3001fefad6cbdffc19ce8e05272dc88 Reviewed-on: https://gerrit.libreoffice.org/66562 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-01-18Base/Mysqlc: fix schemas retrievingJulien Nabet1-1/+1
Change-Id: Ib0bd600aed3c3394890a199d105aff17cd547200 Reviewed-on: https://gerrit.libreoffice.org/66554 Reviewed-by: Lionel Elie Mamane <lionel@mamane.lu> Tested-by: Jenkins
2019-01-17tdf#122516: fix timestamp in MariaDb/mysqlJulien Nabet1-1/+1
Change-Id: I9740e265c7f4c607bf871c5f12df149355ce6a61 Reviewed-on: https://gerrit.libreoffice.org/66495 Reviewed-by: Lionel Elie Mamane <lionel@mamane.lu> Tested-by: Jenkins
2019-01-16New loplugin:emptyStephan Bergmann1-2/+2
Change-Id: I8729db064573ac21dfe6b203c5ae244d79ecc4fe Reviewed-on: https://gerrit.libreoffice.org/66430 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-01-16Fix typoAndrea Gelmini1-1/+1
Change-Id: Ice8631e3a72f7ec0df571419f7766aa343a0191b Reviewed-on: https://gerrit.libreoffice.org/66414 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-01-12tdf#122437 mysqlc: Fix foreign key referencesTamas Bunth1-20/+25
Comparing mysqlc terminology (INFORMATION_SCHEMA) with the description of the XDatabaseMetadata interface: - columns with name "REFERENCED_*" (INF_SCHEMA) should be used for primary key attributes (sdbc terminology). - columns without any prefix (INF_SCHEMA) should be used for primary key attributes (sdbc) Change-Id: Id9780fd86834441485da927f85b9446c40951fcf Reviewed-on: https://gerrit.libreoffice.org/66213 Tested-by: Jenkins Reviewed-by: Tamás Bunth <btomi96@gmail.com>
2019-01-12tdf#122437 mysqlc: consider "types" parameter in..Tamas Bunth1-3/+26
..method XDatabaseMetadata::getTables() so it will return only those types which are needed. This solves the problem that no tables appear in "Relations.." window. Change-Id: Ia02537c78917583f574ad788098c65a9acd43078 Reviewed-on: https://gerrit.libreoffice.org/66212 Tested-by: Jenkins Reviewed-by: Tamás Bunth <btomi96@gmail.com>
2019-01-11Replace OUStringBuffer::appendCopy with append(std::u16string_view)Stephan Bergmann3-6/+16
...which is more general Change-Id: I94f28f8eda887120cf5f143b4549e0339b60e6a7 Reviewed-on: https://gerrit.libreoffice.org/66155 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-01-07Fix typoAndrea Gelmini1-1/+1
Change-Id: I49bf3ddebb45269e803bf2672d29b9337fa99cb3 Reviewed-on: https://gerrit.libreoffice.org/65899 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-01-07tdf#122437 mysqlc: fix foreign key name queryTamas Bunth1-1/+1
Correct query of the foreign key constraint name is required for dropping foreign keys. Change-Id: Id98b0672ec5a8a06039667a06cb0afd97b3ee205 Reviewed-on: https://gerrit.libreoffice.org/65861 Tested-by: Jenkins Reviewed-by: Tamás Bunth <btomi96@gmail.com>
2019-01-04mysqlc: Fix result set metadata related issueTamas Bunth5-68/+124
In order to allow fetching result of multiple result sets at time same time, all the data is fetched and copied on demand from the mysql result set. The mysql result set (MYSQL_RES) is freed afterwards. That means we need a copy of the meta information as well. Now all the meta data is stored in the driver for each result set, so it does not depend on the MYSQL_RES structure anymore. Also add test case for invoking some meta data queries before and after fetching the result set. Change-Id: Ie8bf993926ebe89cd362ab0b311d1f3d164b84df Reviewed-on: https://gerrit.libreoffice.org/65717 Tested-by: Jenkins Reviewed-by: Tamás Bunth <btomi96@gmail.com>
2019-01-04Fix typoAndrea Gelmini1-1/+1
Change-Id: Ic162e36173fb2bfe9c0006d5b608714fa104c541 Reviewed-on: https://gerrit.libreoffice.org/65846 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-01-02Fix typoAndrea Gelmini1-2/+2
Change-Id: Ib3eaaae5fa5a1235e154cb17b5e202d7764d9c45 Reviewed-on: https://gerrit.libreoffice.org/65801 Tested-by: Jenkins Reviewed-by: Jens Carl <j.carl43@gmx.de>
2018-12-31mysqlc: ensure fetched result while invoking lastTamas Bunth1-0/+1
Change-Id: Ia1872973eefff1d8d677aa443b0c03d3ea569d60 Reviewed-on: https://gerrit.libreoffice.org/65716 Tested-by: Jenkins Reviewed-by: Tamás Bunth <btomi96@gmail.com>
2018-12-31Fix typoAndrea Gelmini1-1/+1
Change-Id: I300c411e02e162d11e10ed1bce8152725f5ad52d Reviewed-on: https://gerrit.libreoffice.org/65762 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-12-29Further reduction of OUString copy operationsMatteo Casalin1-6/+5
Change-Id: I79339e7cf8fa6b6a6f19ba598fc66d9e0df558ae Reviewed-on: https://gerrit.libreoffice.org/65669 Tested-by: Jenkins Reviewed-by: Matteo Casalin <matteo.casalin@yahoo.com>
2018-12-29SimplifyMatteo Casalin1-2/+1
Change-Id: I2fd5c9fdab396da7c9117ac7c2f0d26c572c640d Reviewed-on: https://gerrit.libreoffice.org/65670 Tested-by: Jenkins Reviewed-by: Matteo Casalin <matteo.casalin@yahoo.com>
2018-12-28Reduce number of potential OUString copy operationsMatteo Casalin1-7/+3
Change-Id: I45ca5a0b916a42fbf94c370ba5fb3ad3203c43b4 Reviewed-on: https://gerrit.libreoffice.org/65668 Tested-by: Jenkins Reviewed-by: Matteo Casalin <matteo.casalin@yahoo.com>
2018-12-28Use indexed getToken()Matteo Casalin1-5/+7
Change-Id: I30c4a26a5873beca4c0ba88040174dd7b6b8ece4 Reviewed-on: https://gerrit.libreoffice.org/65671 Tested-by: Jenkins Reviewed-by: Matteo Casalin <matteo.casalin@yahoo.com>
2018-12-28Simplify use of indexes in getToken/lastIndexOfMatteo Casalin1-10/+6
Change-Id: Icb275c611dec8427121fea5e197b976a2c1b8166 Reviewed-on: https://gerrit.libreoffice.org/65667 Tested-by: Jenkins Reviewed-by: Matteo Casalin <matteo.casalin@yahoo.com>
2018-12-21tdf#120576 avoid crash during database migrationCaolán McNamara1-2/+2
0xFFFF cast to short turned into -1 so wasn't seen as > 8000 Change-Id: I57592020c3c31751bec43f2619bf65d41ac47e87 Reviewed-on: https://gerrit.libreoffice.org/65538 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-12-21fix evoab2 buildNoel Grandin1-1/+1
after commit d425658bd9fd8e315e4931afb544bc845da0360e Date: Wed Dec 19 16:10:51 2018 +0200 pass OSQLParseNode around by unique_ptr Change-Id: I3b2a294b1157527e3ade32493f319a6959839773
2018-12-21pass OSQLParseNode around by unique_ptrNoel Grandin8-28/+23
Change-Id: I8ffb9e04614472c3645d24bebdc88f91059d12ad Reviewed-on: https://gerrit.libreoffice.org/65436 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-19use unique_ptr in connectivityNoel Grandin7-16/+14
Change-Id: I333a3bc21d4afade6d29f096390b5edbd4e78bf9 Reviewed-on: https://gerrit.libreoffice.org/65403 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-18postgresql: any execute should close previous ResultSetLionel Elie Mamane2-8/+8
not only executeQuery. Change-Id: I2ee72078c48f622484dba46436f53990a45da364
2018-12-18postgresql: correctly implement XMultipleResults interfaceLionel Elie Mamane2-0/+13
note that we implement it in a very limited way, since we will always return only a single result. Change-Id: Idc7927d1a6896b78f6de8627ba857982821ac629
2018-12-14mysqlc: Fix obtaining field information in rsTamas Bunth3-11/+24
Result set field information should be stored correctly. It is queried from database on demand and stored locally. Change-Id: Ia62c62e6db32b45640b9fcd5f48c6249aecc41a2 Reviewed-on: https://gerrit.libreoffice.org/64861 Tested-by: Jenkins Reviewed-by: Tamás Bunth <btomi96@gmail.com>
2018-12-13loplugin:unusedfields in variousNoel Grandin6-15/+0
Change-Id: I4021ba6090bd3f42b0eb5ea1ec9bbf05d1594b35 Reviewed-on: https://gerrit.libreoffice.org/65054 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-10fix cut and paste error in new example in JdbcLongVarCharTest.javaRene Engelhard1-2/+2
Change-Id: I91e568896b1674e97cdf18eacc21538093765bd9
2018-12-10replace hardcoded jdbc mysql driver URL with env variableRene Engelhard1-1/+6
introduce CONNECTIVITY_TEST_MYSQL_DRIVER_JDBC analogous to CONNECTIVITY_TEST_MYSQL_DRIVER for mysqlc Change-Id: I90b14e7145418248de79aa9d4bf4285fd4f98f9d Reviewed-on: https://gerrit.libreoffice.org/64854 Tested-by: Jenkins Reviewed-by: Lionel Elie Mamane <lionel@mamane.lu>
2018-12-09mysql_jdbc: test simultaneously opened result setsTamas Bunth1-0/+51
Change-Id: I413fa17ee0fc264526133eca12ee747d40d6ac6a Reviewed-on: https://gerrit.libreoffice.org/64412 Tested-by: Jenkins Reviewed-by: Tamás Bunth <btomi96@gmail.com>
2018-12-08Remove obsolete SAL_FALLTHROUGH completelyStephan Bergmann9-13/+13
...after 7ffdd830d5fb52f2ca25aa80277d22ea6d89970b "HAVE_CPP_ATTRIBUTE_FALLTHROUGH is always true now" Change-Id: I54e5ff4e036a6bb3e5774d1c0524158aae18e937 Reviewed-on: https://gerrit.libreoffice.org/64800 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-12-08Clean up obsolete uses of BOOST_FALLTHROUGHStephan Bergmann1-5/+0
Change-Id: If391c86c9b2c94eed9b95c692f290449a241ed4e Reviewed-on: https://gerrit.libreoffice.org/64790 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-12-07loplugin:singlevalfields extend to all static varsNoel Grandin3-3/+3
Change-Id: Ic238bb5291539fd1b7e98cb4afc9b25f37e7d528 Reviewed-on: https://gerrit.libreoffice.org/64710 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-06Remove obsolete GCC version checksStephan Bergmann1-1/+1
...after <https://gerrit.libreoffice.org/63951> "Bump (Linux) GCC baseline to 7.0.0". (In some cases, those checks now need to check for __clang__, which was implicitly covered in the past by Clang consistently reporting to be GCC 4.2.1.) Change-Id: I860fef8c4ca41c22a7541f0fb2d34b37d1d69bed Reviewed-on: https://gerrit.libreoffice.org/63952 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-12-05loplugin:unnecessaryparen include more assignmentsNoel Grandin3-3/+3
Change-Id: I9fb8366634b31230b732dd38a98f800075529714 Reviewed-on: https://gerrit.libreoffice.org/64510 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-29Rename Mac OS X to official name macOS in comments and documentationBartosz Kosiorek5-6/+6
Change-Id: I651b7f202fa52ff5f5357a11aa72c43eb7dc7f95 Reviewed-on: https://gerrit.libreoffice.org/64102 Tested-by: Jenkins Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
2018-11-29loplugin:stringconstant look for unnecessary OString constructor useNoel Grandin1-2/+2
and tweak the methods in check.hxx to make them more flexible when called with dc.Class(xxx ? "foo" : "bar") Change-Id: I881fe628f22121ced4d8849715d6b1c92b092da1 Reviewed-on: https://gerrit.libreoffice.org/64207 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-25tdf#120703 PVS: V560 A part of conditional expression is always true/falseMike Kaganski1-1/+1
Change-Id: If173f42302553b164267909a0a3156bb25a6d558 Reviewed-on: https://gerrit.libreoffice.org/63957 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-11-24mysqlc: next() should move cursor from LastTamas Bunth2-3/+16
XResultSet::next() should move cursor when called while cursor is on the last position. It is not documented, but older versions of the mysqlc extension are implemented that way. The cursor goes to the so called afterlast position. Even so, the next() call on the last position should return false. Change-Id: I0fd145c920077151364a6a8c12e05290496b99c8 Reviewed-on: https://gerrit.libreoffice.org/63895 Tested-by: Jenkins Reviewed-by: Tamás Bunth <btomi96@gmail.com>
2018-11-24Build mysql_jdbc library even when building..Tamas Bunth1-2/+2
.. without java Change-Id: Id44ef2d94992423a12b32234822e8ed3f5a48299 Reviewed-on: https://gerrit.libreoffice.org/63889 Tested-by: Jenkins Reviewed-by: Tamás Bunth <btomi96@gmail.com>
2018-11-21improve function-local statics in basic..cuiNoel Grandin10-82/+78
Change-Id: If737e8478f6f1c8fffb060ce132d80e0f07ef8ee Reviewed-on: https://gerrit.libreoffice.org/63701 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-21tdf#42949 Fix IWYU warnings in include/vcl/[B-E]*Gabor Kelemen1-0/+1
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: Iabe571aa8f00492902c499094bea8365a3e17fca Reviewed-on: https://gerrit.libreoffice.org/63623 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2018-11-21Fix getColumnRows function declarationJan-Marek Glogowski1-1/+1
regression from commit 457aba546f43 ("fix some dodgy static vars in connectivity"). Change-Id: I0ab2162d4fa1b09b537c149c4af0f64a2252b64e
2018-11-21connectivity Writer driver: make ProviderRequest members privateMiklos Vajna1-3/+5
And two more trivial readability cleanups. Change-Id: Ie79d9afbdc79260821c27c3f62be3e4635f40395 Reviewed-on: https://gerrit.libreoffice.org/63677 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2018-11-21fix some dodgy static vars in connectivityNoel Grandin5-9/+7
no good reason for these to be static, and likely they will cause trouble if this code is ever touched from multiple threads at the same time Change-Id: I3f29d3795bd1a059a75d0d1ab64b25478fd60121 Reviewed-on: https://gerrit.libreoffice.org/63662 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-17Fix typosAndrea Gelmini1-4/+4
Change-Id: Ic7a29f572ce4c42cc88e5d45ebbb774c4b21aaa0 Reviewed-on: https://gerrit.libreoffice.org/63488 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-11-17Adapt to C++2a char_tStephan Bergmann1-1/+1
u8 literals incompatibly change their type (as implemented by recent Clang trunk) Change-Id: Ia4f7b91f5d86656a056303d2754981ab2093a739 Reviewed-on: https://gerrit.libreoffice.org/63494 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-11-16loplugin:buriedassign in avmedia..cuiNoel Grandin6-18/+40
Change-Id: Id44f1e98a3aac2c417f8030de603175bf68f0dfe Reviewed-on: https://gerrit.libreoffice.org/63467 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-11tdf#120703 PVS: V555Mike Kaganski1-28/+33
V555 The expression 'xBlob->length() - nDataWritten > 0' will work as 'xBlob->length() != nDataWritten'. Calling XBlob::length() only once allows to avoid overhead of acquiring mutex per each iteration. V555 The expression 'xBytes.getLength() - nDataWritten > 0' will work as 'xBytes.getLength() != nDataWritten'. Change-Id: I2e1772fe3af16ac6a6d6f5d2854e84f2fc69ff5f Reviewed-on: https://gerrit.libreoffice.org/63243 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>