Donate Share

SchemaSpy

Tracker: Bugs

5 Quoting and Sybase ASE - ID: 1597609
Last Update: Comment added ( sf-robot )

In Table.fetchnumRows and Table.initcolumnAutoUpdate quoted sql is build.
Unfortunately there is a ASE specification that says that tablenames can be
30 bytes (sic!) long if they don't need to be quoted or 28 bytes if they
need to be quoted.

So if you quote a 29 or 30 byte long tablename the statement fails because
of a too long tablename.

The right solution would IMHO be to only quote tablenames that really need
quoting.

Thanks for your work

Niki


Klaus-Martin Hansche ( loxley ) - 2006-11-16 10:22

5

Closed

None

John Currier

Runtime failure

None

Public


Comments ( 5 )

Date: 2007-01-02 03:20
Sender: sf-robotSourceForge.net Site Admin


This Tracker item was closed automatically by the system. It was
previously set to a Pending status, and the original submitter
did not respond within 14 days (the time period specified by
the administrator of this Tracker).


Date: 2006-12-18 17:18
Sender: johncurrierProject AdminAccepting Donations


This should be resolved in 3.1.1. Note that it wasn't nearly as easy as I
thought it would be due to the need to also quote SQL keywords and JDBC
just gives the SQL keywords that aren't also SQL92 keywords.

John


Date: 2006-11-17 21:58
Sender: johncurrierProject AdminAccepting Donations


Ah, I hadn't seen getExtraNameCharacters() before. That should be
relatively easy to deal with.

Thanks,
John


Date: 2006-11-17 06:58
Sender: loxley


You could quote if the tablenames characters aren't in "a-z, A-Z, 0-9, _"
or the result of getExtraNameCharacters().

But I didn't want to produce any hard feelings.

Regards

Niki


Date: 2006-11-16 15:43
Sender: johncurrierProject AdminAccepting Donations


Okay, but how would I determine whether a table name needed to be quoted
or not? I don't think that spaces are the only reason for quoting. Plus I
have users from around the globe with lots of character sets.

Another approach would be to try it quoted and if it fails to try it w/o
the quotes. Note, however, that "nothing breaks" if this fails, right?

John


Attached File

No Files Currently Attached

Changes ( 4 )

Field Old Value Date By
status_id Pending 2007-01-02 03:20 sf-robot
close_date 2006-12-18 17:18 2007-01-02 03:20 sf-robot
status_id Open 2006-12-18 17:18 johncurrier
close_date - 2006-12-18 17:18 johncurrier