Re: How to get the name of the last failed FK constraint

2005-06-02 Thread mfatene
Hi,
Status;

gives your own session id. To be combined to show innodb status (ksh or perl).

Mathias

Selon Frank Schröder [EMAIL PROTECTED]:

 [EMAIL PROTECTED] wrote:
  Frank Schröder [EMAIL PROTECTED] wrote on 05/31/2005 03:18:11 AM:
 
 
 Hello,
 
 I have an InnoDB table running on MySQL 4.1.11 with multiple FK
 constraints. I'm accessing it via JDBC from Java.
 
 When an FK constraint fails with error 1216 I need to know which of the
 constraints failed.
 
 SHOW INNODB STATUS returns the following output
 
 ...
 CONSTRAINT `u_registration_ibfk_1` FOREIGN KEY (`DEVICE_ID`)
 REFERENCES `u_device` (`DEVICE_ID`)
 ...
 
 Is there a way of getting to the name of the last failed FK constraint
 without using SHOW INNODB STATUS? What I need is the
 'u_registration_ibfk_1' from the above example.
 
 Any help is highly appreciated
 
 --
 Frank
 
 
 
  Have you looked at the results of SHOW INNODB STATUS; ?
 
  Shawn Green
  Database Administrator
  Unimin Corporation - Spruce Pine

 Yes, as you can see from my original post I'm actually trying to figure
 out how to do this  *without* SHOW INNODB STATUS as this reports the
 last FK failure for the entire engine and not just my session - at least
 that's how I interpret the documentation.

 The thing that's really a headscratcher for me is why its possible for
 me to set a name for a constraint if it isn't displayed in an error and
 I can't get to it. It's useless. I have a hard time believing that so I
 figure that I just haven't figured out how to get to it. I just didn't
 think that it was so hard.

 --
 Frank

 --
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]





-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: How to get the name of the last failed FK constraint

2005-06-02 Thread Frank Schröder

[EMAIL PROTECTED] wrote:

Hi,
Status;

gives your own session id. To be combined to show innodb status (ksh or perl).

Mathias


I'm not sure I understand.

Are you saying that SHOW INNODB STATUS shows only the information of the 
current session or that I can supply a session id to the call?


--
Frank

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: How to get the name of the last failed FK constraint

2005-06-02 Thread mfatene
I say this :
Enter password: ***
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1 to server version: 4.1.11-nt-max-log

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql status
--
mysql  Ver 14.7 Distrib 4.1.11, for Win32 (ia32)

Connection id:  1
Current database:
Current user:   [EMAIL PROTECTED]
SSL:Not in use
Using delimiter:;
Server version: 4.1.11-nt-max-log
Protocol version:   10
Connection: localhost via TCP/IP
Server characterset:latin2
Db characterset:latin2
Client characterset:latin1
Conn.  characterset:latin1
TCP port:   3306
Uptime: 12 hours 17 min 30 sec

Threads: 1  Questions: 3  Slow queries: 0  Opens: 11  Flush tables: 1  Open
tables: 0  Queries per second avg: 0.000
--

mysql


Connection id:  1 is yours.

Mathias

Selon Frank Schröder [EMAIL PROTECTED]:

 [EMAIL PROTECTED] wrote:
  Hi,
  Status;
 
  gives your own session id. To be combined to show innodb status (ksh or
 perl).
 
  Mathias
 
 I'm not sure I understand.

 Are you saying that SHOW INNODB STATUS shows only the information of the
 current session or that I can supply a session id to the call?

 --
 Frank

 --
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]





-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: How to get the name of the last failed FK constraint

2005-06-01 Thread SGreen
Frank Schröder [EMAIL PROTECTED] wrote on 05/31/2005 03:18:11 AM:

 Hello,
 
 I have an InnoDB table running on MySQL 4.1.11 with multiple FK
 constraints. I'm accessing it via JDBC from Java.
 
 When an FK constraint fails with error 1216 I need to know which of the
 constraints failed.
 
 SHOW INNODB STATUS returns the following output
 
 ...
 CONSTRAINT `u_registration_ibfk_1` FOREIGN KEY (`DEVICE_ID`)
 REFERENCES `u_device` (`DEVICE_ID`)
 ...
 
 Is there a way of getting to the name of the last failed FK constraint
 without using SHOW INNODB STATUS? What I need is the
 'u_registration_ibfk_1' from the above example.
 
 Any help is highly appreciated
 
 --
 Frank
 

Have you looked at the results of SHOW INNODB STATUS; ?

Shawn Green
Database Administrator
Unimin Corporation - Spruce Pine

Re: How to get the name of the last failed FK constraint

2005-06-01 Thread Frank Schröder

[EMAIL PROTECTED] wrote:

Frank Schröder [EMAIL PROTECTED] wrote on 05/31/2005 03:18:11 AM:



Hello,

I have an InnoDB table running on MySQL 4.1.11 with multiple FK
constraints. I'm accessing it via JDBC from Java.

When an FK constraint fails with error 1216 I need to know which of the
constraints failed.

SHOW INNODB STATUS returns the following output

   ...
   CONSTRAINT `u_registration_ibfk_1` FOREIGN KEY (`DEVICE_ID`)
REFERENCES `u_device` (`DEVICE_ID`)
   ...

Is there a way of getting to the name of the last failed FK constraint
without using SHOW INNODB STATUS? What I need is the
'u_registration_ibfk_1' from the above example.

Any help is highly appreciated

--
Frank




Have you looked at the results of SHOW INNODB STATUS; ?

Shawn Green
Database Administrator
Unimin Corporation - Spruce Pine


Yes, as you can see from my original post I'm actually trying to figure 
out how to do this  *without* SHOW INNODB STATUS as this reports the 
last FK failure for the entire engine and not just my session - at least 
that's how I interpret the documentation.


The thing that's really a headscratcher for me is why its possible for 
me to set a name for a constraint if it isn't displayed in an error and 
I can't get to it. It's useless. I have a hard time believing that so I 
figure that I just haven't figured out how to get to it. I just didn't 
think that it was so hard.


--
Frank

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: How to get the name of the last failed FK constraint

2005-06-01 Thread Keith Ivey

Frank Schröder wrote:

The thing that's really a headscratcher for me is why its possible for 
me to set a name for a constraint if it isn't displayed in an error and 
I can't get to it. It's useless.


Same as setting a name for an index -- it allows you to alter or delete it 
later.

--
Keith Ivey [EMAIL PROTECTED]
Smokefree DC
http://www.smokefreedc.org
Washington, DC

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



How to get the name of the last failed FK constraint

2005-05-31 Thread Frank Schröder

Hello,

I have an InnoDB table running on MySQL 4.1.11 with multiple FK
constraints. I'm accessing it via JDBC from Java.

When an FK constraint fails with error 1216 I need to know which of the
constraints failed.

SHOW INNODB STATUS returns the following output

   ...
   CONSTRAINT `u_registration_ibfk_1` FOREIGN KEY (`DEVICE_ID`)
REFERENCES `u_device` (`DEVICE_ID`)
   ...

Is there a way of getting to the name of the last failed FK constraint
without using SHOW INNODB STATUS? What I need is the
'u_registration_ibfk_1' from the above example.

Any help is highly appreciated

--
Frank

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



How to get the name of the last failed FK constraint

2005-05-23 Thread Frank Schrder

Hello,

I have an InnoDB table running on MySQL 4.1.11 with multiple FK 
constraints. I'm accessing it via JDBC from Java.


When an FK constraint fails with error 1216 I need to know which of the 
constraints failed.


SHOW INNODB STATUS returns the following output

   ...
   CONSTRAINT `u_registration_ibfk_1` FOREIGN KEY (`DEVICE_ID`) 
REFERENCES `u_device` (`DEVICE_ID`)

   ...

Is there a way of getting to the name of the last failed FK constraint 
without using SHOW INNODB STATUS? What I need is the 
'u_registration_ibfk_1' from the above example.


Any help is highly appreciated

--
Frank

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]