hello
there is a new bug with hsql support. I post it here becouse for some
reason i can not log into the bugtracker, and i alls want to be shure it
is noticed, becouse it is a brand new bug.
when you start mmbase clean, and hsql tables are created you get this:
2005-12-16 16:41:18,246 ERROR mmbase.module.core.MMObjectBuilder -
Unexpected token: MAX in statement [CREATE TABLE MM_TYPEREL (NUMBER
INTEGER NOT NULL, OTYPE INTEGER NOT NULL, OWNER VARCHAR(12) NOT NULL,
SNUMBER INTEGER NOT NULL, DNUMBER INTEGER NOT NULL, RNUMBER INTEGER NOT
NULL, MAX] in query:CREATE TABLE MM_TYPEREL (NUMBER INTEGER NOT NULL,
OTYPE INTEGER NOT NULL, OWNER VARCHAR(12) NOT NULL, SNUMBER INTEGER NOT
NULL, DNUMBER INTEGER NOT NULL, RNUMBER INTEGER NOT NULL, MAX INTEGER ,
PRIMARY KEY (NUMBER), CONSTRAINT MM_TYPEREL_OTYPE_foreign FOREIGN KEY
(OTYPE) REFERENCES MM_OBJECT (NUMBER), CONSTRAINT
MM_TYPEREL_SNUMBER_foreign FOREIGN KEY (SNUMBER) REFERENCES MM_OBJECT
(NUMBER), CONSTRAINT MM_TYPEREL_DNUMBER_foreign FOREIGN KEY (DNUMBER)
REFERENCES MM_OBJECT (NUMBER), CONSTRAINT MM_TYPEREL_RNUMBER_foreign
FOREIGN KEY (RNUMBER) REFERENCES MM_OBJECT (NUMBER)
)org.mmbase.storage.StorageException: Unexpected token: MAX in statement
[CREATE TABLE MM_TYPEREL (NUMBER INTEGER NOT NULL, OTYPE INTEGER NOT
NULL, OWNER VARCHAR(12) NOT NULL, SNUMBER INTEGER NOT NULL, DNUMBER
INTEGER NOT NULL, RNUMBER INTEGER NOT NULL, MAX] in query:CREATE TABLE
MM_TYPEREL (NUMBER INTEGER NOT NULL, OTYPE INTEGER NOT NULL, OWNER
VARCHAR(12) NOT NULL, SNUMBER INTEGER NOT NULL, DNUMBER INTEGER NOT
NULL, RNUMBER INTEGER NOT NULL, MAX INTEGER , PRIMARY KEY (NUMBER),
CONSTRAINT MM_TYPEREL_OTYPE_foreign FOREIGN KEY (OTYPE) REFERENCES
MM_OBJECT (NUMBER), CONSTRAINT MM_TYPEREL_SNUMBER_foreign FOREIGN KEY
(SNUMBER) REFERENCES MM_OBJECT (NUMBER), CONSTRAINT
MM_TYPEREL_DNUMBER_foreign FOREIGN KEY (DNUMBER) REFERENCES MM_OBJECT
(NUMBER), CONSTRAINT MM_TYPEREL_RNUMBER_foreign FOREIGN KEY (RNUMBER)
REFERENCES MM_OBJECT (NUMBER) )
so max is now a field in typerel and it is allso a disallowed field for
hsql (and most db's). the disallowed fields for hsql are read from the
db through jdbc, and this is a dump of the list of disallowed fields:
2005-12-16 16:41:18,246 DEBUG
storage.implementation.database.DatabaseStorageManager - disallowed
fields: {absolute=null, action=null, add=null, all=null, allocate=null,
alter=null, and=null, any=null, are=null, as=null, asc=null,
assertion=null, at=null, authorization=null, avg=null, before=null,
begin=null, between=null, bigint=null, binary=null, bit=null,
bit_length=null, both=null, by=null, cached=null, cascade=null,
cascaded=null, case=null, cast=null, catalog=null, char=null,
char_length=null, character=null, character_length=null, check=null,
close=null, coalesce=null, collate=null, collation=null, column=null,
commit=null, connect=null, connection=null, constraint=null,
constraints=null, continue=null, convert=null, corresponding=null,
count=null, create=null, cross=null, current=null, current_date=null,
current_time=null, current_timestamp=null, current_user=null,
cursor=null, date=null, datetime=null, day=null, deallocate=null,
dec=null, decimal=null, declare=null, default=null, deferrable=null,
deferred=null, delete=null, desc=null, describe=null, descriptor=null,
diagnostics=null, disconnect=null, distinct=null, domain=null,
double=null, drop=null, else=null, end=null, end-exec=null, escape=null,
except=null, exception=null, exec=null, execute=null, exists=null,
external=null, extract=null, false=null, fetch=null, first=null,
float=null, for=null, foreign=null, found=null, from=null, full=null,
get=null, global=null, go=null, goto=null, grant=null, group=null,
having=null, hour=null, identity=null, immediate=null, in=null,
indicator=null, initially=null, inner=null, input=null,
insensitive=null, insert=null, int=null, integer=null, intersect=null,
interval=null, into=null, is=null, isolation=null, join=null, key=null,
language=null, last=null, leading=null, left=null, level=null,
like=null, limit=null, local=null, longvarbinary=null, longvarchar=null,
lower=null, match=null, max=null, min=null, minute=null, module=null,
month=null, names=null, national=null, natural=null, nchar=null,
next=null, no=null, not=null, null=null, nullif=null, numeric=null,
object=null, octet_length=null, of=null, on=null, only=null, open=null,
option=null, or=null, order=null, other=null, outer=null, output=null,
overlaps=null, pad=null, partial=null, position=null, precision=null,
prepare=null, preserve=null, primary=null, prior=null, privileges=null,
procedure=null, public=null, read=null, real=null, references=null,
relative=null, restrict=null, revoke=null, right=null, rollback=null,
rows=null, savepoint=null, schema=null, scroll=null, second=null,
section=null, select=null, session=null, session_user=null, set=null,
size=null, smallint=null, some=null, space=null, sql=null, sqlcode=null,
sqlerror=null, sqlstate=null, substring=null, sum=null,
system_user=null, table=null, temp=null, temporary=null, text=null,
then=null, time=null, timestamp=null, timezone_hour=null,
timezone_minute=null, tinyint=null, to=null, top=null, trailing=null,
transaction=null, translate=null, translation=null, trigger=null,
trim=null, true=null, union=null, unique=null, unknown=null,
update=null, upper=null, usage=null, user=null, using=null, value=null,
values=null, varbinary=null, varchar=null, varchar_ignorecase=null,
varying=null, view=null, when=null, whenever=null, where=null,
with=null, work=null, write=null, year=null, zone=null}
max is there, but the value is null, so that is what the field name
should be replaced with. the net. result is that the fieldname is not
being replaced. and the error occurs.
So i wonder what the real error is:
1 should somehow the replacement for a disallowed field be derived if
the value in the StorageManagerFactory.disallowedfields map is null?
2 should these values not be null?
questions, questions,...
anyway i can't run tests this way
Ernst
-----------
Ernst Bunders
Ontwikkelaar nieuwe media Vara
tel: 035 6711653
_______________________________________________
Developers mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/developers