Mysql 4.0.9 and Jconnector 3.0.5

2003-01-28 Thread avaj avaj

Hello.

Iam porting an application that previously run on InstantDB to Mysql.

This application makes use of transaction and isolation level(Read 
Committed). I previously tried using mysql 3.23.54 max with the old mm.mysql 
driver but encountered a problem in setting the Isolation level. I got hold 
of the new release of Mysql ver 4.0.9 and downloaded Connector J 3.0.5 for 
the driver.

I got pass the IsolationLevel exception I had before.. but somehow.. in a 
part of the program where I had to make a subquery inside a delete 
statement.. I ecountered an Exception.

I have this for my code:

 String col =  "4028809b:60a386:f302bed65b:-7df1"

sql = "DELETE FROM table1 WHERE timer IN (SELECT  id FROM table2 WHERE col = 
?)";
   PreparedStatement ps = connection.prepareStatement(sql);
   ps.setString(1, col);
   int rows = ps.executeUpdate();

Exception was...

java.sql.SQLException: Syntax error or access violation,  message from 
server: "
You have an error in your SQL syntax.  Check the manual that corresponds to 
your
MySQL server version for the right syntax to use near 'SELECT id FROM table2 
WHERE col = '4028809b:60"

Somehow.. the string was truncated. I tried displaying the string prior to 
the sql statement and it return the correct value. I think It has to do with 
the driver's implemetation of ? and preparedStatement.setString() coz when I 
tried not using ? and setString it passed thru it correctly.  However, there 
are numerous sql statement that makes use of ? and setString. So, changing 
them all is not a good idea.

Ist there a workaround for this? Can someone shed light regarding my error? 
Is this a bug in the driver? or am im just misled. YOur insight will be most 
welcome.

TIA





_
The new MSN 8: smart spam protection and 2 months FREE*  
http://join.msn.com/?page=features/junkmail


-
Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



Re: Mysql 4.0.9 and Jconnector 3.0.5

2003-01-29 Thread avaj avaj
Hello again!

Thanks for all who replied. Im currently setting up Mysql 4.1 to test with 
my codes. Unfortunately, Binaries for 4.1 version are not yet available. I 
Followed the steps in building from development source and encountered some 
problems.

In the process of cloning 4.1 branch, while it is running consistency 
check... it gave me this 

libmysql/password.c: You are trying to create a symlink on a win32 file 
system.
This file type is not supported on this platform.


Then it gave me that message again when I was doing a ---> bk -r get -Sq
as instructed in the manual.

I might be missing out something here. Will it be ok to proceed given that 
message?


TIA






From: Mark Matthews <[EMAIL PROTECTED]>
To: avaj avaj <[EMAIL PROTECTED]>
CC: [EMAIL PROTECTED], [EMAIL PROTECTED]
Subject: Re: Mysql 4.0.9 and Jconnector 3.0.5
Date: Tue, 28 Jan 2003 08:21:42 -0600

-BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

avaj avaj wrote:
[snip]

java.sql.SQLException: Syntax error or access violation,  message from 
server: "
You have an error in your SQL syntax.  Check the manual that corresponds 
to your
MySQL server version for the right syntax to use near 'SELECT id FROM 
table2 WHERE col = '4028809b:60"

Somehow.. the string was truncated. I tried displaying the string prior to 
the sql statement and it return the correct value. I think It has to do 
with the driver's implemetation of ? and preparedStatement.setString() coz 
when I tried not using ? and setString it passed thru it correctly.  
However, there are numerous sql statement that makes use of ? and 
setString. So, changing them all is not a good idea.


MySQL doesn't always return the complete statement during error messages, 
only the part that is relevant. MySQL 4.0.9 does not support subselects 
(4.1 does), so the parser is complaining about the SELECT in your IN 
clause, not the value you are setting.

	-Mark

- -- MySQL 2003 Users Conference -> http://www.mysql.com/events/uc2003/

For technical support contracts, visit https://order.mysql.com/?ref=mmma

__  ___ ___   __
   /  |/  /_ __/ __/ __ \/ /  Mark Matthews <[EMAIL PROTECTED]>
  / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Full-Time Developer - JDBC/Java
 /_/  /_/\_, /___/\___\_\___/ Flossmoor (Chicago), IL USA
<___/ www.mysql.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.1.90 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQE+NpH7tvXNTca6JD8RArGqAJ9h4sQB9oShVfz/URrcp5ZZRDzVFgCgxJjR
Z8jTv+pTEQ9HmlBQ7Wj8Oxw=
=UHAm
-END PGP SIGNATURE-


_
The new MSN 8: advanced junk mail protection and 2 months FREE* 
http://join.msn.com/?page=features/junkmail


-
Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



Mysql 4.1 development source build

2003-01-30 Thread avaj avaj




Hi.

Has anyone successfully build Mysql 4.1 from development source in 
Windows(XP) environment?
Been getting this error(?) in cloning and in executing bk -r get 
-Sq(executed from cygwin)

---
You are trying to create a symlink on a win32
file system.
This file type is not supported on this platform.
---

If I try to proceed more errors and encountered in make or even in running 
compile-pentium-debug


make[2]: *** [os0proc.o] Error 1
make[2]: Leaving directory `/home/usr/mysql-4.1/innobase/os'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/usr/mysql-4.1/innobase'
make: *** [all] Error 2


Anybody have an idea why?


TIA

_
The new MSN 8: smart spam protection and 2 months FREE*  
http://join.msn.com/?page=features/junkmail


-
Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php