516 Commits

Author SHA1 Message Date
Peter Melnichenko
6316be8d0f luasql.postres: fix buffer allocation for conn:escape result
`luaL_buffinitsize(L, B, sz)` is equivalent to
`luaL_buffinit(L, B); luaL_prepbuffsize(B, sz)`, not
`luaL_buffinit(L, B); luaL_prepbuffer(B)`.
The latter uses `LUAL_BUFFERSIZE` (8192 by default)
as buffer size, which may be not enough, causing
a segfault.

Additionally, detection of availability of
`luaL_buffinitsize` and `luaL_pushresultsize` was broken:
these functions are not macros, so `#if defined(...)` does not
work. Always use fallback implementations instead; they are
short and the functions are only used once.

Ref #55.
2016-09-16 16:31:48 +03:00
Hisham Muhammad
fb09e52d77 Merge pull request #46 from seanpringle/master
Call PQfinish after PQerrorMessage when connection fails
2016-07-01 20:29:35 -03:00
Tomás Guisasola
4e3038c756 Merge pull request #49 from AMDmi3/patch-1
Use <stdlib.h> instead of deprecated <malloc.h>
2016-06-24 12:51:12 -03:00
Dmitry Marakasov
cc865b3ad4 Use <stdlib.h> instead of deprecated <malloc.h>
Fixes build failure on e.g. FreeBSD
2016-06-24 19:38:07 +04:00
Peter Melnichenko
814d69e551 Merge pull request #48 from andreasbhansen/patch-1
Update docs link in readme
2016-06-23 12:26:12 +04:00
Andreas Biørn-Hansen
491a8c2206 Update docs link in readme 2016-06-23 09:30:23 +02:00
Tomás Guisasola
d4f4c814a9 Rockspec for new release: 2.3.3. 2016-05-16 08:34:59 -03:00
Tomás Guisasola
b7a649ecae Updating docs for new release: 2.3.2. 2016-05-16 08:08:52 -03:00
Tomás Guisasola
88adf029d0 Bug correction: correction on message generation after freeing failed connection pointer. 2016-05-16 08:04:46 -03:00
Sean Pringle
f12bedd987 Call PQfinish after PQerrorMessage when connection fails 2016-05-16 10:08:58 +10:00
Tomás Guisasola
309570578e Rockspec for new version. 2016-05-14 19:35:09 -03:00
Tomás Guisasola
1e984889be Adding credits to bug correction. 2016-05-14 19:26:10 -03:00
Tomás Guisasola
c308c91f39 Updating docs to release 2.3.2 2016-05-14 16:35:27 -03:00
Tomás Guisasola
dac9faf47c Bug correction: freeing memory after failed connection. 2016-05-14 16:29:51 -03:00
Tomas Guisasola
9dd086093e New version: 2.3.1 2016-03-28 09:23:11 -03:00
Tomas Guisasola
4acc737e65 Improvement on compiler requirements from Postgres driver: it does not depend upon dynamic array allocation (which is not supported in all modern C compiler).
Generalizing tests to allow configuration of the database default username.
2016-03-28 09:16:46 -03:00
Hisham Muhammad
25eebb2222 Merge pull request #13 from echiesse/master
Fixed compilation error on function "conn_escape" on Visual Studio 2008.
2016-03-22 00:37:41 -03:00
Eric Chiesse
72cf32d728 Corrected indentation, changed spaces for tabs. 2016-03-21 22:34:52 -03:00
Eric Chiesse
fa8858f4ff Merge remote-tracking branch 'remotes/keplerproject/master' 2016-03-21 22:22:44 -03:00
Hisham
4f5349f1eb In Lua < 5.3, preserve precision of integers up to 2^53. 2016-03-13 20:30:06 -03:00
Hisham Muhammad
6485f4845c Merge pull request #40 from rmarquis/master
updated README
2015-12-06 14:31:33 -02:00
Remy Marquis
01a57fa546 updated README 2015-12-06 12:52:03 +01:00
Tomás Guisasola
b6f8685c18 Moving test of escape function to extensions (since it is not supported by all drivers). 2015-11-30 10:21:19 -02:00
Hisham Muhammad
85b20bb215 Merge pull request #39 from jk77/master
tests/odbc.lua - fixed typo in variable name
2015-11-29 00:59:31 -02:00
jk77
cee9f8c6ba tests/odbc.lua - fixed typo in variable name
Fixed typo in DROP_TABLE_RETURN_VALUE variable name in assert2 statement on line 30.
2015-11-28 18:31:55 -08:00
Scott Morgan
9ddfc9fb1c Improved *nix makefile
Much easier to build drivers now. No need to edit the config file to
switch between driver builds
2015-08-13 18:34:00 +01:00
blumf
fc11132618 Platform agnostic column buffers
Issues with integer sizes differing between 32 & 64-bit archs
2015-07-31 15:34:13 +01:00
blumf
ac557a7fcd Merge pull request #32 from gnarz/master
changes for lua 5.3 compatibility
(checked for 5.1/LuaJIT compatibility too)
2015-05-26 11:30:05 +01:00
Gnarz
051d4305a7 changes for lua 5.3 compatibility 2015-05-08 14:02:20 +02:00
blumf
2b8d0d6045 Firebird needs metadata changes to be committed
Creating and dropping tables, etc. needs to be committed before it's
properly recognised by the Firebird DB engine
2015-04-17 17:48:16 +01:00
blumf
976f58b553 Firebird integer support for Lua 5.3
Firebird driver can recognise and return ints from DB when compiled for
Lua 5.3 and above.

Related to issue #29
2015-03-20 16:24:13 +00:00
blumf
fadd3af5b9 ODBC integer support for Lua 5.3
ODBC driver can recognise and return ints from DB when compiled for Lua
5.3 and above.

Response to issue #29
2015-03-20 16:03:17 +00:00
Hisham Muhammad
54245b1413 Merge documentation updates. 2014-12-11 14:26:28 -02:00
Hisham Muhammad
afa6a3e08f Merge pull request #24 from tst2005/master
Use relative link to doc.css : prevent mixed https/http  content
2014-12-11 12:52:44 -02:00
TsT
1397c87db0 Use relative link to doc.css : prevent from mixed content when the html page is over https 2014-12-11 14:37:47 +01:00
Scott Morgan
260def77db Casting between char and SQLCHAR 2014-08-06 20:07:11 +01:00
Scott Morgan
56bfe3ae61 Using correct type for SQLRowCount call 2014-08-06 18:25:02 +01:00
Hisham Muhammad
87f2017eba Use local doc.css file, suitable for offline reading. 2014-01-29 18:02:39 -02:00
Eric Chiesse
21796ded27 Merge branch 'master' of https://github.com/echiesse/luasql 2013-11-30 23:43:26 -03:00
Eric Chiesse
9f32e62d9b Fixed compilation error on function "conn_escape" on Visual Studio 2008.
Now variable "to" is dynamically allocated to avoid a compilation error when trying to allocate an array on the stack with a non constant expression which is not supported by all C standards.
2013-11-30 23:42:00 -03:00
Eric Chiesse
d9980b040b Corrigido erro de compilação ao tentar compilar a função "conn_escape" no visual studio 2008.
Alocação da variável "to" passa a ser dinâmica para evitar erro de compilação ao usar alocação na pilha (array) com expressão não constante.
2013-11-23 01:34:50 -03:00
Rafis Ganeyev
c3144d7963 MySQL specific: add ping function 2013-10-17 13:21:53 +04:00
Rafis Ganeyev
d929788ff4 MySQL specific: add ability to connect using unix sockets and client flags 2013-10-17 13:21:40 +04:00
Tomas Guisasola
460ec06ef3 Small corrections regarding version 2.3. 2013-09-25 20:54:44 -03:00
Tomas Guisasola
c68dee61a0 Add a line about version 2.3. 2013-09-25 20:50:27 -03:00
Tomas Guisasola
2ee122ad38 Merge branch 'master' of github.com:keplerproject/luasql 2013-09-23 17:55:15 -03:00
Tomas Guisasola
c39aba1079 Bug correction in the implementation of luaL_setfuncs, despite the fact that it doesn't manifest since there are no upvalues. 2013-09-23 17:50:02 -03:00
Tomas Guisasola
1be923325f Removing unnecessary compatibility function definition. 2013-09-17 13:53:53 -03:00
Tomas Guisasola
531ab6a13f Merge branch 'master' of github.com:keplerproject/luasql 2013-08-16 19:48:10 -03:00
Tomas Guisasola
10744ada73 Defining luaL_newmetatable() for Lua 5.0 code. 2013-08-16 19:46:51 -03:00