re: re: innodb tables backup

2002-10-25 Thread Paul DuBois
At 12:44 +0200 10/25/02, Natale Babbo wrote:

i tried it ... but nothing to do!
when mysql parse the foreign key in the create table i
get the error.

perhaps i'm wronging in restoring tables/db!

i use this method:
shell> mysql -u  -p < 

is it wrong?


Depends.

- DId you add the SET FOREIGN_KEY_CHECKS = 0; statement to the dump
  file?
- What version of MySQL do you have?

If you added the statement, and you have a recent enough version of
MySQL, then it will work not only for the INSERT statements in the
dump file, but for the CREATE TABLE statements as well.



thanks.
Natale Babbo



 --- Victoria Reznichenko
<[EMAIL PROTECTED]> ha scritto: >
Natale,

 Friday, October 25, 2002, 10:08:00 AM, you wrote:

 NB> ok ... that's right for data (insert into ...)
 ... but
 NB> i get the error before ... when mysql try to
 create
 NB> child table:
 NB> CREATE TABLE ... idParent BIGINT, INDEX
 idpar_ind
 NB> (idParent), FOREIGN KEY (idParent) REFERENCES
 NB> parent(id)
 NB> .. when mysql parses the foreign key, parent
 table
 NB> doesn't exist yet!

 No, it's true not only for data.
 Put

 SET FOREIGN_KEY_CHECKS=0;

 in the dump file and then restore tables. It works
 fine for me.

 NB>  --- Victoria Reznichenko
 NB> <[EMAIL PROTECTED]> ha scritto: >
 NB> Natale,
 >> Thursday, October 24, 2002, 10:57:00 AM, you
 wrote:
 >>
 >> NB> Anyone knows how to backup innodb tables in
 the
 >> right
 >> NB> sql order?
 >> NB> ... i mean ... to allow restoring correctly
 >> NB> without foreign key constraint violation (if
 in
 >> the
 >> NB> backup file ddl code for the child table is
 >> before ddl
 >> NB> code for the parent table i get an error).
 >>
 >> You can set up SET FOREIGN_KEY_CHECKS=0, in this
 >> case foreign key
 >> constraints will not be checked. It's supported
 >> since 3.23.52 and

 > >> 4.0.3



-
Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




re: re: re: innodb tables backup

2002-10-25 Thread Victoria Reznichenko
Natale,
Friday, October 25, 2002, 1:44:19 PM, you wrote:

NB> i tried it ... but nothing to do!
NB> when mysql parse the foreign key in the create table i
NB> get the error.

NB> perhaps i'm wronging in restoring tables/db!

NB> i use this method:
shell> mysql -u  -p < 

NB> is it wrong?

What version of MySQL server do you use?
I already wrote you that it works only since 3.23.52 and 4.0.3


-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Victoria Reznichenko
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
   <___/   www.mysql.com





-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




re: re: innodb tables backup

2002-10-25 Thread Natale Babbo
i tried it ... but nothing to do!
when mysql parse the foreign key in the create table i
get the error.

perhaps i'm wronging in restoring tables/db!

i use this method:
shell> mysql -u  -p < 

is it wrong?

thanks.
Natale Babbo



 --- Victoria Reznichenko
<[EMAIL PROTECTED]> ha scritto: >
Natale,
> Friday, October 25, 2002, 10:08:00 AM, you wrote:
> 
> NB> ok ... that's right for data (insert into ...)
> ... but
> NB> i get the error before ... when mysql try to
> create
> NB> child table:
> NB> CREATE TABLE ... idParent BIGINT, INDEX
> idpar_ind
> NB> (idParent), FOREIGN KEY (idParent) REFERENCES
> NB> parent(id)
> NB> .. when mysql parses the foreign key, parent
> table
> NB> doesn't exist yet!
> 
> No, it's true not only for data.
> Put
> 
> SET FOREIGN_KEY_CHECKS=0;
> 
> in the dump file and then restore tables. It works
> fine for me.
> 
> NB>  --- Victoria Reznichenko
> NB> <[EMAIL PROTECTED]> ha scritto: >
> NB> Natale,
> >> Thursday, October 24, 2002, 10:57:00 AM, you
> wrote:
> >> 
> >> NB> Anyone knows how to backup innodb tables in
> the
> >> right
> >> NB> sql order?
> >> NB> ... i mean ... to allow restoring correctly
> >> NB> without foreign key constraint violation (if
> in
> >> the
> >> NB> backup file ddl code for the child table is
> >> before ddl
> >> NB> code for the parent table i get an error).
> >> 
> >> You can set up SET FOREIGN_KEY_CHECKS=0, in this
> >> case foreign key
> >> constraints will not be checked. It's supported
> >> since 3.23.52 and
> >> 4.0.3
> 
> 
> -- 
> For technical support contracts, goto
> https://order.mysql.com/?ref=ensita
> This email is sponsored by Ensita.net
> http://www.ensita.net/
>__  ___ ___   __
>   /  |/  /_ __/ __/ __ \/ /Victoria Reznichenko
>  / /|_/ / // /\ \/ /_/ / /__  
> [EMAIL PROTECTED]
> /_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
><___/   www.mysql.com
> 
> 
> 
> 
> 
>
-
> Before posting, please check:
>http://www.mysql.com/manual.php   (the manual)
>http://lists.mysql.com/   (the list
> archive)
> 
> To request this thread, e-mail
> <[EMAIL PROTECTED]>
> To unsubscribe, e-mail
>
<[EMAIL PROTECTED]>
> Trouble unsubscribing? Try:
> http://lists.mysql.com/php/unsubscribe.php
>  

__
Mio Yahoo!: personalizza Yahoo! come piace a te 
http://it.yahoo.com/mail_it/foot/?http://it.my.yahoo.com/

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




re: re: innodb tables backup

2002-10-25 Thread Victoria Reznichenko
Natale,
Friday, October 25, 2002, 10:08:00 AM, you wrote:

NB> ok ... that's right for data (insert into ...) ... but
NB> i get the error before ... when mysql try to create
NB> child table:
NB> CREATE TABLE ... idParent BIGINT, INDEX idpar_ind
NB> (idParent), FOREIGN KEY (idParent) REFERENCES
NB> parent(id)
NB> .. when mysql parses the foreign key, parent table
NB> doesn't exist yet!

No, it's true not only for data.
Put

SET FOREIGN_KEY_CHECKS=0;

in the dump file and then restore tables. It works fine for me.

NB>  --- Victoria Reznichenko
NB> <[EMAIL PROTECTED]> ha scritto: >
NB> Natale,
>> Thursday, October 24, 2002, 10:57:00 AM, you wrote:
>> 
>> NB> Anyone knows how to backup innodb tables in the
>> right
>> NB> sql order?
>> NB> ... i mean ... to allow restoring correctly
>> NB> without foreign key constraint violation (if in
>> the
>> NB> backup file ddl code for the child table is
>> before ddl
>> NB> code for the parent table i get an error).
>> 
>> You can set up SET FOREIGN_KEY_CHECKS=0, in this
>> case foreign key
>> constraints will not be checked. It's supported
>> since 3.23.52 and
>> 4.0.3


-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Victoria Reznichenko
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
   <___/   www.mysql.com





-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




re: innodb tables backup

2002-10-25 Thread Natale Babbo
ok ... that's right for data (insert into ...) ... but
i get the error before ... when mysql try to create
child table:
CREATE TABLE ... idParent BIGINT, INDEX idpar_ind
(idParent), FOREIGN KEY (idParent) REFERENCES
parent(id)
.. when mysql parses the foreign key, parent table
doesn't exist yet!

bye and thanks.
Natale Babbo





 --- Victoria Reznichenko
<[EMAIL PROTECTED]> ha scritto: >
Natale,
> Thursday, October 24, 2002, 10:57:00 AM, you wrote:
> 
> NB> Anyone knows how to backup innodb tables in the
> right
> NB> sql order?
> NB> ... i mean ... to allow restoring correctly
> NB> without foreign key constraint violation (if in
> the
> NB> backup file ddl code for the child table is
> before ddl
> NB> code for the parent table i get an error).
> 
> You can set up SET FOREIGN_KEY_CHECKS=0, in this
> case foreign key
> constraints will not be checked. It's supported
> since 3.23.52 and
> 4.0.3
> 
> 
> -- 
> For technical support contracts, goto
> https://order.mysql.com/?ref=ensita
> This email is sponsored by Ensita.net
> http://www.ensita.net/
>__  ___ ___   __
>   /  |/  /_ __/ __/ __ \/ /Victoria Reznichenko
>  / /|_/ / // /\ \/ /_/ / /__  
> [EMAIL PROTECTED]
> /_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
><___/   www.mysql.com
> 
> 
> 
> 
> 
>
-
> Before posting, please check:
>http://www.mysql.com/manual.php   (the manual)
>http://lists.mysql.com/   (the list
> archive)
> 
> To request this thread, e-mail
> <[EMAIL PROTECTED]>
> To unsubscribe, e-mail
>
<[EMAIL PROTECTED]>
> Trouble unsubscribing? Try:
> http://lists.mysql.com/php/unsubscribe.php
>  

__
Mio Yahoo!: personalizza Yahoo! come piace a te 
http://it.yahoo.com/mail_it/foot/?http://it.my.yahoo.com/

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: InnoDB Tables Backup

2002-10-24 Thread Michael T. Babcock
... can someone add InnoDB to the list of keywords??  SQL ... QUERY ...

Victoria Reznichenko wrote:


You can set up SET FOREIGN_KEY_CHECKS=0, in this case foreign key
constraints will not be checked. It's supported since 3.23.52 and
4.0.3


Out of curiousity, are the foreign key constraints checked within a 
transaction, or during commit?  You could (if they're checked at commit) 
wrap the restore with a BEGIN & COMMIT block.

--
Michael T. Babcock
C.T.O., FibreSpeed Ltd.
http://www.fibrespeed.net/~mbabcock



-
Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



re: innodb tables backup

2002-10-24 Thread Victoria Reznichenko
Natale,
Thursday, October 24, 2002, 10:57:00 AM, you wrote:

NB> Anyone knows how to backup innodb tables in the right
NB> sql order?
NB> ... i mean ... to allow restoring correctly
NB> without foreign key constraint violation (if in the
NB> backup file ddl code for the child table is before ddl
NB> code for the parent table i get an error).

You can set up SET FOREIGN_KEY_CHECKS=0, in this case foreign key
constraints will not be checked. It's supported since 3.23.52 and
4.0.3


-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Victoria Reznichenko
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
   <___/   www.mysql.com





-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




innodb tables backup

2002-10-24 Thread Natale Babbo
Anyone knows how to backup innodb tables in the right
sql order?
... i mean ... to allow restoring correctly
without foreign key constraint violation (if in the
backup file ddl code for the child table is before ddl
code for the parent table i get an error).

Thanks in advance.
Natale Babbo

__
Mio Yahoo!: personalizza Yahoo! come piace a te 
http://it.yahoo.com/mail_it/foot/?http://it.my.yahoo.com/

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php