Re: MySQL Server has gone away

2010-08-20 Thread Ananda Kumar
R u trying to connect as user owning all the database.
Looks like there is permission issue.

Please make sure, the user ur logging in has all rights on all the database
in mysql.

regards
anandkl

On Thu, Aug 19, 2010 at 8:37 PM, jitendra ranjan
jitendra_ran...@yahoo.comwrote:

 Here is few lines from log:

 100703 22:12:48 mysqld ended
 100703 22:23:39 mysqld started
 100703 22:23:40 [Warning] option 'max_join_size': unsigned value
 18446744073709551615 adjusted to 4294967295
 100703 22:23:40 [Warning] option 'max_join_size': unsigned value
 18446744073709551615 adjusted to 4294967295
 100703 22:23:40 [Warning] option 'thread_cache_size': unsigned value
 33554432 adjusted to 16384
 100703 22:23:41 InnoDB: Started; log sequence number 0 44054
 100703 22:23:41 [Warning] Neither --relay-log nor --relay-log-index were
 used; so replication may break when this MySQL server acts as a slave and
 has his hostname changed!! Please use '--relay-log=mysqld-relay-bin' to
 avoid this problem.
 100703 22:23:41 [ERROR] Failed to open the relay log
 '/var/run/mysqld/mysqld-relay-bin.01' (relay_log_pos 4)
 100703 22:23:41 [ERROR] Could not find target log during relay log
 initialization
 100703 22:23:41 [ERROR] Failed to initialize the master info structure
 100703 22:23:41 [Note] /usr/libexec/mysqld: ready for connections.
 Version: '5.0.77-log' socket: '/var/lib/mysql/mysql.sock' port: 3306 Source
 distribution
 100710 22:28:32 [Note] /usr/libexec/mysqld: Normal shutdown
 100710 22:28:34 InnoDB: Starting shutdown...
 100710 22:28:36 InnoDB: Shutdown completed; log sequence number 0 44054
 100710 22:28:36 [Note] /usr/libexec/mysqld: Shutdown complete
 100710 22:28:36 mysqld ended
 100711 01:42:09 mysqld started
 100711 1:42:10 [Warning] option 'max_join_size': unsigned value
 18446744073709551615 adjusted to 4294967295
 100711 1:42:10 [Warning] option 'max_join_size': unsigned value
 18446744073709551615 adjusted to 4294967295
 100711 1:42:10 [Warning] option 'thread_cache_size': unsigned value
 33554432 adjusted to 16384
 100711 1:42:10 InnoDB: Started; log sequence number 0 44054
 100711 1:42:11 [Warning] Neither --relay-log nor --relay-log-index were
 used; so replication may break when this MySQL server acts as a slave and
 has his hostname changed!! Please use '--relay-log=mysqld-relay-bin' to
 avoid this problem.
 100711 1:42:11 [ERROR] Failed to open the relay log
 '/var/run/mysqld/mysqld-relay-bin.01' (relay_log_pos 4)
 100711 1:42:11 [ERROR] Could not find target log during relay log
 initialization
 100711 1:42:11 [ERROR] Failed to initialize the master info structure
 100711 1:42:11 [Note] /usr/libexec/mysqld: ready for connections.
 Version: '5.0.77-log' socket: '/var/lib/mysql/mysql.sock' port: 3306 Source
 distribution
 100726 9:37:14 [Warning] Warning: Enabling keys got errno 137 on
 reachout.#sql-d4d_23af19, retrying
 100804 10:48:04 [ERROR] /usr/libexec/mysqld: Can't find file:
 './reachout/tbl_customer_reachout_new.frm' (errno: 13)
 100804 10:48:04 [ERROR] /usr/libexec/mysqld: Can't find file:
 './reachout/tbl_customer_reachout_new.frm' (errno: 13)
 100804 10:48:05 [ERROR] /usr/libexec/mysqld: Can't find file:
 './reachout/tbl_customer_reachout_new.frm' (errno: 13)
 100804 10:48:05 [ERROR] /usr/libexec/mysqld: Can't find file:
 './reachout/tbl_customer_reachout_new.frm' (errno: 13)
 100804 10:54:17 [ERROR] /usr/libexec/mysqld: Can't find file:
 './reachout/tbl_customer_reachout_new.frm' (errno: 13)
 100804 10:54:17 [ERROR] /usr/libexec/mysqld: Can't find file:
 './reachout/tbl_customer_reachout_new.frm' (errno: 13)
 100804 10:54:20 [ERROR] /usr/libexec/mysqld: Can't find file:
 './reachout/tbl_customer_reachout_new.frm' (errno: 13)
 100804 10:54:20 [ERROR] /usr/libexec/mysqld: Can't find file:
 './reachout/tbl_customer_reachout_new.frm' (errno: 13)
 100804 10:54:34 [ERROR] /usr/libexec/mysqld: Can't find file:
 './reachout/tbl_customer_reachout_new.frm' (errno: 13)
 100804 10:54:34 [ERROR] /usr/libexec/mysqld: Can't find file:
 './reachout/tbl_customer_reachout_new.frm' (errno: 13)
 100813 19:04:51 [Note] /usr/libexec/mysqld: Normal shutdown
 100813 19:04:54 InnoDB: Starting shutdown...
 100813 19:04:59 InnoDB: Shutdown completed; log sequence number 0 44054
 100813 19:04:59 [Note] /usr/libexec/mysqld: Shutdown complete
 100813 19:04:59 mysqld ended
 100813 19:07:46 mysqld started
 100813 19:07:46 [Warning] option 'max_join_size': unsigned value
 18446744073709551615 adjusted to 4294967295
 100813 19:07:46 [Warning] option 'max_join_size': unsigned value
 18446744073709551615 adjusted to 4294967295
 100813 19:07:46 [Warning] option 'thread_cache_size': unsigned value
 33554432 adjusted to 16384
 100813 19:07:46 InnoDB: Started; log sequence number 0 44054
 100813 19:07:47 [Warning] Neither --relay-log nor --relay-log-index were
 used; so replication may break when this MySQL server acts as a slave and
 has his hostname changed!! Please use '--relay-log=mysqld-relay-bin' to
 avoid this 

Re: Fixture List generation using MySQL

2010-08-20 Thread Tompkins Neil
Gavin,

Thanks for the great reply, this is actually what I was looking for.
 However, do you have any suggestions on how to order the fixtures / teams ?
 Basically the query is returning the teams grouped together like :

'2', '1'
'3', '1'
'4', '1'
'1', '2'
'3', '2'
'4', '2'
'1', '3'
'2', '3'
'4', '3'
'1', '4'
'2', '4'
'3', '4'

But ideally I'm looking for the data to be returned like

2 v 1
3 v 4

1 v 3
4 v 2 etc

Any suggestions ?

Cheers
Neil

On Thu, Aug 19, 2010 at 6:50 PM, Gavin Towey gto...@ffn.com wrote:

 That's almost a cartesean product; except you just want to eliminate
 results where a team would be paired up with itself.

  create table teams ( id serial );
 Query OK, 0 rows affected (0.02 sec)

  insert into teams values (), (), (), ();
 Query OK, 4 rows affected (0.05 sec)
 Records: 4  Duplicates: 0  Warnings: 0

 [ff] test select * from teams;
 ++
 | id |
 ++
 |  1 |
 |  2 |
 |  3 |
 |  4 |
 ++
 4 rows in set (0.00 sec)

  select * from locations;
 +--+
 | name |
 +--+
 | home |
 | away |
 +--+
 2 rows in set (0.00 sec)


  select * from teams t1 JOIN teams t2;
 +++
 | id | id |
 +++
 |  1 |  1 |
 |  2 |  1 |
 |  3 |  1 |
 |  4 |  1 |
 |  1 |  2 |
 |  2 |  2 |
 |  3 |  2 |
 |  4 |  2 |
 |  1 |  3 |
 |  2 |  3 |
 |  3 |  3 |
 |  4 |  3 |
 |  1 |  4 |
 |  2 |  4 |
 |  3 |  4 |
 |  4 |  4 |
 +++
 16 rows in set (0.00 sec)


 With no join condition, we every possible combination of t1 paired with t2;
 however, this leads to the undesireable result that we have combinations
 like team 4 vs team 4.  So you just need to add a condition to prevent those
 rows from showing up:

  select * from teams t1 JOIN teams t2 ON t1.id!=t2.id;
 +++
 | id | id |
 +++
 |  2 |  1 |
 |  3 |  1 |
 |  4 |  1 |
 |  1 |  2 |
 |  3 |  2 |
 |  4 |  2 |
 |  1 |  3 |
 |  2 |  3 |
 |  4 |  3 |
 |  1 |  4 |
 |  2 |  4 |
 |  3 |  4 |
 +++
 12 rows in set (0.10 sec)


 Notice you get both combinations of 2 vs 1 and 1 vs 2, so you could just
 call whichever team is in the first column as the home team.


 Regards,
 Gavin Towey

 -Original Message-
 From: Tompkins Neil [mailto:neil.tompk...@googlemail.com]
 Sent: Thursday, August 19, 2010 10:07 AM
 To: [MySQL]
 Subject: Re: Fixture List generation using MySQL

 I'm looking at a routine / script to create the fixtures like

 team 1 vs team 2
 team 3 vs team 4
 team 5 vs team 6 etc

 
 
 
  On Thu, Aug 19, 2010 at 3:44 PM, Peter Brawley 
  peter.braw...@earthlink.net wrote:
 
 
 
   I'm tasked with generating a list of fixtures from a table of teams,
  whereby
  each team plays each other home and away.  Does anyone have any
  experience
  generating such information using MySQL ?
 
 
  Basically ...
 
  select a.id,b.id from tbl a join tbl b on a.idb.id;
  union
  select a.id,b.id from tbl a join tbl b on a.idb.id;
 
  PB
 
  -
 
 
  On 8/19/2010 9:12 AM, Tompkins Neil wrote:
 
  Hi,
 
  I'm tasked with generating a list of fixtures from a table of teams,
  whereby
  each team plays each other home and away.  Does anyone have any
  experience
  generating such information using MySQL ?
 
  Thanks for any input.
 
  Regards
  Neil
 
 
 

 This message contains confidential information and is intended only for the
 individual named.  If you are not the named addressee, you are notified that
 reviewing, disseminating, disclosing, copying or distributing this e-mail is
 strictly prohibited.  Please notify the sender immediately by e-mail if you
 have received this e-mail by mistake and delete this e-mail from your
 system. E-mail transmission cannot be guaranteed to be secure or error-free
 as information could be intercepted, corrupted, lost, destroyed, arrive late
 or incomplete, or contain viruses. The sender therefore does not accept
 liability for any loss or damage caused by viruses or errors or omissions in
 the contents of this message, which arise as a result of e-mail
 transmission. [FriendFinder Networks, Inc., 220 Humbolt court, Sunnyvale, CA
 94089, USA, FriendFinder.com



Re: 5.1.x review

2010-08-20 Thread Johan De Meersman
2010/8/20 Elim PDT e...@pdtnetworks.net

 There are so many versions of 5.1, Is there some review or recommendations
 for a stable one? thanks


As far as I know, 5.1 is considered a stable branch, and you can safely take
the most recent release as it should contain mostly fixes.



-- 
Bier met grenadyn
Is als mosterd by den wyn
Sy die't drinkt, is eene kwezel
Hy die't drinkt, is ras een ezel


re: 5.1.x review

2010-08-20 Thread Michael Widenius

Hi!

 Elim == Elim PDT e...@pdtnetworks.net writes:

Elim There are so many versions of 5.1, Is there some review or
Elim recommendations for a stable one? thanks

Just download the latest MySQL 5.1 or MariaDB 5.1 release for your
platform.  Both should be stable enough for your usage.

Regards,
Monty

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: 5.1.x review

2010-08-20 Thread Jangita
On 20/08/2010 4:43 a, Elim PDT wrote:
 There are so many versions of 5.1, Is there some review or recommendations 
 for a stable one? thanks
I hear 5.1.50 has been released; should be stable. Just out of interest,
what OS are you using to host your mysql database?

-- 
Jangita | +256 76 91 8383 | Y!  MSN: jang...@yahoo.com
Skype: jangita | GTalk: jangita.nyag...@gmail.com

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: Seems like an easy query, but isn't to me. Help?

2010-08-20 Thread Jangita

On 20/08/2010 2:45 a, George Larson wrote:

I hope I've come to right place, and I'm asking in the right way -- please
accept my apologies if not.

We have some dates missing and I need to populate those fields with dates
from the record just before them.  I've gotten this far:

SELECT UUid, MIN(DDenteredDate) minDate FROM UUtable JOIN DDdetail on DDid =
UUid
WHERE
UUdate IS NULL
GROUP BY UUid;

I can make this a sub-query and get the UUid of the record that I want to
copy UUdate from:

SELECT sub.UUid-1 as previous, sub.* FROM (
SELECT UUid, MIN(DDenteredDate) minDate FROM UUtable JOIN DDdetail on DDid =
UUid
WHERE
UUdate IS NULL
GROUP BY UUid;
)  as sub;

In this case, the field 'previous' is the UUid that I want to copy the
UUdate from and sub.UUid is where I want to copy to.

Does that even make sense?

Thanks,
George

Can you send the table create statement so that we can see the 
structure? I'm guessing the date field is called uudate? (also specify 
the field that you want to populate with the record before) Is the 
primary key field uuid? are all the numbers in the primary key field 
sequential (1,2,3,4) with no gaps? I do have an idea but i need this 
info to see if it can work.

--
Jangita | +256 76 91 8383 | Y!  MSN: jang...@yahoo.com
Skype: jangita | GTalk: jangita.nyag...@gmail.com

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: 5.1.x review

2010-08-20 Thread Joerg Bruehe
Hi all!


Johan De Meersman wrote:
 2010/8/20 Elim PDT e...@pdtnetworks.net
 
 There are so many versions of 5.1, Is there some review or recommendations
 for a stable one? thanks
 
 
 As far as I know, 5.1 is considered a stable branch, and you can safely take
 the most recent release as it should contain mostly fixes.

Correct.
5.1 is considered production quality, also called GA (= generally
available).
It does not receive feature development any more (features must be
finished before the software is declared GA), but it receives bug
fixes and some further performance improvements (monthly updates).

Of course it is made by humans, and humans may make mistakes, so there
may be a 5.1 version with problems, but in general you should always
take the latest 5.1 version while that series is active.
As of today, this is MySQL 5.1.50.

When 5.1 reaches its end of active (support) life, this list will see
mails about that, together with information about the successor.


HTH,
Jörg

-- 
Joerg Bruehe,  MySQL Build Team,  joerg.bru...@oracle.com
ORACLE Deutschland B.V.  Co. KG,   Komturstrasse 18a,   D-12099 Berlin
Geschaeftsfuehrer: Juergen Kunz, Marcel v.d. Molen, Alexander v.d. Ven
Amtsgericht Muenchen: HRA 95603


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: MySQL Server has gone away

2010-08-20 Thread jitendra ranjan
The account has full permission on all the databases.

--- On Fri, 20/8/10, Ananda Kumar anan...@gmail.com wrote:


From: Ananda Kumar anan...@gmail.com
Subject: Re: MySQL Server has gone away
To: jitendra ranjan jitendra_ran...@yahoo.com
Cc: Krishna Chandra Prajapati prajapat...@gmail.com, Prabhat Kumar 
aim.prab...@gmail.com, mysql@lists.mysql.com
Date: Friday, 20 August, 2010, 1:13 PM


R u trying to connect as user owning all the database.
Looks like there is permission issue.

Please make sure, the user ur logging in has all rights on all the database
in mysql.

regards
anandkl

On Thu, Aug 19, 2010 at 8:37 PM, jitendra ranjan
jitendra_ran...@yahoo.comwrote:

 Here is few lines from log:

 100703 22:12:48 mysqld ended
 100703 22:23:39 mysqld started
 100703 22:23:40 [Warning] option 'max_join_size': unsigned value
 18446744073709551615 adjusted to 4294967295
 100703 22:23:40 [Warning] option 'max_join_size': unsigned value
 18446744073709551615 adjusted to 4294967295
 100703 22:23:40 [Warning] option 'thread_cache_size': unsigned value
 33554432 adjusted to 16384
 100703 22:23:41 InnoDB: Started; log sequence number 0 44054
 100703 22:23:41 [Warning] Neither --relay-log nor --relay-log-index were
 used; so replication may break when this MySQL server acts as a slave and
 has his hostname changed!! Please use '--relay-log=mysqld-relay-bin' to
 avoid this problem.
 100703 22:23:41 [ERROR] Failed to open the relay log
 '/var/run/mysqld/mysqld-relay-bin.01' (relay_log_pos 4)
 100703 22:23:41 [ERROR] Could not find target log during relay log
 initialization
 100703 22:23:41 [ERROR] Failed to initialize the master info structure
 100703 22:23:41 [Note] /usr/libexec/mysqld: ready for connections.
 Version: '5.0.77-log' socket: '/var/lib/mysql/mysql.sock' port: 3306 Source
 distribution
 100710 22:28:32 [Note] /usr/libexec/mysqld: Normal shutdown
 100710 22:28:34 InnoDB: Starting shutdown...
 100710 22:28:36 InnoDB: Shutdown completed; log sequence number 0 44054
 100710 22:28:36 [Note] /usr/libexec/mysqld: Shutdown complete
 100710 22:28:36 mysqld ended
 100711 01:42:09 mysqld started
 100711 1:42:10 [Warning] option 'max_join_size': unsigned value
 18446744073709551615 adjusted to 4294967295
 100711 1:42:10 [Warning] option 'max_join_size': unsigned value
 18446744073709551615 adjusted to 4294967295
 100711 1:42:10 [Warning] option 'thread_cache_size': unsigned value
 33554432 adjusted to 16384
 100711 1:42:10 InnoDB: Started; log sequence number 0 44054
 100711 1:42:11 [Warning] Neither --relay-log nor --relay-log-index were
 used; so replication may break when this MySQL server acts as a slave and
 has his hostname changed!! Please use '--relay-log=mysqld-relay-bin' to
 avoid this problem.
 100711 1:42:11 [ERROR] Failed to open the relay log
 '/var/run/mysqld/mysqld-relay-bin.01' (relay_log_pos 4)
 100711 1:42:11 [ERROR] Could not find target log during relay log
 initialization
 100711 1:42:11 [ERROR] Failed to initialize the master info structure
 100711 1:42:11 [Note] /usr/libexec/mysqld: ready for connections.
 Version: '5.0.77-log' socket: '/var/lib/mysql/mysql.sock' port: 3306 Source
 distribution
 100726 9:37:14 [Warning] Warning: Enabling keys got errno 137 on
 reachout.#sql-d4d_23af19, retrying
 100804 10:48:04 [ERROR] /usr/libexec/mysqld: Can't find file:
 './reachout/tbl_customer_reachout_new.frm' (errno: 13)
 100804 10:48:04 [ERROR] /usr/libexec/mysqld: Can't find file:
 './reachout/tbl_customer_reachout_new.frm' (errno: 13)
 100804 10:48:05 [ERROR] /usr/libexec/mysqld: Can't find file:
 './reachout/tbl_customer_reachout_new.frm' (errno: 13)
 100804 10:48:05 [ERROR] /usr/libexec/mysqld: Can't find file:
 './reachout/tbl_customer_reachout_new.frm' (errno: 13)
 100804 10:54:17 [ERROR] /usr/libexec/mysqld: Can't find file:
 './reachout/tbl_customer_reachout_new.frm' (errno: 13)
 100804 10:54:17 [ERROR] /usr/libexec/mysqld: Can't find file:
 './reachout/tbl_customer_reachout_new.frm' (errno: 13)
 100804 10:54:20 [ERROR] /usr/libexec/mysqld: Can't find file:
 './reachout/tbl_customer_reachout_new.frm' (errno: 13)
 100804 10:54:20 [ERROR] /usr/libexec/mysqld: Can't find file:
 './reachout/tbl_customer_reachout_new.frm' (errno: 13)
 100804 10:54:34 [ERROR] /usr/libexec/mysqld: Can't find file:
 './reachout/tbl_customer_reachout_new.frm' (errno: 13)
 100804 10:54:34 [ERROR] /usr/libexec/mysqld: Can't find file:
 './reachout/tbl_customer_reachout_new.frm' (errno: 13)
 100813 19:04:51 [Note] /usr/libexec/mysqld: Normal shutdown
 100813 19:04:54 InnoDB: Starting shutdown...
 100813 19:04:59 InnoDB: Shutdown completed; log sequence number 0 44054
 100813 19:04:59 [Note] /usr/libexec/mysqld: Shutdown complete
 100813 19:04:59 mysqld ended
 100813 19:07:46 mysqld started
 100813 19:07:46 [Warning] option 'max_join_size': unsigned value
 18446744073709551615 adjusted to 4294967295
 100813 19:07:46 [Warning] option 'max_join_size': unsigned value
 18446744073709551615 adjusted to 4294967295
 100813 

Re: Seems like an easy query, but isn't to me. Help?

2010-08-20 Thread Shawn Green (MySQL)

On 8/19/2010 8:45 PM, George Larson wrote:

I hope I've come to right place, and I'm asking in the right way -- please
accept my apologies if not.

We have some dates missing and I need to populate those fields with dates
from the record just before them.  I've gotten this far:

SELECT UUid, MIN(DDenteredDate) minDate FROM UUtable JOIN DDdetail on DDid =
UUid
WHERE
UUdate IS NULL
GROUP BY UUid;

I can make this a sub-query and get the UUid of the record that I want to
copy UUdate from:

SELECT sub.UUid-1 as previous, sub.* FROM (
SELECT UUid, MIN(DDenteredDate) minDate FROM UUtable JOIN DDdetail on DDid =
UUid
WHERE
UUdate IS NULL
GROUP BY UUid;
)  as sub;

In this case, the field 'previous' is the UUid that I want to copy the
UUdate from and sub.UUid is where I want to copy to.

Does that even make sense?



As you discovered, the SQL language is not an ordinal, procedural 
language. It is a SET-oriented language. The sequence of rows in any one 
set of results completely depends on either how those rows were isolated 
from the table(s) on which they reside (random) or by an ORDER BY or 
similar secondary processing step. Without an ORDER BY, it is perfectly 
legal for the same query to return the same set of rows in completely 
different sequences for queries that are executed one immediately after 
the other.


If you want to say the record just before when referring to SQL data 
and have it mean anything, you must be specific about how you are 
sequencing your rows. Only then do the concepts of before and after 
have any meaning.


--
Shawn Green
MySQL Principal Technical Support Engineer
Oracle USA, Inc.
Office: Blountville, TN

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: MySQL Server has gone away

2010-08-20 Thread Shawn Green (MySQL)

On 8/19/2010 11:07 AM, jitendra ranjan wrote:

Here is few lines from log:
 
100703 22:12:48 mysqld ended

100703 22:23:39 mysqld started
100703 22:23:40 [Warning] option 'max_join_size': unsigned value 
18446744073709551615 adjusted to 4294967295
100703 22:23:40 [Warning] option 'max_join_size': unsigned value 
18446744073709551615 adjusted to 4294967295
100703 22:23:40 [Warning] option 'thread_cache_size': unsigned value 33554432 
adjusted to 16384
100703 22:23:41 InnoDB: Started; log sequence number 0 44054
100703 22:23:41 [Warning] Neither --relay-log nor --relay-log-index were used; 
so replication may break when this MySQL server acts as a slave and has his 
hostname changed!! Please use '--relay-log=mysqld-relay-bin' to avoid this 
problem.
100703 22:23:41 [ERROR] Failed to open the relay log 
'/var/run/mysqld/mysqld-relay-bin.01' (relay_log_pos 4)
100703 22:23:41 [ERROR] Could not find target log during relay log 
initialization
100703 22:23:41 [ERROR] Failed to initialize the master info structure
100703 22:23:41 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.0.77-log' socket: '/var/lib/mysql/mysql.sock' port: 3306 Source 
distribution
100710 22:28:32 [Note] /usr/libexec/mysqld: Normal shutdown
100710 22:28:34 InnoDB: Starting shutdown...
100710 22:28:36 InnoDB: Shutdown completed; log sequence number 0 44054
100710 22:28:36 [Note] /usr/libexec/mysqld: Shutdown complete
100710 22:28:36 mysqld ended
100711 01:42:09 mysqld started
100711 1:42:10 [Warning] option 'max_join_size': unsigned value 
18446744073709551615 adjusted to 4294967295
100711 1:42:10 [Warning] option 'max_join_size': unsigned value 
18446744073709551615 adjusted to 4294967295
100711 1:42:10 [Warning] option 'thread_cache_size': unsigned value 33554432 
adjusted to 16384
100711 1:42:10 InnoDB: Started; log sequence number 0 44054
100711 1:42:11 [Warning] Neither --relay-log nor --relay-log-index were used; 
so replication may break when this MySQL server acts as a slave and has his 
hostname changed!! Please use '--relay-log=mysqld-relay-bin' to avoid this 
problem.
100711 1:42:11 [ERROR] Failed to open the relay log 
'/var/run/mysqld/mysqld-relay-bin.01' (relay_log_pos 4)
100711 1:42:11 [ERROR] Could not find target log during relay log initialization
100711 1:42:11 [ERROR] Failed to initialize the master info structure
100711 1:42:11 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.0.77-log' socket: '/var/lib/mysql/mysql.sock' port: 3306 Source 
distribution
100726 9:37:14 [Warning] Warning: Enabling keys got errno 137 on 
reachout.#sql-d4d_23af19, retrying
100804 10:48:04 [ERROR] /usr/libexec/mysqld: Can't find file: 
'./reachout/tbl_customer_reachout_new.frm' (errno: 13)
100804 10:48:04 [ERROR] /usr/libexec/mysqld: Can't find file: 
'./reachout/tbl_customer_reachout_new.frm' (errno: 13)
100804 10:48:05 [ERROR] /usr/libexec/mysqld: Can't find file: 
'./reachout/tbl_customer_reachout_new.frm' (errno: 13)
100804 10:48:05 [ERROR] /usr/libexec/mysqld: Can't find file: 
'./reachout/tbl_customer_reachout_new.frm' (errno: 13)
100804 10:54:17 [ERROR] /usr/libexec/mysqld: Can't find file: 
'./reachout/tbl_customer_reachout_new.frm' (errno: 13)
100804 10:54:17 [ERROR] /usr/libexec/mysqld: Can't find file: 
'./reachout/tbl_customer_reachout_new.frm' (errno: 13)
100804 10:54:20 [ERROR] /usr/libexec/mysqld: Can't find file: 
'./reachout/tbl_customer_reachout_new.frm' (errno: 13)
100804 10:54:20 [ERROR] /usr/libexec/mysqld: Can't find file: 
'./reachout/tbl_customer_reachout_new.frm' (errno: 13)
100804 10:54:34 [ERROR] /usr/libexec/mysqld: Can't find file: 
'./reachout/tbl_customer_reachout_new.frm' (errno: 13)
100804 10:54:34 [ERROR] /usr/libexec/mysqld: Can't find file: 
'./reachout/tbl_customer_reachout_new.frm' (errno: 13)
100813 19:04:51 [Note] /usr/libexec/mysqld: Normal shutdown
100813 19:04:54 InnoDB: Starting shutdown...
100813 19:04:59 InnoDB: Shutdown completed; log sequence number 0 44054
100813 19:04:59 [Note] /usr/libexec/mysqld: Shutdown complete
100813 19:04:59 mysqld ended
100813 19:07:46 mysqld started
100813 19:07:46 [Warning] option 'max_join_size': unsigned value 
18446744073709551615 adjusted to 4294967295
100813 19:07:46 [Warning] option 'max_join_size': unsigned value 
18446744073709551615 adjusted to 4294967295
100813 19:07:46 [Warning] option 'thread_cache_size': unsigned value 33554432 
adjusted to 16384
100813 19:07:46 InnoDB: Started; log sequence number 0 44054
100813 19:07:47 [Warning] Neither --relay-log nor --relay-log-index were used; 
so replication may break when this MySQL server acts as a slave and has his 
hostname changed!! Please use '--relay-log=mysqld-relay-bin' to avoid this 
problem.
100813 19:07:47 [ERROR] Failed to open the relay log 
'/var/run/mysqld/mysqld-relay-bin.01' (relay_log_pos 4)
100813 19:07:47 [ERROR] Could not find target log during relay log 
initialization
100813 19:07:47 [ERROR] Failed to initialize the master info structure
100813 

Limit the size of a database. Rotate the log after this size

2010-08-20 Thread Guillaume Blanc
Hello everyone,
I've actually a database (MySAM) which is growing very quickly (1,3Go/hour).
I would like to limit the size of the database but with a log rotation after
the size is reached. Do you know a way to do it ?
I thought of maybe a script who would delete the oldest entry when it reach
a certain size. But i don't know how to write it.


Reduce dataset but still show anomalies

2010-08-20 Thread Bryan Cantwell
I am trying to produce charts for large amounts of data. I already limit
the user to a smaller time frame in order to reduce the possible data
points, but still can end up with far more data points than are clearly
plottable on a chart.  Does anyone have an idea of how I can drop
insignificant points, or average the data or do something to end up with
no more than about 3k points and still show spikes and dips in the
charts so my users can still clearly identify anomalies in their charts?
I don't want to smooth out the spikes and dips if at all possible. 
I considered running through the dataset and doing a compare of point 2
to point 1 and if it is close in value throw it away, otherwise keep it.
That probably would not work on a 'noisy' chart however...


THanks,
Bryancan


Re: Reduce dataset but still show anomalies

2010-08-20 Thread Jangita

On 20/08/2010 5:12 p, Bryan Cantwell wrote:

I am trying to produce charts for large amounts of data. I already limit
the user to a smaller time frame in order to reduce the possible data
points, but still can end up with far more data points than are clearly
plottable on a chart.  Does anyone have an idea of how I can drop
insignificant points, or average the data or do something to end up with
no more than about 3k points and still show spikes and dips in the
charts so my users can still clearly identify anomalies in their charts?
I don't want to smooth out the spikes and dips if at all possible.
I considered running through the dataset and doing a compare of point 2
to point 1 and if it is close in value throw it away, otherwise keep it.
That probably would not work on a 'noisy' chart however...


THanks,
Bryancan

Have you tried instead of showing per minute, show the average per hour, 
or per day; this will generally smoothen the points out a little; In my 
case if i show registrations per day i get dips every Saturday and 
Sunday so it looks all jagged, But per week doesn't show the 
Saturday/Sunday dips...


--
Jangita | +256 76 91 8383 | Y!  MSN: jang...@yahoo.com
Skype: jangita | GTalk: jangita.nyag...@gmail.com

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: Reduce dataset but still show anomalies

2010-08-20 Thread Bryan Cantwell
Yes, but I DON'T want eh spikes smoothed out

On Fri, 2010-08-20 at 17:16 +0200, Jangita wrote:

 On 20/08/2010 5:12 p, Bryan Cantwell wrote:
  I am trying to produce charts for large amounts of data. I already limit
  the user to a smaller time frame in order to reduce the possible data
  points, but still can end up with far more data points than are clearly
  plottable on a chart.  Does anyone have an idea of how I can drop
  insignificant points, or average the data or do something to end up with
  no more than about 3k points and still show spikes and dips in the
  charts so my users can still clearly identify anomalies in their charts?
  I don't want to smooth out the spikes and dips if at all possible.
  I considered running through the dataset and doing a compare of point 2
  to point 1 and if it is close in value throw it away, otherwise keep it.
  That probably would not work on a 'noisy' chart however...
 
 
  THanks,
  Bryancan
 
 Have you tried instead of showing per minute, show the average per hour, 
 or per day; this will generally smoothen the points out a little; In my 
 case if i show registrations per day i get dips every Saturday and 
 Sunday so it looks all jagged, But per week doesn't show the 
 Saturday/Sunday dips...
 
 -- 
 Jangita | +256 76 91 8383 | Y!  MSN: jang...@yahoo.com
 Skype: jangita | GTalk: jangita.nyag...@gmail.com
 




Re: Reduce dataset but still show anomalies

2010-08-20 Thread Philip Riebold

On 20 Aug 2010, at 16:24, Bryan Cantwell wrote:

 Yes, but I DON'T want eh spikes smoothed out

Display the max and min of each successive set of 10 (or 100 or 1000) elements 
from the data ?

--
TTFN.

   Philip Riebold, p.rieb...@ucl.ac.uk

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



RE: Reduce dataset but still show anomalies

2010-08-20 Thread Steven Staples
I am not too good with charting (even though I would like to be), but what 
about getting the max, min and avg, if the max/min is greater than x% of the 
avg, show that... ?

Just throwing out ideas... prolly not useful... but may cause a better idea ;)


Steven Staples


 -Original Message-
 From: Bryan Cantwell [mailto:bcantw...@firescope.com]
 Sent: August 20, 2010 11:24 AM
 To: mysql
 Subject: Re: Reduce dataset but still show anomalies
 
 Yes, but I DON'T want eh spikes smoothed out
 
 On Fri, 2010-08-20 at 17:16 +0200, Jangita wrote:
 
  On 20/08/2010 5:12 p, Bryan Cantwell wrote:
   I am trying to produce charts for large amounts of data. I already
 limit
   the user to a smaller time frame in order to reduce the possible data
   points, but still can end up with far more data points than are clearly
   plottable on a chart.  Does anyone have an idea of how I can drop
   insignificant points, or average the data or do something to end up
 with
   no more than about 3k points and still show spikes and dips in the
   charts so my users can still clearly identify anomalies in their
 charts?
   I don't want to smooth out the spikes and dips if at all possible.
   I considered running through the dataset and doing a compare of point 2
   to point 1 and if it is close in value throw it away, otherwise keep
 it.
   That probably would not work on a 'noisy' chart however...
  
  
   THanks,
   Bryancan
  
  Have you tried instead of showing per minute, show the average per hour,
  or per day; this will generally smoothen the points out a little; In my
  case if i show registrations per day i get dips every Saturday and
  Sunday so it looks all jagged, But per week doesn't show the
  Saturday/Sunday dips...
 
  --
  Jangita | +256 76 91 8383 | Y!  MSN: jang...@yahoo.com
  Skype: jangita | GTalk: jangita.nyag...@gmail.com
 
 
 
 
 No virus found in this incoming message.
 Checked by AVG - www.avg.com
 Version: 9.0.851 / Virus Database: 271.1.1/3023 - Release Date: 08/20/10
 02:35:00


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: Reduce dataset but still show anomalies

2010-08-20 Thread Jangita

On 20/08/2010 5:24 p, Bryan Cantwell wrote:

Yes, but I DON'T want eh spikes smoothed out

On Fri, 2010-08-20 at 17:16 +0200, Jangita wrote:


On 20/08/2010 5:12 p, Bryan Cantwell wrote:

I am trying to produce charts for large amounts of data. I already limit
the user to a smaller time frame in order to reduce the possible data
points, but still can end up with far more data points than are clearly
plottable on a chart.  Does anyone have an idea of how I can drop
insignificant points, or average the data or do something to end up with
no more than about 3k points and still show spikes and dips in the
charts so my users can still clearly identify anomalies in their charts?
I don't want to smooth out the spikes and dips if at all possible.
I considered running through the dataset and doing a compare of point 2
to point 1 and if it is close in value throw it away, otherwise keep it.
That probably would not work on a 'noisy' chart however...


THanks,
Bryancan


Have you tried instead of showing per minute, show the average per hour,
or per day; this will generally smoothen the points out a little; In my
case if i show registrations per day i get dips every Saturday and
Sunday so it looks all jagged, But per week doesn't show the
Saturday/Sunday dips...

--
Jangita | +256 76 91 8383 | Y!  MSN: jang...@yahoo.com
Skype: jangita | GTalk: jangita.nyag...@gmail.com





Hmm, how do you reduce the number of points and average it out without 
smoothing out the spikes? by its nature, the more you average the 
smoother the spikes are or? eg


x,y
1,3
2,7
3,15 (spike)
4,4
5,3
6,3

averaged
range(x),y
1-2(1.5), 5 (3+7/2)
3-4(3.5), 9.5
5-6(5.5), 3

We have 3 points instead of 6, but also the u value spike from 7 to 15 
has been smoothened from 5 to 9.5


OR, am I missing something? You may want to use another formula instead 
of averaging.

--
Jangita | +256 76 91 8383 | Y!  MSN: jang...@yahoo.com
Skype: jangita | GTalk: jangita.nyag...@gmail.com

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



RE: Reduce dataset but still show anomalies

2010-08-20 Thread Steven Staples
On another thought,  what about if you group it by whatever, if the MIN()/MAX() 
is greater than X times STDDEV(), show MIN() or MAX() ?

I just recalled a conversation with my boss the other week about the STDDEV()


Steven Staples



 -Original Message-
 From: Steven Staples [mailto:sstap...@mnsi.net]
 Sent: August 20, 2010 11:32 AM
 To: bcantw...@firescope.com; 'mysql'
 Subject: RE: Reduce dataset but still show anomalies
 
 I am not too good with charting (even though I would like to be), but what
 about getting the max, min and avg, if the max/min is greater than x% of
 the avg, show that... ?
 
 Just throwing out ideas... prolly not useful... but may cause a better idea
 ;)
 
 
 Steven Staples
 
 
  -Original Message-
  From: Bryan Cantwell [mailto:bcantw...@firescope.com]
  Sent: August 20, 2010 11:24 AM
  To: mysql
  Subject: Re: Reduce dataset but still show anomalies
 
  Yes, but I DON'T want eh spikes smoothed out
 
  On Fri, 2010-08-20 at 17:16 +0200, Jangita wrote:
 
   On 20/08/2010 5:12 p, Bryan Cantwell wrote:
I am trying to produce charts for large amounts of data. I already
  limit
the user to a smaller time frame in order to reduce the possible data
points, but still can end up with far more data points than are
 clearly
plottable on a chart.  Does anyone have an idea of how I can drop
insignificant points, or average the data or do something to end up
  with
no more than about 3k points and still show spikes and dips in the
charts so my users can still clearly identify anomalies in their
  charts?
I don't want to smooth out the spikes and dips if at all possible.
I considered running through the dataset and doing a compare of point
 2
to point 1 and if it is close in value throw it away, otherwise keep
  it.
That probably would not work on a 'noisy' chart however...
   
   
THanks,
Bryancan
   
   Have you tried instead of showing per minute, show the average per
 hour,
   or per day; this will generally smoothen the points out a little; In my
   case if i show registrations per day i get dips every Saturday and
   Sunday so it looks all jagged, But per week doesn't show the
   Saturday/Sunday dips...
  
   --
   Jangita | +256 76 91 8383 | Y!  MSN: jang...@yahoo.com
   Skype: jangita | GTalk: jangita.nyag...@gmail.com
  
 
 
 
  No virus found in this incoming message.
  Checked by AVG - www.avg.com
  Version: 9.0.851 / Virus Database: 271.1.1/3023 - Release Date: 08/20/10
  02:35:00
 
 
 --
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:http://lists.mysql.com/mysql?unsub=sstap...@mnsi.net
 
 No virus found in this incoming message.
 Checked by AVG - www.avg.com
 Version: 9.0.851 / Virus Database: 271.1.1/3023 - Release Date: 08/20/10
 02:35:00


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



RE: Limit the size of a database. Rotate the log after this size

2010-08-20 Thread Travis Ard
Well, it wouldn't exactly limit the size of your tables, but you may want to
look into creating a partitioned table to store your data.  You could define
your partition ranges to store a single day's worth of data or whatever
granularity works best for you.  Then, when you need to remove older data,
it will be very easy to simply drop the partition(s) you no longer need.

-Travis

-Original Message-
From: Guillaume Blanc [mailto:guillaume.b.bl...@gmail.com] 
Sent: Friday, August 20, 2010 8:55 AM
To: mysql@lists.mysql.com
Subject: Limit the size of a database. Rotate the log after this size

Hello everyone,
I've actually a database (MySAM) which is growing very quickly (1,3Go/hour).
I would like to limit the size of the database but with a log rotation after
the size is reached. Do you know a way to do it ?
I thought of maybe a script who would delete the oldest entry when it reach
a certain size. But i don't know how to write it.


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Responsibilities of the main mysqld thread?

2010-08-20 Thread Tom Kleinpeter
I've been watching our mysqld procs in htop and the root thread is
using 75-100% of a CPU most of the time.  I'm trying to understand
what that is being used for, and so I was hoping someone could tell me
what that thread does that might be using a lot of CPU.

We are using 5.5.4-m3, we use MyISAM tables with full text indexes, do
around 1500-2000 queries per second, accept around 150 connections per
second, and at the moment both our key cache and our query cache are
disabled (I was curious if that contention was an issue).  CPU usage
didn't really change with the caches disabled.

The server is doing around 2 megabytes of traffic per second.  We
store a bunch of data compressed, and use uncompress(columnName) in
queries to get it back out.  None of these things set off any red
flags for me, but it has been a number of years since I've tuned
MySQL, so I don't really trust myself.

Thanks,
Tom

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: Fixture List generation using MySQL

2010-08-20 Thread Neil Tompkins

Carl you don't wish go offer so sample code ?


On 19 Aug 2010, at 19:18, Carl c...@etrak-plus.com wrote:

I have written this in both C and Java.  It is very complex as, in  
real
life, you want to balance home and away, sequence the games so that  
the home
or away games are spread throughout the schedule, accomodate partial  
rounds
(10 team league where each team is to play 13 games), accomodate odd  
numbers
of teams (7,9,etc.) and create games for teams with short schedules  
and a

lot more.  In addition, this is only the beginning as, once you have a
playing schedule, you need to assign the games to space which is  
much more

complicated than creating the schedule.  Reporting the games is rather
trivial except for situations where games have been moved, teams have
dropped out or been forfeited out, etc.

Thanks,

Carl

Gavin - Sorry, didn't mean to send it to you privately... itchy  
trigger finger.


- Original Message - From: Gavin Towey gto...@ffn.com
To: Tompkins Neil neil.tompk...@googlemail.com; [MySQL] mysql@lists.mysql.com 


Sent: Thursday, August 19, 2010 1:50 PM
Subject: RE: Fixture List generation using MySQL


That's almost a cartesean product; except you just want to eliminate  
results where a team would be paired up with itself.



create table teams ( id serial );

Query OK, 0 rows affected (0.02 sec)


insert into teams values (), (), (), ();

Query OK, 4 rows affected (0.05 sec)
Records: 4  Duplicates: 0  Warnings: 0

[ff] test select * from teams;
++
| id |
++
|  1 |
|  2 |
|  3 |
|  4 |
++
4 rows in set (0.00 sec)


select * from locations;

+--+
| name |
+--+
| home |
| away |
+--+
2 rows in set (0.00 sec)



select * from teams t1 JOIN teams t2;

+++
| id | id |
+++
|  1 |  1 |
|  2 |  1 |
|  3 |  1 |
|  4 |  1 |
|  1 |  2 |
|  2 |  2 |
|  3 |  2 |
|  4 |  2 |
|  1 |  3 |
|  2 |  3 |
|  3 |  3 |
|  4 |  3 |
|  1 |  4 |
|  2 |  4 |
|  3 |  4 |
|  4 |  4 |
+++
16 rows in set (0.00 sec)


With no join condition, we every possible combination of t1 paired  
with t2; however, this leads to the undesireable result that we have  
combinations like team 4 vs team 4.  So you just need to add a  
condition to prevent those rows from showing up:



select * from teams t1 JOIN teams t2 ON t1.id!=t2.id;

+++
| id | id |
+++
|  2 |  1 |
|  3 |  1 |
|  4 |  1 |
|  1 |  2 |
|  3 |  2 |
|  4 |  2 |
|  1 |  3 |
|  2 |  3 |
|  4 |  3 |
|  1 |  4 |
|  2 |  4 |
|  3 |  4 |
+++
12 rows in set (0.10 sec)


Notice you get both combinations of 2 vs 1 and 1 vs 2, so you could  
just call whichever team is in the first column as the home team.



Regards,
Gavin Towey

-Original Message-
From: Tompkins Neil [mailto:neil.tompk...@googlemail.com]
Sent: Thursday, August 19, 2010 10:07 AM
To: [MySQL]
Subject: Re: Fixture List generation using MySQL

I'm looking at a routine / script to create the fixtures like

team 1 vs team 2
team 3 vs team 4
team 5 vs team 6 etc





On Thu, Aug 19, 2010 at 3:44 PM, Peter Brawley 
peter.braw...@earthlink.net wrote:




I'm tasked with generating a list of fixtures from a table of teams,

whereby
each team plays each other home and away.  Does anyone have any
experience
generating such information using MySQL ?



Basically ...

select a.id,b.id from tbl a join tbl b on a.idb.id;
union
select a.id,b.id from tbl a join tbl b on a.idb.id;

PB

-


On 8/19/2010 9:12 AM, Tompkins Neil wrote:


Hi,

I'm tasked with generating a list of fixtures from a table of  
teams,

whereby
each team plays each other home and away.  Does anyone have any
experience
generating such information using MySQL ?

Thanks for any input.

Regards
Neil






This message contains confidential information and is intended only  
for the individual named.  If you are not the named addressee, you  
are notified that reviewing, disseminating, disclosing, copying or  
distributing this e-mail is strictly prohibited.  Please notify the  
sender immediately by e-mail if you have received this e-mail by  
mistake and delete this e-mail from your system. E-mail transmission  
cannot be guaranteed to be secure or error-free as information could  
be intercepted, corrupted, lost, destroyed, arrive late or  
incomplete, or contain viruses. The sender therefore does not accept  
liability for any loss or damage caused by viruses or errors or  
omissions in the contents of this message, which arise as a result  
of e-mail transmission. [FriendFinder Networks, Inc., 220 Humbolt  
court, Sunnyvale, CA 94089, USA, FriendFinder.com


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=c...@etrak-plus.com



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
http://lists.mysql.com/mysql?unsub=neil.tompk...@googlemail.com



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql

Re: Workbench strange behavior

2010-08-20 Thread Egor Shevtsov

In regards to this issue, I submitted a bug.

http://bugs.mysql.com/56157


nixofortune wrote:

Hi ALL,
I just start using Workbench 5.2.26 CE and this is a problem I have.
When I try to run a query with a case statement, columns with datetime 
Type shown as BLOB in output window.
To see the output data I have to right click inside of the cell, 
choose Open Value in Viewer and see text.

Example:
case
when dda.cancelled_on is null then ''
when dda.cancelled_on is not null then dda.cancelled_on
end as 'Cancelled On',

Should produce cells with a date of cancelled operation, but it 
returns blob icons where the dates should be.
If I try to Export data as CSV file, the fileds with 'blob' icon 
instead of the real datetime data are empty.
The code works nicely in MySQL monitor or PhPMyAdmin with properly 
formated CSV exports,

It could be some View option that I missed or Bug in the Workbench.
Has anybody experienced similar Workbench behavior, any ideas?
Thanks.
Igor 



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



query help

2010-08-20 Thread Steven Buehler
I am hoping that I can do this with one query, I have a table, Domains
with 3 columns
accountID, domainID, mailname

 

what I am trying to do is find all accountID's for domainID of 12345 and
see if a second row with domainID of 54321 exists for that
accountID,mailname.  If it doesn't exist, I want it to insert another row
with the same accountID and mailname, but with the second (54321) domainid.

 

Any help would be appreciated.

 

Thanks

Steve