You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-user@db.apache.org by Amir Michail <am...@gmail.com> on 2008/02/13 21:51:56 UTC

column number mismatch error

Hi,

What does this error mean?

ERROR XSCH5: In a base table there was a mismatch between the
requested column number 9 and the maximum number of columns 10.

This happens when I tried to add a reference to a primary key.

Amir

Re: column number mismatch error

Posted by Amir Michail <am...@gmail.com>.
On Thu, Feb 14, 2008 at 10:49 AM, Amir Michail <am...@gmail.com> wrote:
> On Thu, Feb 14, 2008 at 4:30 AM, Knut Anders Hatlen <Kn...@sun.com> wrote:
>  > Amir Michail <am...@gmail.com> writes:
>  >
>  >  > On Feb 13, 2008 7:13 PM, Amir Michail <am...@gmail.com> wrote:
>  >  >>
>  >  >> On Feb 13, 2008 3:51 PM, Amir Michail <am...@gmail.com> wrote:
>  >  >> > Hi,
>  >  >> >
>  >  >> > What does this error mean?
>  >  >> >
>  >  >> > ERROR XSCH5: In a base table there was a mismatch between the
>  >  >> > requested column number 9 and the maximum number of columns 10.
>  >  >> >
>  >  >> > This happens when I tried to add a reference to a primary key.
>  >
>  >  Hi Amir,
>  >
>  >  Could you post the SQL statement you are trying to execute and the
>  >  schema for the tables involved? I think the error means that an attempt
>  >  to add a column to a table/conglomerate failed because the conglomerate
>  >  already has a column with the given id. I think this is an internal
>  >  error, and it could be a bug in Derby.
>  >
>
>  The integrity check did not reveal any error.

Assuming the db is corrupted (even though the integrity check does not
find anything wrong), is there an easy way to reconstruct the db from
scratch?  Is there a simple procedure I can follow?

Amir

>
>  But this fails:
>
>  ij> alter table levels add column shape_id int references shapes;
>
> ERROR XSCH5: In a base table there was a mismatch between the
>  requested column number 9 and the maximum number of columns 10.
>
>  Amir
>
>
>
>  >
>  >  >> Do you think my db is corrupted?
>  >  >
>  >  > What's the command for checking db integrity?
>  >
>  >  http://db.apache.org/derby/docs/10.3/adminguide/cadminconsist01.html
>  >
>  >  --
>  >  Knut Anders
>  >
>

Re: column number mismatch error

Posted by Knut Anders Hatlen <Kn...@Sun.COM>.
Amir Michail <am...@gmail.com> writes:

> On Thu, Feb 14, 2008 at 1:19 PM, Kathey Marsden
> <km...@sbcglobal.net> wrote:
>> Amir Michail wrote:
>>  >
>>  > ij> alter table levels add column shape_id int references shapes;
>>  > ERROR XSCH5: In a base table there was a mismatch between the
>>  > requested column number 9 and the maximum number of columns 10.
>>  >
>>  >
>>  Can you send your schema? You can get this with the dblook utility.
>>
>
> I would rather keep that private.  Is there something else I can do?

You could try to reproduce it with tables that have the same structure
(same type of columns, number of columns, primary key, etc) and
different names, and post what you did if you manage to reproduce it.

-- 
Knut Anders

Re: column number mismatch error

Posted by Amir Michail <am...@gmail.com>.
On Thu, Feb 14, 2008 at 1:19 PM, Kathey Marsden
<km...@sbcglobal.net> wrote:
> Amir Michail wrote:
>  >
>  > ij> alter table levels add column shape_id int references shapes;
>  > ERROR XSCH5: In a base table there was a mismatch between the
>  > requested column number 9 and the maximum number of columns 10.
>  >
>  >
>  Can you send your schema? You can get this with the dblook utility.
>

I would rather keep that private.  Is there something else I can do?

Amir

>
>

Re: column number mismatch error

Posted by Kathey Marsden <km...@sbcglobal.net>.
Amir Michail wrote:
>
> ij> alter table levels add column shape_id int references shapes;
> ERROR XSCH5: In a base table there was a mismatch between the
> requested column number 9 and the maximum number of columns 10.
>
>   
Can you send your schema? You can get this with the dblook utility.



Re: column number mismatch error

Posted by Amir Michail <am...@gmail.com>.
On Thu, Feb 14, 2008 at 4:30 AM, Knut Anders Hatlen <Kn...@sun.com> wrote:
> Amir Michail <am...@gmail.com> writes:
>
>  > On Feb 13, 2008 7:13 PM, Amir Michail <am...@gmail.com> wrote:
>  >>
>  >> On Feb 13, 2008 3:51 PM, Amir Michail <am...@gmail.com> wrote:
>  >> > Hi,
>  >> >
>  >> > What does this error mean?
>  >> >
>  >> > ERROR XSCH5: In a base table there was a mismatch between the
>  >> > requested column number 9 and the maximum number of columns 10.
>  >> >
>  >> > This happens when I tried to add a reference to a primary key.
>
>  Hi Amir,
>
>  Could you post the SQL statement you are trying to execute and the
>  schema for the tables involved? I think the error means that an attempt
>  to add a column to a table/conglomerate failed because the conglomerate
>  already has a column with the given id. I think this is an internal
>  error, and it could be a bug in Derby.
>

The integrity check did not reveal any error.

But this fails:

ij> alter table levels add column shape_id int references shapes;
ERROR XSCH5: In a base table there was a mismatch between the
requested column number 9 and the maximum number of columns 10.

Amir

>
>  >> Do you think my db is corrupted?
>  >
>  > What's the command for checking db integrity?
>
>  http://db.apache.org/derby/docs/10.3/adminguide/cadminconsist01.html
>
>  --
>  Knut Anders
>

Re: column number mismatch error

Posted by Knut Anders Hatlen <Kn...@Sun.COM>.
Amir Michail <am...@gmail.com> writes:

> On Feb 13, 2008 7:13 PM, Amir Michail <am...@gmail.com> wrote:
>>
>> On Feb 13, 2008 3:51 PM, Amir Michail <am...@gmail.com> wrote:
>> > Hi,
>> >
>> > What does this error mean?
>> >
>> > ERROR XSCH5: In a base table there was a mismatch between the
>> > requested column number 9 and the maximum number of columns 10.
>> >
>> > This happens when I tried to add a reference to a primary key.

Hi Amir,

Could you post the SQL statement you are trying to execute and the
schema for the tables involved? I think the error means that an attempt
to add a column to a table/conglomerate failed because the conglomerate
already has a column with the given id. I think this is an internal
error, and it could be a bug in Derby.

>> Do you think my db is corrupted?
>
> What's the command for checking db integrity?

http://db.apache.org/derby/docs/10.3/adminguide/cadminconsist01.html

-- 
Knut Anders

Re: column number mismatch error

Posted by Amir Michail <am...@gmail.com>.
On Feb 13, 2008 7:13 PM, Amir Michail <am...@gmail.com> wrote:
>
> On Feb 13, 2008 3:51 PM, Amir Michail <am...@gmail.com> wrote:
> > Hi,
> >
> > What does this error mean?
> >
> > ERROR XSCH5: In a base table there was a mismatch between the
> > requested column number 9 and the maximum number of columns 10.
> >
> > This happens when I tried to add a reference to a primary key.
> >
>
> Do you think my db is corrupted?

What's the command for checking db integrity?

Amir

>
> Amir
>
> > Amir
> >
>

Re: column number mismatch error

Posted by Amir Michail <am...@gmail.com>.
On Feb 13, 2008 3:51 PM, Amir Michail <am...@gmail.com> wrote:
> Hi,
>
> What does this error mean?
>
> ERROR XSCH5: In a base table there was a mismatch between the
> requested column number 9 and the maximum number of columns 10.
>
> This happens when I tried to add a reference to a primary key.
>

Do you think my db is corrupted?

Amir

> Amir
>