Re: importing a dumpfile from with the mysql client

2006-05-07 Thread Luke Vanderfluit

Hi.

sheeri kritzer wrote:


Ah, I get it.I don't know if there's a way to do that, but why not
just put the SQL statements in the file?

-Sheeri


Thanks George.
You're right, that's what I meant.

Sheeri, it would be quite possible to put it the dumpfile, if the 
dumpfile was editable (-:

The dumpfile we are using is so large that I can't open it with any editor.

So again the question is:
If the remote session is still active but I haven't carried out those 
commands and the database has been updated, modified, manipulated etc. 
in the meantime, is there a danger in closing the session or carrying 
out the commands several days later ?


The commands that I am talking about are:
> mysql> SET FOREIGN_KEY_CHECKS = 1;
> mysql> COMMIT;

Thanks.
Kind regards.


On 5/5/06, George Law <[EMAIL PROTECTED]> wrote:


I think what he is saying is that be began the "transaction" in a
command line client
session from one location but was not able to give the

> mysql> SET FOREIGN_KEY_CHECKS = 1;
> mysql> COMMIT;

commands in the same session. (ie - I owe, I owe, its off to work I go
:)  )

This is a good question, one I have wondered about myself.

Is there a way in mysql to "attach" to session to issue a commit?




-Original Message-
From: sheeri kritzer [mailto:[EMAIL PROTECTED]
Sent: Friday, May 05, 2006 3:02 PM
To: Luke Vanderfluit
Cc: MySQL List
Subject: Re: importing a dumpfile from with the mysql client

On 5/4/06, Luke Vanderfluit <[EMAIL PROTECTED]> wrote:

[snip]

> I started this process remotely then went to the site to finish it.
> But when the dump finished (several hours later) I was not able to
> execute the following commands from my original location.
>
> mysql> SET FOREIGN_KEY_CHECKS = 1;
> mysql> COMMIT;

What do you mean "you were not able"?  Did you get an error?  Was the
server hung?  Did the keyboard stick to make you unable to type the
commands?
>
> My question is:
> Since the import completed the database has grown in size and been
> backed up etc.
> Yet from the original session I have not executed those 2 commands.
>
> Is it safe to execute them? Or would executing them cause corruption
or
> other unforseen stuff?
> Is it unnecessary to execute them?
> Is it safe to kill that original mysql session?

Those 2 commands, in and of themselves, aren't dangerous.  It's what's
in the script that could be the problem.  However, since you really
didn't mention what error you got, it's not easy to figure out how to
fix it.

It depends what tables you're running these on.  If you're running
them on MyISAM tables, deadlocking cannot happen.  Then again,
transactions are meaningless too.  If you're running on InnoDB you
have the possibility of deadlocking, but MySQL is pretty good about
avoiding that.

If other users/applications are writing to the SAME data then there's
the possibility of inconsistent data, but I wouldn't expect
corruption.

if you post what errors you actually got, I might be able to help.
Also, are you using the same db and tables that other apps/users are
using?  Does the dumpfile contain "DROP TABLE IF EXISTS" commands?

-Sheeri
>
> --
> Luke Vanderfluit.
> Analyst/Programmer.
> Internode Systems Pty. Ltd.
>
>
> --
> 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]


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







--
Luke Vanderfluit.
Analyst/Programmer.
Internode Systems Pty. Ltd.


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



Re: importing a dumpfile from with the mysql client

2006-05-05 Thread sheeri kritzer

Ah, I get it.I don't know if there's a way to do that, but why not
just put the SQL statements in the file?

-Sheeri

On 5/5/06, George Law <[EMAIL PROTECTED]> wrote:

I think what he is saying is that be began the "transaction" in a
command line client
session from one location but was not able to give the

> mysql> SET FOREIGN_KEY_CHECKS = 1;
> mysql> COMMIT;

commands in the same session. (ie - I owe, I owe, its off to work I go
:)  )

This is a good question, one I have wondered about myself.

Is there a way in mysql to "attach" to session to issue a commit?




-Original Message-
From: sheeri kritzer [mailto:[EMAIL PROTECTED]
Sent: Friday, May 05, 2006 3:02 PM
To: Luke Vanderfluit
Cc: MySQL List
Subject: Re: importing a dumpfile from with the mysql client

On 5/4/06, Luke Vanderfluit <[EMAIL PROTECTED]> wrote:

[snip]

> I started this process remotely then went to the site to finish it.
> But when the dump finished (several hours later) I was not able to
> execute the following commands from my original location.
>
> mysql> SET FOREIGN_KEY_CHECKS = 1;
> mysql> COMMIT;

What do you mean "you were not able"?  Did you get an error?  Was the
server hung?  Did the keyboard stick to make you unable to type the
commands?
>
> My question is:
> Since the import completed the database has grown in size and been
> backed up etc.
> Yet from the original session I have not executed those 2 commands.
>
> Is it safe to execute them? Or would executing them cause corruption
or
> other unforseen stuff?
> Is it unnecessary to execute them?
> Is it safe to kill that original mysql session?

Those 2 commands, in and of themselves, aren't dangerous.  It's what's
in the script that could be the problem.  However, since you really
didn't mention what error you got, it's not easy to figure out how to
fix it.

It depends what tables you're running these on.  If you're running
them on MyISAM tables, deadlocking cannot happen.  Then again,
transactions are meaningless too.  If you're running on InnoDB you
have the possibility of deadlocking, but MySQL is pretty good about
avoiding that.

If other users/applications are writing to the SAME data then there's
the possibility of inconsistent data, but I wouldn't expect
corruption.

if you post what errors you actually got, I might be able to help.
Also, are you using the same db and tables that other apps/users are
using?  Does the dumpfile contain "DROP TABLE IF EXISTS" commands?

-Sheeri
>
> --
> Luke Vanderfluit.
> Analyst/Programmer.
> Internode Systems Pty. Ltd.
>
>
> --
> 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]


--
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: importing a dumpfile from with the mysql client

2006-05-05 Thread George Law
I think what he is saying is that be began the "transaction" in a
command line client 
session from one location but was not able to give the  

> mysql> SET FOREIGN_KEY_CHECKS = 1;
> mysql> COMMIT;

commands in the same session. (ie - I owe, I owe, its off to work I go
:)  )

This is a good question, one I have wondered about myself.

Is there a way in mysql to "attach" to session to issue a commit?




-Original Message-
From: sheeri kritzer [mailto:[EMAIL PROTECTED] 
Sent: Friday, May 05, 2006 3:02 PM
To: Luke Vanderfluit
Cc: MySQL List
Subject: Re: importing a dumpfile from with the mysql client

On 5/4/06, Luke Vanderfluit <[EMAIL PROTECTED]> wrote:

[snip]

> I started this process remotely then went to the site to finish it.
> But when the dump finished (several hours later) I was not able to
> execute the following commands from my original location.
>
> mysql> SET FOREIGN_KEY_CHECKS = 1;
> mysql> COMMIT;

What do you mean "you were not able"?  Did you get an error?  Was the
server hung?  Did the keyboard stick to make you unable to type the
commands?
>
> My question is:
> Since the import completed the database has grown in size and been
> backed up etc.
> Yet from the original session I have not executed those 2 commands.
>
> Is it safe to execute them? Or would executing them cause corruption
or
> other unforseen stuff?
> Is it unnecessary to execute them?
> Is it safe to kill that original mysql session?

Those 2 commands, in and of themselves, aren't dangerous.  It's what's
in the script that could be the problem.  However, since you really
didn't mention what error you got, it's not easy to figure out how to
fix it.

It depends what tables you're running these on.  If you're running
them on MyISAM tables, deadlocking cannot happen.  Then again,
transactions are meaningless too.  If you're running on InnoDB you
have the possibility of deadlocking, but MySQL is pretty good about
avoiding that.

If other users/applications are writing to the SAME data then there's
the possibility of inconsistent data, but I wouldn't expect
corruption.

if you post what errors you actually got, I might be able to help. 
Also, are you using the same db and tables that other apps/users are
using?  Does the dumpfile contain "DROP TABLE IF EXISTS" commands?

-Sheeri
>
> --
> Luke Vanderfluit.
> Analyst/Programmer.
> Internode Systems Pty. Ltd.
>
>
> --
> 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]


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



Re: importing a dumpfile from with the mysql client

2006-05-05 Thread sheeri kritzer

On 5/4/06, Luke Vanderfluit <[EMAIL PROTECTED]> wrote:

[snip]


I started this process remotely then went to the site to finish it.
But when the dump finished (several hours later) I was not able to
execute the following commands from my original location.

mysql> SET FOREIGN_KEY_CHECKS = 1;
mysql> COMMIT;


What do you mean "you were not able"?  Did you get an error?  Was the
server hung?  Did the keyboard stick to make you unable to type the
commands?


My question is:
Since the import completed the database has grown in size and been
backed up etc.
Yet from the original session I have not executed those 2 commands.

Is it safe to execute them? Or would executing them cause corruption or
other unforseen stuff?
Is it unnecessary to execute them?
Is it safe to kill that original mysql session?


Those 2 commands, in and of themselves, aren't dangerous.  It's what's
in the script that could be the problem.  However, since you really
didn't mention what error you got, it's not easy to figure out how to
fix it.

It depends what tables you're running these on.  If you're running
them on MyISAM tables, deadlocking cannot happen.  Then again,
transactions are meaningless too.  If you're running on InnoDB you
have the possibility of deadlocking, but MySQL is pretty good about
avoiding that.

If other users/applications are writing to the SAME data then there's
the possibility of inconsistent data, but I wouldn't expect
corruption.

if you post what errors you actually got, I might be able to help. 
Also, are you using the same db and tables that other apps/users are

using?  Does the dumpfile contain "DROP TABLE IF EXISTS" commands?

-Sheeri


--
Luke Vanderfluit.
Analyst/Programmer.
Internode Systems Pty. Ltd.


--
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]