sqlrelay-discussion Mailing List for SQL Relay (Page 41)
Brought to you by:
mused
You can subscribe to this list here.
| 2005 |
Jan
|
Feb
(20) |
Mar
(27) |
Apr
(17) |
May
(32) |
Jun
(45) |
Jul
(49) |
Aug
(68) |
Sep
(44) |
Oct
(29) |
Nov
(64) |
Dec
(25) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2006 |
Jan
(61) |
Feb
(22) |
Mar
(25) |
Apr
(31) |
May
(18) |
Jun
(28) |
Jul
(19) |
Aug
(16) |
Sep
(8) |
Oct
(17) |
Nov
(32) |
Dec
(4) |
| 2007 |
Jan
(20) |
Feb
(25) |
Mar
(5) |
Apr
(12) |
May
(11) |
Jun
(18) |
Jul
(16) |
Aug
(22) |
Sep
(37) |
Oct
(20) |
Nov
(11) |
Dec
(2) |
| 2008 |
Jan
(11) |
Feb
(33) |
Mar
(12) |
Apr
(18) |
May
(22) |
Jun
(31) |
Jul
(23) |
Aug
(6) |
Sep
|
Oct
(10) |
Nov
(22) |
Dec
|
| 2009 |
Jan
(12) |
Feb
(8) |
Mar
(11) |
Apr
(20) |
May
(18) |
Jun
(7) |
Jul
(27) |
Aug
(2) |
Sep
(10) |
Oct
(5) |
Nov
(2) |
Dec
(1) |
| 2010 |
Jan
(11) |
Feb
(18) |
Mar
(10) |
Apr
(28) |
May
(28) |
Jun
|
Jul
(27) |
Aug
(9) |
Sep
(21) |
Oct
(2) |
Nov
(2) |
Dec
(11) |
| 2011 |
Jan
|
Feb
(2) |
Mar
(4) |
Apr
(2) |
May
(2) |
Jun
(44) |
Jul
(9) |
Aug
(2) |
Sep
(12) |
Oct
(7) |
Nov
(11) |
Dec
(7) |
| 2012 |
Jan
(5) |
Feb
|
Mar
(9) |
Apr
(9) |
May
(12) |
Jun
|
Jul
(13) |
Aug
(3) |
Sep
(3) |
Oct
(1) |
Nov
(1) |
Dec
(10) |
| 2013 |
Jan
(21) |
Feb
(3) |
Mar
(4) |
Apr
|
May
(3) |
Jun
(2) |
Jul
(3) |
Aug
(3) |
Sep
(3) |
Oct
|
Nov
|
Dec
(4) |
| 2014 |
Jan
(7) |
Feb
|
Mar
(1) |
Apr
|
May
(2) |
Jun
|
Jul
(4) |
Aug
(2) |
Sep
|
Oct
(1) |
Nov
|
Dec
|
| 2016 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2017 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2018 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2021 |
Jan
|
Feb
|
Mar
|
Apr
(3) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2022 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: David M. <dav...@fi...> - 2006-06-29 14:43:11
|
Thanks, I'll update the page. Dave dav...@fi... On Wed, 2006-06-28 at 15:43 +0900, seong hoon park wrote: > Hi. > > In the page http://sqlrelay.sourceforge.net/download.html, > the instruction of CVS access : > > --------------------------- > CVS Access: > To download SQL Relay from CVS, run these commands: > > export > CVSROOT=:pserver:ano...@cv...:/cvsroot/sqlrelay > cvs login > cvs checkout sqlrelay > ----------------------------- > > is now incorrect. > > I was only able to check out your moudle > from :pserver:ano...@sq...:/cvsroot/sqlrelay > as mentioned at > http://sourceforge.net/docman/display_doc.php?docid=29894&group_id=1#connection > > cvs.sourceforge.net is now denying access to port 2401 (pserver) > > > > > > > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > Sqlrelay-discussion mailing list > Sql...@li... > https://lists.sourceforge.net/lists/listinfo/sqlrelay-discussion |
|
From: seong h. p. <seo...@gm...> - 2006-06-28 06:43:50
|
Hi. In the page http://sqlrelay.sourceforge.net/download.html, the instruction of CVS access : --------------------------- *CVS Access:* To download SQL Relay from CVS, run these commands: export CVSROOT=:pserver:anonymous@*cvs.sourceforge.net*:/cvsroot/sqlrelay cvs login cvs checkout sqlrelay ----------------------------- is now incorrect. I was only able to check out your moudle from :pserver:anonymous@*sqlrealy** .cvs.sourceforget.net*:/cvsroot/sqlrelay as mentioned at http://sourceforge.net/docman/display_doc.php?docid=29894&group_id=1#connection cvs.sourceforge.net is now denying access to port 2401 (pserver) |
|
From: David M. <dav...@fi...> - 2006-06-26 14:34:27
|
Cool, glad you were able to figure it out. Dave dav...@fi... On Mon, 2006-06-26 at 13:17 +0200, Davide Corio wrote: > Il giorno lun, 26/06/2006 alle 12.12 +0200, Davide Corio ha scritto: > > Hi there, > > I have a serius problem querying a SQLServer 2000 (with latin1 encoding) > > > > sqlrelay (via query command or python module) show a question mark > > instead of every accented character. > > Sorry...it was a freetds issue > > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > Sqlrelay-discussion mailing list > Sql...@li... > https://lists.sourceforge.net/lists/listinfo/sqlrelay-discussion |
|
From: Davide C. <dav...@re...> - 2006-06-26 11:51:56
|
Il giorno lun, 26/06/2006 alle 12.12 +0200, Davide Corio ha scritto: > Hi there, > I have a serius problem querying a SQLServer 2000 (with latin1 encoding) >=20 > sqlrelay (via query command or python module) show a question mark > instead of every accented character. Sorry...it was a freetds issue --=20 >=20 > Davide Corio dav...@re... > Redomino S.r.l. C.so Monte Grappa 90/b - 10145 Torino - Italy > Tel: +39 011 19502871 - Fax: +39 011 19791122 - http://www.redomino.com/ |
|
From: Davide C. <dav...@re...> - 2006-06-26 10:12:57
|
Hi there, I have a serius problem querying a SQLServer 2000 (with latin1 encoding) sqlrelay (via query command or python module) show a question mark instead of every accented character. Is there a solution? --=20 Davide Corio dav...@re... Redomino S.r.l. C.so Monte Grappa 90/b - 10145 Torino - Italy Tel: +39 011 19502871 - Fax: +39 011 19791122 - http://www.redomino.com/ |
|
From: <mac...@co...> - 2006-06-22 11:43:44
|
Hi
We've found serious problem with SQLRelay.
It doesn't support large numbers (at last with
Oracle and python).
Try this structure in OracleDB (I've used
free Oracle Express edition):
-------------------------------
CREATE TABLE "TNUMBERS"
( "ID" NUMBER,
"NUMBER1" NUMBER(20,2),
"NUMBER2" NUMBER(20,2),
CONSTRAINT "TNUMBERS_PK" PRIMARY KEY ("ID") ENABLE
)
/
insert into tnumbers (id, number1, number2)
values (1, 143393735125.58, 9999999999999.04)
insert into tnumbers (id, number1, number2)
values (2, 143393735125.58, 9999999999999.05)
insert into tnumbers (id, number1, number2)
values (3, 999999999999999999.04, 999999999999999999.05)
insert into tnumbers (id, number1, number2)
values (4, 999999999999999.04, 999999999999999.05)
-------------------------------
In Python I get the result as ('%f' used):
1.0 143393735125.579987 9999999999999.039062
2.0 143393735125.579987 9999999999999.050781
3.0 1000000000000000000.000000 1000000000000000000.000000
4.0 999999999999999.000000 999999999999999.000000
So it is incorrect.
There are two problems we've found.
First is the problem with range of C datatypes used
by SQLRelay for numbers and second is the problem
with float data type in Python which fails with more
than 13 digits:
>>> a = 99999999999999.04
>>> b = 99999999999999.05
>>> a
99999999999999.047
>>> b
99999999999999.047
I'm not sure what can/should be done with this.
AFAIR largest numeric type in C is long double
and (depending on compiler) it is 15 digits long.
We need to have 20.2 numbers...
I think the good solution is implemented in psycopg2.
PostgreSQL 'money' types are returned as python's
Decimal data type (availaible in python2.4 and with
addition of decimal.py file in python2.3 too) which
can support such a large numbers, but is different
than float, eg.:
>>> import decimal
>>> a = decimal.Decimal('12.23')
>>> a + 1.0
Traceback (most recent call last):
File "<stdin>", line 1, in ?
TypeError: unsupported operand type(s) for +: 'Decimal' and 'float'
In DCOracle2 we've changed it's source to make it always
return Decimal (never float from database). I think
the better is to be able to customize returned data
type somewhere in connection parameters. Any
other ideas/solutions?
--
Maciej Wisniowski
|
|
From: David M. <dav...@fi...> - 2006-06-22 03:38:47
|
Cool, thanks!
I'll roll this into 0.38 as well and it'll be in CVS tonight or
tomorrow.
Dave
On Mon, 2006-06-19 at 12:53 -0700, Devananda wrote:
> I've made a minor change to the mysql connector -- more of a hack really
> -- to allow a result set to be returned by stored procedures. I'm sure
> there is a better way to do it, since this "quick-fix" only handles the
> first result set returned, and procedures can return many result sets.
> However, this covers all my needs (for now)... Hope it helps someone else!
>
> The two changes as follows, to the connections/mysql/mysql.C file:
>
> First, tell MySQL that we can process multi_result sets...
>
> lines 73-85, reordered to set CLIENT_MULTI_RESULT if MYSQL_VERSION_ID > 5000
> > #if MYSQL_VERSION_ID < 32200
> > if (!mysql_real_connect(&mysql,hostval,user,password,
> > portval,socketval,0)) {
> > #else
> > // initialize database connection structure
> > if (!mysql_init(&mysql)) {
> > fprintf(stderr,"mysql_init failed\n");
> > return false;
> > }
> > #if MYSQL_VERSION_ID < 50000
> > if (!mysql_real_connect(&mysql,hostval,user,password,dbval,
> > portval,socketval,0)) {
> > #else
> > if (!mysql_real_connect(&mysql,hostval,user,password,dbval,
> > portval,socketval,CLIENT_MULTI_RESULTS)) {
> > #endif
> > #endif
> Second, make sure we do NOT leave any result sets trailing around.
>
> function def. on line 855, inserted "#if MYSQL_VERSION_ID..." block:
> > void mysqlcursor::cleanUpData(bool freeresult, bool freebinds) {
> > #ifdef HAVE_MYSQL_STMT_PREPARE
> > if (!mysqlconn->fakebinds) {
> > if (freebinds) {
> > bindcounter=0;
> > rawbuffer::zero(&bind,sizeof(bind));
> > mysql_stmt_reset(stmt);
> > }
> > if (freeresult) {
> > mysql_stmt_free_result(stmt);
> > if (mysqlresult) {
> > mysql_free_result(mysqlresult);
> > mysqlresult=NULL;
> > }
> > }
> > } else {
> > #endif
> > if (freeresult && mysqlresult!=(MYSQL_RES *)NULL) {
> > mysql_free_result(mysqlresult);
> > mysqlresult=NULL;
> > }
> > #if MYSQL_VERSION_ID > 50000
> > whlie(!mysql_next_result(&mysqlconn->mysql)) {
> > mysqlresult=mysql_store_result($mysqlconn->mysql);
> > mysql_free_result(mysqlresult);
> > mysqlresult=NULL;
> > }
> > #endif
> > #ifdef HAVE_MYSQL_STMT_PREPARE
> > }
> > #endif
> > delete[] columnnames;
> > columnnames=NULL;
> > }
>
>
> _______________________________________________
> Sqlrelay-discussion mailing list
> Sql...@li...
> https://lists.sourceforge.net/lists/listinfo/sqlrelay-discussion
>
|
|
From: David M. <dav...@fi...> - 2006-06-22 03:30:31
|
Hmm, there isn't a way. I should probably add a query that returns it or something. I'll make sure to do that for 0.38. On Tue, 2006-06-20 at 12:45 +0200, Alex wrote: > Hi, i'm woring with last sqlrelay+sqlite3+php > > How i can't get the last insert id > _______________________________________________ > Sqlrelay-discussion mailing list > Sql...@li... > https://lists.sourceforge.net/lists/listinfo/sqlrelay-discussion |
|
From: David M. <dav...@fi...> - 2006-06-22 03:25:16
|
I recently (since the last prerelease) updated the mysql code to only use mysql_stmt_prepare for certain queries and use the older style code for others. So far, it only uses the older style code for create/drop procedures statements, but I'll update the list. Dave On Wed, 2006-06-21 at 13:17 -0700, Devananda wrote: > The problem seems to be line 260 in > connections/mysql/mysqlconnection.C: > > return !mysql_stmt_prepare(stmt,query,length); > > and the assumption that all queries can be run as prepared statements. > I looked briefly in the other connectors, and I see the same treatment > of queries (prepare them all). However, according to the MySQL > documentation, this can't be done for 5.0 :( > > See > http://dev.mysql.com/doc/refman/5.0/en/c-api-prepared-statements.html : > The following statements can be used as prepared statements: > CREATE TABLE, DELETE, DO, INSERT, REPLACE, SELECT, SET, > UPDATE, and most SHOW statements. Other statements are not > supported in MySQL 5.0. > > Regards, > Devananda > > > > Devananda wrote: > > This is particularly odd, I think.... > > > > I've compiled the latest 0.38pre2 (along with the new rudiments), and my > > test scripts failed immediately with a strange error... I ran sqlrsh to > > verify, and sure enough, sqlrsh returns an error when I simply "use $db" > > > > > > > 0> show tables from test; > > > Tables_in_test > > > ============== > > > bin_test > > > fs > > > Rows Returned : 2 > > > Fields Returned : 2 > > > System time : 30000 > > > > > > 0> use test; > > > This command is not supported in the prepared statement protocol yet > > > > > > Rows Returned : 0 > > > Fields Returned : 0 > > > System time : 30000 > > > > > > > > > The same error message is returned for other commands, such as 'show > > slave status' and 'show create table'. > > > > This is all on a Fedora 3 server, talking to MySQL 5.0.18. > > > > Please let me know if there is anything I can do to help fix this, I > > would like to be able to put 0.38 into use on my development server (we > > need the inputBindBlob support that is lacking in 0.37). > > > > Regards, > > Devananda > > > > > > _______________________________________________ > > Sqlrelay-discussion mailing list > > Sql...@li... > > https://lists.sourceforge.net/lists/listinfo/sqlrelay-discussion > > > > > |
|
From: Devananda <kar...@ya...> - 2006-06-21 20:17:21
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type"> </head> <body bgcolor="#ffffff" text="#000000"> The problem seems to be line 260 in connections/mysql/mysqlconnection.C:<br> <br> <tt>return !mysql_stmt_prepare(stmt,query,length);</tt><br> <br> and the assumption that all queries can be run as prepared statements. I looked briefly in the other connectors, and I see the same treatment of queries (prepare them all). However, according to the MySQL documentation, this can't be done for 5.0 :(<br> <br> See <a class="moz-txt-link-freetext" href="http://dev.mysql.com/doc/refman/5.0/en/c-api-prepared-statements.html">http://dev.mysql.com/doc/refman/5.0/en/c-api-prepared-statements.html</a> :<br> <blockquote> The following statements can be used as prepared statements: <code class="literal">CREATE TABLE</code>, <code class="literal">DELETE</code>, <code class="literal">DO</code>, <code class="literal">INSERT</code>, <code class="literal">REPLACE</code>, <code class="literal">SELECT</code>, <code class="literal">SET</code>, <code class="literal">UPDATE</code>, and most <code class="literal">SHOW</code> statements. Other statements are not supported in MySQL 5.0.<br> </blockquote> <br> Regards,<br> Devananda<br> <br> <br> <br> Devananda wrote: <blockquote cite="mid...@ya..." type="cite"> <pre wrap="">This is particularly odd, I think.... I've compiled the latest 0.38pre2 (along with the new rudiments), and my test scripts failed immediately with a strange error... I ran sqlrsh to verify, and sure enough, sqlrsh returns an error when I simply "use $db" </pre> <blockquote type="cite"> <pre wrap="">0> show tables from test; Tables_in_test ============== bin_test fs Rows Returned : 2 Fields Returned : 2 System time : 30000 0> use test; This command is not supported in the prepared statement protocol yet Rows Returned : 0 Fields Returned : 0 System time : 30000 </pre> </blockquote> <pre wrap=""><!----> The same error message is returned for other commands, such as 'show slave status' and 'show create table'. This is all on a Fedora 3 server, talking to MySQL 5.0.18. Please let me know if there is anything I can do to help fix this, I would like to be able to put 0.38 into use on my development server (we need the inputBindBlob support that is lacking in 0.37). Regards, Devananda _______________________________________________ Sqlrelay-discussion mailing list <a class="moz-txt-link-abbreviated" href="mailto:Sql...@li...">Sql...@li...</a> <a class="moz-txt-link-freetext" href="https://lists.sourceforge.net/lists/listinfo/sqlrelay-discussion">https://lists.sourceforge.net/lists/listinfo/sqlrelay-discussion</a> </pre> </blockquote> <br> </body> </html> |
|
From: Devananda <kar...@ya...> - 2006-06-21 17:22:20
|
This is particularly odd, I think.... I've compiled the latest 0.38pre2 (along with the new rudiments), and my test scripts failed immediately with a strange error... I ran sqlrsh to verify, and sure enough, sqlrsh returns an error when I simply "use $db" > 0> show tables from test; > Tables_in_test > ============== > bin_test > fs > Rows Returned : 2 > Fields Returned : 2 > System time : 30000 > > 0> use test; > This command is not supported in the prepared statement protocol yet > > Rows Returned : 0 > Fields Returned : 0 > System time : 30000 The same error message is returned for other commands, such as 'show slave status' and 'show create table'. This is all on a Fedora 3 server, talking to MySQL 5.0.18. Please let me know if there is anything I can do to help fix this, I would like to be able to put 0.38 into use on my development server (we need the inputBindBlob support that is lacking in 0.37). Regards, Devananda |
|
From: Devananda <kar...@ya...> - 2006-06-20 19:02:44
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Sure enough, there's a new version of rudiments inside the 0.38pre2
targz, which I just didn't see yesterday! Recompiling right now :)<br>
<br>
Apologies for the extraneous list traffic,<br>
Deva<br>
<br>
<br>
<br>
Devananda wrote:
<blockquote cite="mid...@ya..." type="cite">
<pre wrap="">David,
On a system where compiling 0.37 was completely successful, I have
untar'd the 0.38pre2 download from the link provided last week, used the
same options to configure, and make fails immediately with the following:
</pre>
<blockquote type="cite">
<pre wrap="">sqlrelay-0.38]# make
make -C src all
make[1]: Entering directory `/usr/local/src/sqlrelay-0.38/src'
make -C util all
make[2]: Entering directory `/usr/local/src/sqlrelay-0.38/src/util'
/bin/sh ../../libtool --mode=compile g++ -Wall -pipe -pthread
-DTMP_DIR=\"/usr/local/firstworks/var/sqlrelay/tmp\"
-DDEBUG_DIR=\"/usr/local/firstworks/var/sqlrelay/debug\"
-DDEFAULT_CONFIG_FILE=\"/usr/local/firstworks/etc/sqlrelay.conf\" -I./
-I../../ -I../../src/common -I/usr/local/firstworks/include -pthread
-c cmdline.C -o cmdline.lo
mkdir .libs
g++ -Wall -pipe -pthread
-DTMP_DIR=\"/usr/local/firstworks/var/sqlrelay/tmp\"
-DDEBUG_DIR=\"/usr/local/firstworks/var/sqlrelay/debug\"
-DDEFAULT_CONFIG_FILE=\"/usr/local/firstworks/etc/sqlrelay.conf\" -I./
-I../../ -I../../src/common -I/usr/local/firstworks/include -pthread
-c cmdline.C -fPIC -DPIC -o .libs/cmdline.o
cmdline.C: In member function 'void cmdline::setId()':
cmdline.C:20: error: 'getValue' was not declared in this scope
cmdline.C: In member function 'void cmdline::setConfig()':
cmdline.C:30: error: 'getValue' was not declared in this scope
cmdline.C: In member function 'void cmdline::setLocalStateDir()':
cmdline.C:39: error: 'getValue' was not declared in this scope
make[2]: *** [cmdline.lo] Error 1
make[2]: Leaving directory `/usr/local/src/sqlrelay-0.38/src/util'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/usr/local/src/sqlrelay-0.38/src'
make: *** [all] Error 2
</pre>
</blockquote>
<pre wrap=""><!---->
I compared cmdline.C to the 0.37 version, and saw that the 'getValue'
function was previously called 'value'. Out of curiosity, I changed it
back and ran make again. This time, it failed much later, but with a
similar error.
</pre>
<blockquote type="cite">
<pre wrap="">/bin/sh ../../../libtool --mode=compile g++ -Wall -pipe -pthread
-I./ -I../../../ -I../../../src/common -I../../../src/api/c++/include
-I/usr/local/firstworks/include -pthread -c pqencoding.C -o pqencoding.lo
g++ -Wall -pipe -pthread -I./ -I../../../ -I../../../src/common
-I../../../src/api/c++/include -I/usr/local/firstworks/include
-pthread -c pqencoding.C -fPIC -DPIC -o .libs/pqencoding.o
pqencoding.C: In function 'int PQenv2encoding()':
pqencoding.C:38: error: cannot call member function 'const char*
rudiments::environment::getValue(const char*) const' without object
</pre>
</blockquote>
<pre wrap=""><!---->
Does 0.38 require a new version of Rudiments which is not yet available
from sourceforge?
_______________________________________________
Sqlrelay-discussion mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Sql...@li...">Sql...@li...</a>
<a class="moz-txt-link-freetext" href="https://lists.sourceforge.net/lists/listinfo/sqlrelay-discussion">https://lists.sourceforge.net/lists/listinfo/sqlrelay-discussion</a>
</pre>
</blockquote>
<br>
</body>
</html>
|
|
From: Alex <abu...@gm...> - 2006-06-20 10:45:12
|
Hi, i'm woring with last sqlrelay+sqlite3+php How i can't get the last insert id |
|
From: Devananda <kar...@ya...> - 2006-06-19 20:05:17
|
David, On a system where compiling 0.37 was completely successful, I have untar'd the 0.38pre2 download from the link provided last week, used the same options to configure, and make fails immediately with the following: > sqlrelay-0.38]# make > make -C src all > make[1]: Entering directory `/usr/local/src/sqlrelay-0.38/src' > make -C util all > make[2]: Entering directory `/usr/local/src/sqlrelay-0.38/src/util' > /bin/sh ../../libtool --mode=compile g++ -Wall -pipe -pthread > -DTMP_DIR=\"/usr/local/firstworks/var/sqlrelay/tmp\" > -DDEBUG_DIR=\"/usr/local/firstworks/var/sqlrelay/debug\" > -DDEFAULT_CONFIG_FILE=\"/usr/local/firstworks/etc/sqlrelay.conf\" -I./ > -I../../ -I../../src/common -I/usr/local/firstworks/include -pthread > -c cmdline.C -o cmdline.lo > mkdir .libs > g++ -Wall -pipe -pthread > -DTMP_DIR=\"/usr/local/firstworks/var/sqlrelay/tmp\" > -DDEBUG_DIR=\"/usr/local/firstworks/var/sqlrelay/debug\" > -DDEFAULT_CONFIG_FILE=\"/usr/local/firstworks/etc/sqlrelay.conf\" -I./ > -I../../ -I../../src/common -I/usr/local/firstworks/include -pthread > -c cmdline.C -fPIC -DPIC -o .libs/cmdline.o > cmdline.C: In member function 'void cmdline::setId()': > cmdline.C:20: error: 'getValue' was not declared in this scope > cmdline.C: In member function 'void cmdline::setConfig()': > cmdline.C:30: error: 'getValue' was not declared in this scope > cmdline.C: In member function 'void cmdline::setLocalStateDir()': > cmdline.C:39: error: 'getValue' was not declared in this scope > make[2]: *** [cmdline.lo] Error 1 > make[2]: Leaving directory `/usr/local/src/sqlrelay-0.38/src/util' > make[1]: *** [all] Error 2 > make[1]: Leaving directory `/usr/local/src/sqlrelay-0.38/src' > make: *** [all] Error 2 I compared cmdline.C to the 0.37 version, and saw that the 'getValue' function was previously called 'value'. Out of curiosity, I changed it back and ran make again. This time, it failed much later, but with a similar error. > /bin/sh ../../../libtool --mode=compile g++ -Wall -pipe -pthread > -I./ -I../../../ -I../../../src/common -I../../../src/api/c++/include > -I/usr/local/firstworks/include -pthread -c pqencoding.C -o pqencoding.lo > g++ -Wall -pipe -pthread -I./ -I../../../ -I../../../src/common > -I../../../src/api/c++/include -I/usr/local/firstworks/include > -pthread -c pqencoding.C -fPIC -DPIC -o .libs/pqencoding.o > pqencoding.C: In function 'int PQenv2encoding()': > pqencoding.C:38: error: cannot call member function 'const char* > rudiments::environment::getValue(const char*) const' without object Does 0.38 require a new version of Rudiments which is not yet available from sourceforge? |
|
From: Devananda <kar...@ya...> - 2006-06-19 19:53:34
|
I've made a minor change to the mysql connector -- more of a hack really
-- to allow a result set to be returned by stored procedures. I'm sure
there is a better way to do it, since this "quick-fix" only handles the
first result set returned, and procedures can return many result sets.
However, this covers all my needs (for now)... Hope it helps someone else!
The two changes as follows, to the connections/mysql/mysql.C file:
First, tell MySQL that we can process multi_result sets...
lines 73-85, reordered to set CLIENT_MULTI_RESULT if MYSQL_VERSION_ID > 5000
> #if MYSQL_VERSION_ID < 32200
> if (!mysql_real_connect(&mysql,hostval,user,password,
> portval,socketval,0)) {
> #else
> // initialize database connection structure
> if (!mysql_init(&mysql)) {
> fprintf(stderr,"mysql_init failed\n");
> return false;
> }
> #if MYSQL_VERSION_ID < 50000
> if (!mysql_real_connect(&mysql,hostval,user,password,dbval,
> portval,socketval,0)) {
> #else
> if (!mysql_real_connect(&mysql,hostval,user,password,dbval,
> portval,socketval,CLIENT_MULTI_RESULTS)) {
> #endif
> #endif
Second, make sure we do NOT leave any result sets trailing around.
function def. on line 855, inserted "#if MYSQL_VERSION_ID..." block:
> void mysqlcursor::cleanUpData(bool freeresult, bool freebinds) {
> #ifdef HAVE_MYSQL_STMT_PREPARE
> if (!mysqlconn->fakebinds) {
> if (freebinds) {
> bindcounter=0;
> rawbuffer::zero(&bind,sizeof(bind));
> mysql_stmt_reset(stmt);
> }
> if (freeresult) {
> mysql_stmt_free_result(stmt);
> if (mysqlresult) {
> mysql_free_result(mysqlresult);
> mysqlresult=NULL;
> }
> }
> } else {
> #endif
> if (freeresult && mysqlresult!=(MYSQL_RES *)NULL) {
> mysql_free_result(mysqlresult);
> mysqlresult=NULL;
> }
> #if MYSQL_VERSION_ID > 50000
> whlie(!mysql_next_result(&mysqlconn->mysql)) {
> mysqlresult=mysql_store_result($mysqlconn->mysql);
> mysql_free_result(mysqlresult);
> mysqlresult=NULL;
> }
> #endif
> #ifdef HAVE_MYSQL_STMT_PREPARE
> }
> #endif
> delete[] columnnames;
> columnnames=NULL;
> }
|
|
From: <la...@he...> - 2006-06-16 14:33:51
|
When building with standard methods (configure, make) does it recognizes it? When I was building with oracle instantclient, configure script did not recoginize it somehow. I had to remove a lot of stuff in configure script to get it working right in my situation. I can send you this configure script if you need. Lauris Ville Silventoinen wrote: > Hi, > > I'm trying to create an RPM for CentOS x86_64 from sqlrelay-0.37-1.src.rpm. > I've installed Oracle instantclient and rudiments-0.29 RPMs. > > After the Oracle installation, I have the Oracle libraries in: > /usr/lib64/oracle/10.2.0.2/client/ > > The /usr/lib/ doesn't contain oracle libraries. > > As you will probably guess, when I do "rpmbuild -bb <options> sqlrelay.spec", the build fails: > > ***** Oracle ***************** > checking for oracle includes and libraries... no > configure: WARNING: Oracle support will not be built. > > > Is there a way around this? I know how to build SQL Relay manually > (configure, modify libtool, make, make install), but is there a way to > build an RPM? (I'm a complete newbie with RPMs so maybe I'm missing something!) > > Thanks, > Ville > > > > _______________________________________________ > Sqlrelay-discussion mailing list > Sql...@li... > https://lists.sourceforge.net/lists/listinfo/sqlrelay-discussion > > |
|
From: Ville S. <vs...@eb...> - 2006-06-16 14:20:48
|
Hi, I'm trying to create an RPM for CentOS x86_64 from sqlrelay-0.37-1.src.rpm. I've installed Oracle instantclient and rudiments-0.29 RPMs. After the Oracle installation, I have the Oracle libraries in: /usr/lib64/oracle/10.2.0.2/client/ The /usr/lib/ doesn't contain oracle libraries. As you will probably guess, when I do "rpmbuild -bb <options> sqlrelay.spec", the build fails: ***** Oracle ***************** checking for oracle includes and libraries... no configure: WARNING: Oracle support will not be built. Is there a way around this? I know how to build SQL Relay manually (configure, modify libtool, make, make install), but is there a way to build an RPM? (I'm a complete newbie with RPMs so maybe I'm missing something!) Thanks, Ville |
|
From: David M. <dav...@fi...> - 2006-06-16 14:01:27
|
I've been trying to get that working, but I haven't yet succeeded :) In order to use SQL Relay client code on windows without cygwin, the parts of rudiments that the SQL Relay client uses need to be ported to the win32 API. I've been working on that, but it's not complete yet. So far, the parts of rudiments that the SQL Relay client uses still require some of the functionality provided by cygwin and native windows Python can't use modules that were built under cygwin, or at least I couldn't figure out how to get it to. Dave dav...@fi... On Wed, 2006-06-14 at 07:32 +0200, Maciej Wi=C5=9Bniowski wrote: > Hi >=20 > I'm wondering if it is possible to have SQLRelay installed under > Windows and use it from Python (installed in windows not via cygwin). > I've found that to run SQLRelay in Win environment it is necessary > to use Cygwin. I don't have experience with this tool and not to > much time to check this (so I'm just wondering about this now ;)), but > maybe somebody can tell me if it is possible to have python under > windows and use SQLRelay libraries in it (I only need client, > server is on different, linux machine). >=20 |
|
From: David M. <dav...@fi...> - 2006-06-16 13:53:44
|
PHP Pear DB requires that it's drivers support the ? character to delimit bind variables. SQL Relay translates ?'s into whatever the native bind variable delimiter is for whatever database you're using, or if your database doesn't support bind variables natively, it translates ?'s into :1,:2,:3,etc. and rewrites the query on the back end, performing substitutions. In this case, as Cesar points out, a workaround is to use the ? character. But there does appear to be a bug, ?'s should not be translated if they're found inside of quotes. I'll fix that in the driver and get it out in the next prerelease. Dave On Tue, 2006-06-13 at 19:33 +0200, Albert Vila wrote: > Hi all, > > I'm having problems doing queries (insert or update) that contains > the ? character. For example if I send the following query throught > the SQLRelay, > > update TABLE set url="http://mydomain.com/? > session=0101010&user=blabla" > > the ? character is rewrited with :1. > > The query then looks like: > > update TABLE set url="http://mydomain.com/: > 1session=0101010&user=blabla" > > Any ideas? > > Thanks > > > _______________________________________________ > Sqlrelay-discussion mailing list > Sql...@li... > https://lists.sourceforge.net/lists/listinfo/sqlrelay-discussion > |
|
From: David M. <dav...@fi...> - 2006-06-15 13:54:23
|
Try the 0.38pre2 pre-release, it supports native mysql binds and should
support blobs as well. I also added a fix for non-native blob binds to
escape null's, so that should be fixed too.
Dave
dav...@fi...
On Mon, 2006-06-12 at 15:24 -0700, Devananda wrote:
> Dear list,
>
> A project I am currently working on requires that uploaded files be
> stored in MySQL for various purposes. Our application servers will be
> using SQL Relay to connect to MySQL 5.0. However, in testing, I have
> been unable to get SQL Relay to bind binary values to a prepared statement.
>
> I've been combing through the SQL Relay source, and it looks like there
> _should_ be definitions for the ::inputBind* functions in
> src/connections/mysql/mysqlconnection.C (since there are definitions for
> those functions in the oracle and postgres connectors), but there are none.
>
> In any case, here's a simple test case which fails for me:
>
> -------
>
> mysql> CREATE TABLE bin_test (id int(11) NOT NULL auto_increment, val
> mediumblob NOT NULL, PRIMARY KEY (id) ) ;
>
> -------
>
> #!/usr/local/bin/php
> <?php
>
> $data="ab\x00de\x00";
>
> # acquire a connection handle
> $CON =
> sqlrcon_alloc("localhost",'','/tmp/sqlr-HMS','sqlruser','sqlrpass',0,1);
> if (!$CON) {
> print "failed to get connection handle!\n";
> exit(1);
> }
>
> # acquire a cursor
> $CUR = sqlrcur_alloc($CON);
> if (!$CUR) {
> print "failed to get cursor!\n";
> exit(1);
> }
>
> sqlrcur_prepareQuery($CUR, 'INSERT INTO test.bin_test (val) VALUES
> (:data)');
> if (!sqlrcur_inputBindBlob($CUR, 'data', $data, strlen($data))) {
> print "inputBindBlob failed\n";
> exit(1);
> }
>
> if (!sqlrcur_executeQuery($CUR)) {
> print "execute failed. Error: " . sqlrcur_errorMessage($CUR) . "\n";
> exit(1);
> }
>
> sqlrcur_free($CUR);
> sqlrcon_free($CON);
>
> exit(0);
>
> ?>
>
> ---------
>
> When run, I get the following error message: "execute failed. Error:
> Column count doesn't match value count at row 1". Having started
> sqlrelay in debug mode, I see the following in the connection's log file
> (extra whitespace removed)
> > new query
> > handling query...
> > getting query...
> > querylength:
> > 46
> > query:
> > INSERT INTO test.bin_test (val) VALUES (:data)
> > getting query succeeded
> > getting input binds...
> > :data
> > BLOB
> > done getting input binds
> > getting output binds...
> > done getting output binds
> > getting send column info...
> > send column info
> > done getting send column info...
> > processing query...
> > preparing/executing...
> > commit or rollback check...
> > done with commit or rollback check
> > processing query failed
> > done processing query
> > handling error...
> > returning error...
> > failed to handle query: error
> > done returning error
> > done handling error...
>
> When I alter the PHP code to call "sqlrcur_inputBind" instead of
> "sqlrcur_inputBindBlob", the query is successfully run, but the string
> is terminated at the first \x00 -- as expected for a C string.
>
> Have I done something obviously wrong, or is the MySQL connector lacking
> this functionality?
>
>
> Thanks in advance,
> Devananda vdv
>
>
> _______________________________________________
> Sqlrelay-discussion mailing list
> Sql...@li...
> https://lists.sourceforge.net/lists/listinfo/sqlrelay-discussion
>
|
|
From: <mac...@co...> - 2006-06-14 05:32:42
|
Hi I'm wondering if it is possible to have SQLRelay installed under Windows and use it from Python (installed in windows not via cygwin). I've found that to run SQLRelay in Win environment it is necessary to use Cygwin. I don't have experience with this tool and not to much time to check this (so I'm just wondering about this now ;)), but maybe somebody can tell me if it is possible to have python under windows and use SQLRelay libraries in it (I only need client, server is on different, linux machine). -- Maciej Wisniowski |
|
From: David M. <dav...@fi...> - 2006-06-14 04:46:11
|
Heh, guess I should post the URL: http://www.firstworks.com/sqlrelay-0.38pre2.tar.gz Dave On Tue, 2006-06-13 at 22:58 -0400, David Muse wrote: > Hello All, > > It's been a while, but here's another prerelease of 0.38. > > * Improved query routing and filtering. > * Applied Sharpinskiy Dmitry's odbc unicode patch. > * Integrated Devananda's statistics gathering code. > * NULL's are escaped in fake BLOB binds now > * Added docs for oracle and db2 on fedora core 5 > > Just have a few loose ends to tie up before I start doing platform > testing. > > Give it a run, report any issues you run into. > > Dave > dav...@fi... > > > > _______________________________________________ > Sqlrelay-discussion mailing list > Sql...@li... > https://lists.sourceforge.net/lists/listinfo/sqlrelay-discussion > |
|
From: David M. <dav...@fi...> - 2006-06-14 02:57:01
|
Hello All, It's been a while, but here's another prerelease of 0.38. * Improved query routing and filtering. * Applied Sharpinskiy Dmitry's odbc unicode patch. * Integrated Devananda's statistics gathering code. * NULL's are escaped in fake BLOB binds now * Added docs for oracle and db2 on fedora core 5 Just have a few loose ends to tie up before I start doing platform testing. Give it a run, report any issues you run into. Dave dav...@fi... |
|
From: Cesar P. <cpe...@bt...> - 2006-06-13 18:23:20
|
Maybe you could use ? instead of ? Hope this helps. -----Original Message----- From: sql...@li... [mailto:sql...@li...] On Behalf Of Albert Vila Sent: Tuesday, June 13, 2006 10:34 AM To: sql...@li... Subject: [Sqlrelay-discussion] Problems with text fields containig the ?character Hi all, I'm having problems doing queries (insert or update) that contains the ? character. For example if I send the following query throught the SQLRelay, update TABLE set url="http://mydomain.com/? session=0101010&user=blabla" the ? character is rewrited with :1. The query then looks like: update TABLE set url="http://mydomain.com/: 1session=0101010&user=blabla" Any ideas? Thanks -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.394 / Virus Database: 268.8.4/363 - Release Date: 6/13/2006 |
|
From: Albert V. <av...@im...> - 2006-06-13 17:34:14
|
Hi all, I'm having problems doing queries (insert or update) that contains the ? character. For example if I send the following query throught the SQLRelay, update TABLE set url="http://mydomain.com/? session=0101010&user=blabla" the ? character is rewrited with :1. The query then looks like: update TABLE set url="http://mydomain.com/: 1session=0101010&user=blabla" Any ideas? Thanks |