You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Stan Bradbury (JIRA)" <ji...@apache.org> on 2007/07/11 06:28:04 UTC
[jira] Created: (DERBY-2919) Alter table .. Add .. Primary Key
fails with Column not found when columnName contains localized characters -
w/a available
Alter table .. Add .. Primary Key fails with Column not found when columnName contains localized characters - w/a available
---------------------------------------------------------------------------------------------------------------------------
Key: DERBY-2919
URL: https://issues.apache.org/jira/browse/DERBY-2919
Project: Derby
Issue Type: Bug
Components: Localization
Affects Versions: 10.3.1.1
Reporter: Stan Bradbury
Priority: Minor
Database created with territory=es_MX and table with colunName Excepci≤n (taken from exception text for "ERROR XJ001: Excepci≤n de Java:...") trying to specify the column as the primary key using alter table fails:
Db Creation URL: connect 'jdbc:derby:toursMx;create=true;territory=es_MX';
-- Create table
Create table Ciudad_de_Mexico2
( nombre varchar(24),
estado varchar(24),
Excepci≤n int );
-- Create PK
ALTER TABLE Ciudad_de_Mexico2
ADD CONSTRAINT Mx_PK2 Primary Key (
Excepci≤n);
-- ERROR 42831: 'EXCEPCI╙N' no puede ser una columna de clave primaria o clave - nica porque puede contener valores nulos.
-- WORKAROUND: create the primary key when the table is created:
Create table Ciudad_de_Mexico
( nombre varchar(24),
estado varchar(24),
Excepci≤n int constraint mx_pk Primary Key);
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (DERBY-2919) Alter table .. Add .. Primary Key
fails with Column not found when columnName contains localized characters -
w/a available
Posted by "Mamta A. Satoor (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-2919?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12511660 ]
Mamta A. Satoor commented on DERBY-2919:
----------------------------------------
Actually, I just tried the test case in Norwegian territory since I understand it's error messages better than the Mexican error messages :) I think the problem has nothing to do with column name containing localized characters. It is throwing error because the column does not have not null defined on it and hence unique/primary key can't be defined on it using ALTER TABLE. Following is the ij session for Norwegian territory
$ java org.apache.derby.tools.ij
ij version 10.4
ij> connect 'jdbc:derby:c:/dellater/db1Norway;create=true;territory=no;collation=TERRITORY_BASED';
WARNING 01J01: Database 'c:/dellater/db1Norway' not created, connection made to existing database instead.
ij> Create table Ciudad_de_Mexico2
( nombre varchar(24),
estado varchar(24),
Excepci≤n int );
0 rows inserted/updated/deleted
ij> ALTER TABLE Ciudad_de_Mexico2
ADD CONSTRAINT Mx_PK2 Primary Key (Excepci≤n);
ERROR 42831: 'EXCEPCI╙N' cannot be a column of a primary key or unique key because it can contain null values.
> Alter table .. Add .. Primary Key fails with Column not found when columnName contains localized characters - w/a available
> ---------------------------------------------------------------------------------------------------------------------------
>
> Key: DERBY-2919
> URL: https://issues.apache.org/jira/browse/DERBY-2919
> Project: Derby
> Issue Type: Bug
> Components: Localization
> Affects Versions: 10.3.1.1
> Reporter: Stan Bradbury
> Priority: Minor
>
> Database created with territory=es_MX and table with colunName Excepci≤n (taken from exception text for "ERROR XJ001: Excepci≤n de Java:...") trying to specify the column as the primary key using alter table fails:
> Db Creation URL: connect 'jdbc:derby:toursMx;create=true;territory=es_MX';
> -- Create table
> Create table Ciudad_de_Mexico2
> ( nombre varchar(24),
> estado varchar(24),
> Excepci≤n int );
> -- Create PK
> ALTER TABLE Ciudad_de_Mexico2
> ADD CONSTRAINT Mx_PK2 Primary Key (
> Excepci≤n);
> -- ERROR 42831: 'EXCEPCI╙N' no puede ser una columna de clave primaria o clave - nica porque puede contener valores nulos.
> -- WORKAROUND: create the primary key when the table is created:
> Create table Ciudad_de_Mexico
> ( nombre varchar(24),
> estado varchar(24),
> Excepci≤n int constraint mx_pk Primary Key);
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (DERBY-2919) Alter table .. Add .. Primary Key
fails with Column not found when columnName contains localized characters -
w/a available
Posted by "Mamta A. Satoor (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-2919?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12511659 ]
Mamta A. Satoor commented on DERBY-2919:
----------------------------------------
Stan, if you have the stack trace, can you please post it in this jira entry? In the mean time, I will try to reproduce it myself.
> Alter table .. Add .. Primary Key fails with Column not found when columnName contains localized characters - w/a available
> ---------------------------------------------------------------------------------------------------------------------------
>
> Key: DERBY-2919
> URL: https://issues.apache.org/jira/browse/DERBY-2919
> Project: Derby
> Issue Type: Bug
> Components: Localization
> Affects Versions: 10.3.1.1
> Reporter: Stan Bradbury
> Priority: Minor
>
> Database created with territory=es_MX and table with colunName Excepci≤n (taken from exception text for "ERROR XJ001: Excepci≤n de Java:...") trying to specify the column as the primary key using alter table fails:
> Db Creation URL: connect 'jdbc:derby:toursMx;create=true;territory=es_MX';
> -- Create table
> Create table Ciudad_de_Mexico2
> ( nombre varchar(24),
> estado varchar(24),
> Excepci≤n int );
> -- Create PK
> ALTER TABLE Ciudad_de_Mexico2
> ADD CONSTRAINT Mx_PK2 Primary Key (
> Excepci≤n);
> -- ERROR 42831: 'EXCEPCI╙N' no puede ser una columna de clave primaria o clave - nica porque puede contener valores nulos.
> -- WORKAROUND: create the primary key when the table is created:
> Create table Ciudad_de_Mexico
> ( nombre varchar(24),
> estado varchar(24),
> Excepci≤n int constraint mx_pk Primary Key);
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Closed: (DERBY-2919) Alter table .. Add .. Primary Key fails
with Column not found when columnName contains localized characters - w/a
available
Posted by "Stan Bradbury (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-2919?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Stan Bradbury closed DERBY-2919.
--------------------------------
Resolution: Invalid
Opps, my mistake. Closing as Invalid
> Alter table .. Add .. Primary Key fails with Column not found when columnName contains localized characters - w/a available
> ---------------------------------------------------------------------------------------------------------------------------
>
> Key: DERBY-2919
> URL: https://issues.apache.org/jira/browse/DERBY-2919
> Project: Derby
> Issue Type: Bug
> Components: Localization
> Affects Versions: 10.3.1.1
> Reporter: Stan Bradbury
> Priority: Minor
>
> Database created with territory=es_MX and table with colunName Excepci≤n (taken from exception text for "ERROR XJ001: Excepci≤n de Java:...") trying to specify the column as the primary key using alter table fails:
> Db Creation URL: connect 'jdbc:derby:toursMx;create=true;territory=es_MX';
> -- Create table
> Create table Ciudad_de_Mexico2
> ( nombre varchar(24),
> estado varchar(24),
> Excepci≤n int );
> -- Create PK
> ALTER TABLE Ciudad_de_Mexico2
> ADD CONSTRAINT Mx_PK2 Primary Key (
> Excepci≤n);
> -- ERROR 42831: 'EXCEPCI╙N' no puede ser una columna de clave primaria o clave - nica porque puede contener valores nulos.
> -- WORKAROUND: create the primary key when the table is created:
> Create table Ciudad_de_Mexico
> ( nombre varchar(24),
> estado varchar(24),
> Excepci≤n int constraint mx_pk Primary Key);
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.