Issue 24498 - Can't edit mysql tables with multiple unique indexes or combined primary fields
Summary: Can't edit mysql tables with multiple unique indexes or combined primary fields
Status: CLOSED DUPLICATE of issue 26432
Alias: None
Product: Base
Classification: Application
Component: code (show other issues)
Version: OOo 1.1
Hardware: All All
: P3 Trivial with 2 votes (vote)
Target Milestone: ---
Assignee: marc.neumann
QA Contact: issues@dba
URL:
Keywords: oooqa
Depends on:
Blocks:
 
Reported: 2004-01-17 16:34 UTC by alex.thurgood
Modified: 2006-05-31 14:29 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
OOo screen corruption on multiple indexed mysql tables (50.46 KB, image/png)
2004-01-17 16:49 UTC, alex.thurgood
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description alex.thurgood 2004-01-17 16:34:08 UTC
Mysql lets you set several fields as part of a single primary field or define
several different fields as unique. If you have a table that has such a
structure and then try to enter data in any of the fields via the OOo gui, you
get the following message :

[MySQL][ODBC 3.51 Driver][mysqld-4.0.15'-Max']You have an error in yourSQL
syntax.  Check the manual that corresponds to your MySQL serverversion for the
right syntax to use near '00000000000000000e+00 AND`test3`.`keyword1` = 'test''
at line 

The end result is that you can not save any entered data into the table, whether
in the data grid or via a form. THe problem occurs both on Windows and Linux
OOo1.1. Excel is capable of handling such data structures, and will let you
enter and modify mysql data via the gui.

If you want to try this, someone on the French list did the following (I created
my table originally via webmin, but the result is the same :

# Table Structure `essaitony`
CREATE TABLE `essaitony` (
`cle` int(10) NOT NULL default '0',
`kjfd` varchar(50) NOT NULL default '',
`cle2` int(10) NOT NULL default '0',
`bs` varchar(50) NOT NULL default '',
`shs` varchar(50) NOT NULL default '',
UNIQUE KEY `cle` (`cle`,`cle2`),
UNIQUE KEY `cletony` (`bs`,`cle`,`cle2`))
TYPE=MyISAM;

Alex
Comment 1 alex.thurgood 2004-01-17 16:34:48 UTC
setting oooqa
Comment 2 alex.thurgood 2004-01-17 16:47:58 UTC
More info.

I've been playing with this. Although the message appears saying that an error
is generated, repeatedly hitting the "star" icon button in the grid/table view
of the DSB appears to insert the data, but screen corruption occurs.

I've included a screen shot to show what I mean. I have also just checked via
the mysql command line whether the data is actually entered in the table and it
is, so there is obviously a problem here somewhere along the line.
Comment 3 alex.thurgood 2004-01-17 16:49:17 UTC
Created attachment 12531 [details]
OOo screen corruption on multiple indexed mysql tables
Comment 4 Frank Schönheit 2004-01-19 08:57:33 UTC
correcting sub component (see
http://www.openoffice.org/issues/describecomponents.cgi?component=Database%20access,
please), and default owner
Comment 5 marc.neumann 2004-01-19 15:53:07 UTC
Hi, 

I guess you use a french locale with a "," as decimal delimiter.
Please use a english locale with a "." as decimal delimiter. The ODBC driver
doesn't work correct with a "," as delimiter.

Does the issue still occurr with an english locale?

Bye Marc

Comment 6 alex.thurgood 2004-01-19 18:31:14 UTC
I have tried this with another table structure on my Linux box, with OOo EN :

Field name 	Type 	Allow nulls? 	Key 	Default value 	Extras
id 	int(11) 	No 	Primary 	0  	 
keyword1 	varchar(10) 	No 	Primary 	  	 
keyword2 	varchar(10) 	Yes 	None 	  	 
keyword3 	varchar(10) 	Yes 	None 	  	 

So I don't think the locale makes a difference. Note that the problem occurs
when two fields are designated as forming part of the primary key. The data can
be entered via the OOo UI if you force it, but then you get incoherent data in
the id field.

Alex
Comment 7 hans_werner67 2004-02-02 12:33:31 UTC
change subcomponent to 'none'
Comment 8 alex.thurgood 2004-02-28 13:22:32 UTC
What does changing the subcomponent to none imply ? That nobody wants to take it ?
Just curious.

Alex
Comment 10 alex.thurgood 2004-03-15 06:56:35 UTC
Has this been accepted as a bug or not ? I'm afraid I don't understand what
status this issue actually has at the moment.

Alex
Comment 11 flibby05 2004-03-15 13:47:56 UTC
Hi Alex,

your issue is qualified as "NEW" and currently waiting in the queue to be
processed further by a developer.

see also this page for explanation:
http://www.openoffice.org/bugs/issues.html
Comment 12 marc.neumann 2004-03-22 09:49:54 UTC
this issue is a duplicate of issue 26432

Yes, I know the handling is not right, I have to set issue 26432 as a duplicate
to this one, however the other one is more clear and it's was send to the right
developer allready.

I will add a comment to issue 26432, that this issue should be tested also.

Bye Marc

*** This issue has been marked as a duplicate of 26432 ***
Comment 13 marc.neumann 2004-03-22 09:50:32 UTC
close this one