6674 Commits

Author SHA1 Message Date
Stephan Bergmann
4290420215 Make Java-based connectivity drivers work with jvmfwk "direct mode"
...so they work from CppunitTests (which make use of that "direct mode").

Change-Id: I92b72fb708ac1868644111b208f92ac58610ed11
2013-09-16 11:39:24 +02:00
Michael Stahl
fac0354929 translate german comments in sqlbison.y
Change-Id: Ic573e5ae63fdfb3d4ff79eb6d81fe0f4b058d582
2013-09-13 14:56:32 +02:00
Michael Stahl
04e92a626e fix Apple g++ 4.2.1 unused function warning in sqlbison.y
Change-Id: Icc55a6b485341e3be0d3e96f51f41a2bba1629c1
2013-09-13 14:56:32 +02:00
Michael Stahl
3ca5b83368 fix Apple g++ 4.2.1 warning in DBTypeConversion::toDateTime
Change-Id: I467494c1731999c50883f96301b00a3dc1282c73
2013-09-13 14:05:40 +02:00
Lionel Elie Mamane
be3e037b38 setting a table name on an expression/function call makes no sense
Change-Id: Id30805f09bc359c6f66d87f050427c0e586ec93d
2013-09-13 12:08:05 +02:00
Lionel Elie Mamane
974d73d219 remove an arbitrary level of nested parentheses
not only one.

Change-Id: I1f611dda6a98fb6244409c0cd1fc87fc9dfaa8c3
2013-09-13 12:08:04 +02:00
Lionel Elie Mamane
7b4b3ad8c6 Don't clobber argument on failure
Change-Id: I709305d4ec3c37d3fc1c2c911551174f8cfbb883
2013-09-13 12:08:03 +02:00
Andrzej J.R. Hunt
7b12446f34 Fix throwFunctionNotSupportedException.
Would have caused eternal recursion, probably was intended to use
throwGenericSQLException or similar, but throwing the correct
exception is probably cleaner anyway.

Change-Id: Ic4afa623bfcd57eb68ef6cfbf737862fd40eaaa2
2013-09-12 20:01:56 +01:00
Andrzej J.R. Hunt
9f46834fbf Explicitly wrap char as OUString.
Currently this causes some (all?) gcc to break.

Change-Id: If6d802f5a763904d06107fa99731dd4512f18052
2013-09-12 19:57:06 +01:00
Andrzej J.R. Hunt
7a6fd503b1 Remove sal_char* from dbexception and some cleanup.
Change-Id: I81909e4542bd5e8d1f8ae182c3c17f9bbea9745d
Reviewed-on: https://gerrit.libreoffice.org/5881
Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org>
Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
2013-09-12 17:33:02 +00:00
Andrzej J.R. Hunt
4216518982 Update implementations of ColumnLocate::findColumn to throw on invalid column.
Change-Id: I7a9354ecd35a70a005c6c50e38d27de9b33332bd
Reviewed-on: https://gerrit.libreoffice.org/5922
Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org>
Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
2013-09-12 17:26:12 +00:00
Andrzej J.R. Hunt
e31a1b736a Sanitize and quote index identifiers for rebuildIndexes. (firebird-sdbc)
Otherwise firebird won't recognise mixed case index names.

Change-Id: Ib581a592d03b12ad0944375d9eec8da9d680487e
2013-09-11 19:45:31 +01:00
Andrzej J.R. Hunt
bc09772b40 Change of precision is equivalent to type change. (firebird-sdbc)
Change-Id: I5f8c80b01917028fe80d468f5e96de56b917bd7e
2013-09-11 18:40:44 +01:00
Andrzej J.R. Hunt
c461cc8473 Remove redundant comment. (firebird-sdbc)
Change-Id: I17105f474dea07a1a980252309a3ccd88a558db9
2013-09-11 18:40:44 +01:00
Andrzej J.R. Hunt
2a9c0cb864 Remove unnecessary sal_Bool(bool) casting. (firebird-sdbc)
Change-Id: I3d9cf598404d137e0f13667ea8f0dc7be6253f7a
2013-09-11 18:40:44 +01:00
Andrzej J.R. Hunt
00d3a96936 Don't format integers as currency by default. (firebird-sdbc)
Change-Id: I228bb9f5d1121c1e328daa3d677cc54254255beb
2013-09-11 18:40:43 +01:00
Andrzej J.R. Hunt
9ae206996d Ensure we have prepared the statement before modify null.
Currently if the first set* method to be called is setNull, then
we segfault since we try to access m_pInSqlda which doesn't exist
yet.

Change-Id: I4ad9c0a7d68da11b2260a596dd95c4c2cb5bcd4c
2013-09-11 18:40:43 +01:00
Andrzej J.R. Hunt
87bd0c8c8f Reintroduce Statement specific mutexes. (firebird-sdbc)
This replaces the erronous Connection wide mutex. Libfbembed
is multithreaded hence we don't need a connection wide mutex.

Change-Id: Ifae79cdefecfe6597a535e36bda318563092bf6c
2013-09-10 19:52:00 +01:00
Andrzej J.R. Hunt
82abb4ebde Cleanup public parts of Connection a little.
Change-Id: I76b0f9e547ce604aaace129a60c99b0beceac300
2013-09-09 20:54:23 +01:00
Andrzej J.R. Hunt
5b74c6563c Cleanup Connection and rename from OConnection. (firebird-sdbc)
Change-Id: I06cfdc29d7613638d3cea080e7b39c67c74d4de0
2013-09-09 19:52:27 +01:00
Andrzej J.R. Hunt
8c204276a4 Cleanup findColumn. (firebird-sdbc)
Change-Id: I0458892d9688a8618789652caf67251a61cc63aa
Reviewed-on: https://gerrit.libreoffice.org/5884
Reviewed-by: Andrzej J.R. Hunt <andrzej@ahunt.org>
Tested-by: Andrzej J.R. Hunt <andrzej@ahunt.org>
2013-09-09 10:04:45 +00:00
Andras Timar
6ea6a422fb s/wiki.services.openoffice.org/wiki.openoffice.org/g
Change-Id: I059fbee385a109069c70f3869021c8e2ee48fee1
2013-09-07 14:21:22 +02:00
Andrzej J.R. Hunt
0dbe580f0f Some stylistic cleanup in PreparedStatement.
Change-Id: Idaddaeff58fa9433c678e7913435ad81bd615934
2013-09-06 21:27:58 +01:00
Andrzej J.R. Hunt
1e7ce14b7f Use throwFunctionNotSupportedException as appropriate. (firebird-sdbc)
Change-Id: Ia2eb42ea2bf0f70a6d1fef29438a43a7a2f69388
2013-09-06 21:27:57 +01:00
Andrzej J.R. Hunt
79eae295dd Comment out unused parameters instead of (void) cast. (firebird-sdbc)
Firebird doesn't support catalogs or schemas hence these parameters
are unused in the various get[...] methods. Previously these were (void)
casted however commenting out the parameters seems more correct and reduces
the amount of code.

(This was omitted for as-of-yet unimplemented methods since they will still
 be looked at in detail.)

Change-Id: Ic6566ff0b3e873b802deec79d5497efdd21e577d
2013-09-06 21:27:57 +01:00
Andrzej J.R. Hunt
cf9a6e84f5 Implement set[Float|Double]. (firebird-sdbc)
This commit somehow got lost on my old computer, so here it is
recreated.

Change-Id: Ib4001a21c92976fe0e3dea3778360ff67cbfa3a9
2013-09-06 21:27:57 +01:00
Andrzej J.R. Hunt
22576cf6d8 Extend OIndexesHelper::dropObject to use correct DROP INDEX. (firebird-sdbc)
Firebird's DROP INDEX statements only need to contain the index name, including
the table name causes an error.

Change-Id: I5b61d82bda7176148f7849e31bd050e025f84e02
2013-09-06 21:27:57 +01:00
Andrzej J.R. Hunt
08ea5af067 Keep a TempFile instead of using TempFile::CreateTempName.
This ensures that the enclosing directory is kept while we work with
it.

Conflicts:
	connectivity/source/drivers/firebird/Connection.cxx

Change-Id: I5c095d481414e345cf05efc3d40d314f8f40ed12
Reviewed-on: https://gerrit.libreoffice.org/5814
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2013-09-06 19:38:08 +00:00
Andrzej J.R. Hunt
508d1bf7df Use the user specific tmp directory for firebird.
osl::FileBase::getTempDirURL uses the general tmp directory which
can be the system wide directory (i.e. /tmp). This can lead to conflicts
e.g. if we have multiple instances each trying to create /tmp/firebird.

Instead we use ::utl::TempFile which uses a user-specific directory (as a
subdirectory of what osl::FileBase::getTempDirURL provides), in which we
can have the FIREBIRD_TMP and FIREBIRD_LOCK directories.

Change-Id: Ic868f12b0a56900eac75f2418986193dd5fe0f10
Reviewed-on: https://gerrit.libreoffice.org/5797
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2013-09-06 19:33:28 +00:00
Andrzej J.R. Hunt
b991d27d3d CID#1079053 Uncaught Exception.
In this case we can just propagate the DeploymentException (is a
RuntimeException).

Change-Id: Ic807ec039af3856f90d4e798e1304a72421b4db6
2013-09-06 08:41:01 +01:00
Andrzej J.R. Hunt
525bb53ab8 CID#1079054 Uncaught exception.
In this case we should just propagate the DisposedException to the caller.

Change-Id: I3c2699ad6c2144007d98447b133cdbb13f5d50d9
2013-09-06 08:41:01 +01:00
Andrzej J.R. Hunt
f9a7f0340e CID#1079051 Uncaught exception. (firebird-sdbc)
In this case we can just pass the DisposedException (is a RuntimeException)
onto the calling methods.

Change-Id: I89d2421c03a5f8e81f209b94109ffde117cfb0cd
2013-09-06 08:41:00 +01:00
Andrzej J.R. Hunt
ce1006f529 CID#1079048 CID#1079049 CID#1079050 Uncaught exception. (firebird-sdbc)
In this case we can just pass the DisposedException (is a RuntimeException)
onto the calling methods.

Change-Id: Ia85a2d147ed3822847fe64b8cac671c88c6444fe
2013-09-06 08:41:00 +01:00
Andrzej J.R. Hunt
08081fffa0 CID#1079047 Uncaught exception. (firebird-sdbc)
In this case we can just pass the DisposedException (is a RuntimeException)
onto the calling methods.

Change-Id: I379974fd7998151d503020742ae7ae18cbdfaf7c
2013-09-06 08:41:00 +01:00
Andrzej J.R. Hunt
98862b0fde CID#1079045 CID#107946 Uncaught exception. (firebird-sdbc)
In this case we can just pass the DisposedException (is a RuntimeException)
onto the get* methods.

Change-Id: I97a3575709e2f50fa651a5d26c3029ed014630da
2013-09-06 08:41:00 +01:00
Andrzej J.R. Hunt
d153993e87 Add error checking in rebuildIndexes. (firebird-sdbc)
Change-Id: If59c9fe7d7253347717aeb5b1aadf212b7d536a6
2013-09-06 08:41:00 +01:00
Thomas Arnhold
fa1b2554d5 use replaceFirst
Change-Id: Ia20eec6e868579ed31e478514b7f2722a0972094
Reviewed-on: https://gerrit.libreoffice.org/5828
Reviewed-by: Thomas Arnhold <thomas@arnhold.org>
Tested-by: Thomas Arnhold <thomas@arnhold.org>
2013-09-05 16:49:33 +00:00
Caolán McNamara
c2b18aa774 WaE: unused variable
Change-Id: Id360f83149ba281c806e4c71ba283603f4480954
2013-09-05 15:39:12 +01:00
Andrzej J.R. Hunt
748bf45544 Actually use table name in getIndexInfo. (firebird-sdbc)
Otherwise dbaccess's indexcollection gets confused and can segfault
when indexes not belonging to the desired table are returned.

Change-Id: I4dfe62bf1053c65cac907bf490749ee2cc24e6ca
2013-09-06 13:46:50 +01:00
Andrzej J.R. Hunt
2e31c305a3 Actually rebuild indexes in rebuildIndexes. (firebird-sdbc)
Change-Id: I76ac3b261bce830879f17e82ddd22a9f4d957f11
2013-09-06 13:46:49 +01:00
Andrzej J.R. Hunt
4ef1215d6a Retrieve all char indexes for rebuildIndexes. (firebird-sdbc)
This provides the SQL SELECT statement necessary to retrieve all the indexes
needing rebuilding.

Change-Id: I07661277682f83dc3f2d33a398abd83593c9928d
2013-09-06 13:46:49 +01:00
Andrzej J.R. Hunt
17a2a19ca2 Implement getIndexInfo. (firebird-sdbc)
Change-Id: I8c3393fbc7c4fb418f31a80b23360c6c7bf21a25
2013-09-06 13:46:49 +01:00
Caolán McNamara
83d62cad93 CID#1079186 ununinitialized pointer
Change-Id: Ie22e82904dc12f064c3b7d47bce294c5515590de
2013-09-05 12:52:11 +01:00
Caolán McNamara
452584805c CID#1079332 Uninitialized scalar field
Change-Id: I07239ddec7806261fa9098839fd3fc9e5c400594
2013-09-05 12:09:59 +01:00
Tor Lillqvist
5326020f85 WaE: Unreachable code: Use SAL_WNOUNREACHABLE_CODE_PUSH/POP
Cleaner than my first attempt.

This reverts commit aa4868de78b3a3893722f7a079f4d05e18abd8db.

Change-Id: I9c92be72e69292731983a53fc2de29ba333071c9
2013-09-04 15:00:06 +03:00
Tor Lillqvist
aa4868de78 WaE: Unreachable code
Noticed by the MS linker when doing link-time code generation (!). In
all cases, a "return" after a call to a function that always throws an
exception. To avoid other compilers perhaps warning about missing
return of a value, put the "returns" inside ifdefs.

Change-Id: I83aa04cb5c3ff8413d3ed4dc85fb57f2a41fd589
2013-09-04 01:39:26 +03:00
Andrzej J.R. Hunt
76e6c6f3ea Add some comments on foreign key retrieval (firebird-sdbc)
These two methods don't seem to be used at all within the LO codebase.
They are also extremely complicated to implement hence will be left for
later implementation -- my part implementation will be put on the wiki
firebird page.

Change-Id: I72922a4f3c4705fdcc3bbca140d6df64a1e16253
2013-09-03 19:41:34 +01:00
Andrzej J.R. Hunt
868cd24615 Remove outdated/useless comments. (firebird-sdbc)
Change-Id: Iab163debab1513369b75183efdaa3c03f7193a70
2013-09-03 19:41:34 +01:00
Andrzej J.R. Hunt
3a5fa58344 ResultSet: add FunctionNotSupportedException, some cleanup. (firebird-sdbc)
Change-Id: Iee897766841af980d93aeb73255c82851172601a
2013-09-03 19:41:33 +01:00
Marcos Paulo de Souza
1d3483ed27 Remove some unused code from unusedcode.easy
Change-Id: Ic3e96eebbb914c5b905a8c58532ead9cb01dd41d
Reviewed-on: https://gerrit.libreoffice.org/5721
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2013-09-01 09:15:44 +00:00