Re: help with replication

2010-08-19 Thread Norman Khine
thanks

On Wed, Aug 18, 2010 at 10:42 PM,  a.sm...@ukgrid.net wrote:
 Quoting Norman Khine nor...@khine.net:



 What is shown from show master status and show slave status after you
 have made a change on the master DB?

 this is the output:

 http://pastie.org/1100610

 it does not seem to have any changes and show slave status is just
 empty.

 have i missed to add something to the master's /etc/mysql/my.cnf options?

 So you can see the binlog position on the master has not changed, hence you
 wont get any changes replicated to the slave. The show slave status has to
 be run on the slave not the master.
 Anyway, I believe your problem is your binlog-do-db section on the master,
 and also the ignore sections, I think these need to be broken into seperate
 lines, with only one value per line. ie:

 binlog-do-db = upgrade
 binlog-do-db = tracker
this was the issue

 You´ll need to completely resetup the syncronsiation after this, as you
 currently have out of sync DBs and no data stored in your binlogs...








-- 
˙uʍop ǝpısdn p,uɹnʇ pןɹoʍ ǝɥʇ ǝǝs noʎ 'ʇuǝɯɐן sǝɯıʇ ǝɥʇ puɐ 'ʇuǝʇuoɔ
ǝq s,ʇǝן ʇǝʎ
% .join( [ {'*':'@','^':'.'}.get(c,None) or
chr(97+(ord(c)-83)%26) for c in ,adym,*)uzq^zqf ] )

--
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-19 Thread Krishna Chandra Prajapati
Hi Jitendra,

Check your error log file. Some thing might have gone wrong.

Krishna

On Wed, Aug 18, 2010 at 9:41 PM, jitendra ranjan
jitendra_ran...@yahoo.comwrote:

 Hi,

 Whenever i run any commnd on mysql it gives message as below then gives the
 result successfully. What is the reason of the below error message :

 ERROR 2006 (HY000): MySQL server has gone away
 No connection. Trying to reconnect...
 Connection id:264550
 Current database: *** NONE ***


 Thanks in advance




Re: MySQL Server has gone away

2010-08-19 Thread Prabhat Kumar
there is high chance of corruption of any data files, but it will clear only
after looking  of your error file (generated by mysql) can you post the 50
last lines of your mysql error file.

On Thu, Aug 19, 2010 at 4:35 PM, Krishna Chandra Prajapati 
prajapat...@gmail.com wrote:

 Hi Jitendra,

 Check your error log file. Some thing might have gone wrong.

 Krishna

 On Wed, Aug 18, 2010 at 9:41 PM, jitendra ranjan
 jitendra_ran...@yahoo.comwrote:

  Hi,
 
  Whenever i run any commnd on mysql it gives message as below then gives
 the
  result successfully. What is the reason of the below error message :
 
  ERROR 2006 (HY000): MySQL server has gone away
  No connection. Trying to reconnect...
  Connection id:264550
  Current database: *** NONE ***
 
 
  Thanks in advance
 
 




-- 
Best Regards,

Prabhat Kumar
MySQL DBA

My Blog: http://adminlinux.blogspot.com
My LinkedIn: http://www.linkedin.com/in/profileprabhat


Re: OpenOffice, Go-OO, ODBC, Offline Data Entry

2010-08-19 Thread Joerg Bruehe
Hi!


Jerry Schwartz wrote:
 I deal with a somewhat similar situation. Even though we have fast VPN 
 connections among our various offices, each has been afflicted with a 
 different database structure (and software) which they cannot change.
 
 What I suggest you do is use the kind of pseudo-synchronization that we do. 
 Use a local copy of the application and database on each PC (MySQL will do 
 fine on even a modest system). Timestamp each record when you create or 
 change 
 it.
 
 When the user is back in contact with the office, extract all of the records 
 with timestamps newer than the last synchronization event and update the 
 central database.
 
 Is this foolproof? Absolutely not, if there are conflicts between the changes 
 by different users. You'll be stuck with He who write last, writes best; 
 but 
 I think that's as good as it's going to get for you.

AIUI, you could prevent that by having a second timestamp, based-on:
If based-on in the new record is the same value as changed-on in the
central data base, update - if they differ, you had somebody else come
first and will now need some manual alignment.

 
 How well this works depends upon the type of work. If the users have 
 non-overlapping customers, or whatever, then it won't be too bad. You'll 
 have to judge for yourself.
 
 [[...]]

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



Workbench strange behavior

2010-08-19 Thread nixofortune
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


Fixture List generation using MySQL

2010-08-19 Thread Tompkins Neil
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


Re: Fixture List generation using MySQL

2010-08-19 Thread Peter Brawley




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



--
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-19 Thread jitendra ranjan
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 19:07:47 [Note] /usr/libexec/mysqld: ready for 

Re: RHEL Auto Start / stop mysql???

2010-08-19 Thread Mike Spreitzer
In case you have not already discovered it, the clue you need is the `
chkconfig --level 345 mysql on` shell command mentioned in that web page. 
In your system it is not enough to have a script in /etc/rc.d/init.d/, you 
also need links in your /etc/rc.d/rc{runlevel}.d/ directories.

Regards,
Mike Spreitzer




From:   Jaime Crespo Rincón jcre...@warp.es
To: Nunzio Daveri nunziodav...@yahoo.com
Cc: Guifre Bosch Fabregas guifre.bo...@gmail.com, 
mysql@lists.mysql.com
Date:   08/13/2010 04:07 AM
Subject:Re: RHEL Auto Start / stop mysql???



2010/8/12 Nunzio Daveri nunziodav...@yahoo.com:
 Hi Guifre, thanks for answering.  I already have mysql installed and 
works just
 fine, but I did untar and then go to folder and run.  I used what is 
called
 mysql no-install so no yum, rpm etc..  No files in /etc/init.d and no 
startup or
 services script since this is using the no-install version.

Nunzio:

You will find an example init.d script on
$MYSQL_INSTAL_DIR/support-files/mysql.server

Follow the instructions corresponding to your distribution to setup
it. Generic instructions can be found here:

http://dev.mysql.com/doc/refman/5.1/en/automatic-start.html

-- 
Jaime Crespo
MySQL  Java Instructor
Warp Networks
http://warp.es

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=mspre...@us.ibm.com




RE: OpenOffice, Go-OO, ODBC, Offline Data Entry

2010-08-19 Thread Jerry Schwartz
-Original Message-
From: Joerg Bruehe [mailto:joerg.bru...@oracle.com]
Sent: Thursday, August 19, 2010 7:25 AM
To: mysql@lists.mysql.com
Cc: Jerry Schwartz; 'Lord_Devi'
Subject: Re: OpenOffice, Go-OO, ODBC, Offline Data Entry

Hi!


Jerry Schwartz wrote:
 I deal with a somewhat similar situation. Even though we have fast VPN
 connections among our various offices, each has been afflicted with a
 different database structure (and software) which they cannot change.

 What I suggest you do is use the kind of pseudo-synchronization that we 
 do.
 Use a local copy of the application and database on each PC (MySQL will do
 fine on even a modest system). Timestamp each record when you create or
change
 it.

 When the user is back in contact with the office, extract all of the 
 records
 with timestamps newer than the last synchronization event and update the
 central database.

 Is this foolproof? Absolutely not, if there are conflicts between the 
 changes
 by different users. You'll be stuck with He who write last, writes best;
but
 I think that's as good as it's going to get for you.

AIUI, you could prevent that by having a second timestamp, based-on:
If based-on in the new record is the same value as changed-on in the
central data base, update - if they differ, you had somebody else come
first and will now need some manual alignment.

[JS] That's a good thought, if manual editing is practical.
...


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=je...@gii.co.jp





-- 
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-19 Thread Tompkins Neil
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





Re: Fixture List generation using MySQL

2010-08-19 Thread Peter Brawley




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


Build the script round the query.

PB

-

On 8/19/2010 12:07 PM, Tompkins Neil wrote:

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




--
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-19 Thread Gavin Towey
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=arch...@jab.org



Re: Fixture List generation using MySQL

2010-08-19 Thread burhan . khalid
One possible approach: In your script, generate some ordered iterable object 
with an index of your team names. Step through it in a loop and check the 
counter; match odd teams with even teams and generate your queries.

You could probably do this on the server end as well as the logic is quite 
simple.

Regards,
--
Burhan Khalid
Sent from my BlackBerry® smartphone from Wataniya Telecom

-Original Message-
From: Peter Brawley peter.braw...@earthlink.net
Date: Thu, 19 Aug 2010 12:48:18 
To: mysql@lists.mysql.com
Reply-To: peter.braw...@earthlink.net
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

Build the script round the query.

PB

-

On 8/19/2010 12:07 PM, Tompkins Neil wrote:
 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



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=burhan.kha...@gmail.com



Re: Fixture List generation using MySQL

2010-08-19 Thread Carl

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=arch...@jab.org



MySQL Community Server 5.1.50 has been released

2010-08-19 Thread Karen Langford

Dear MySQL users,

MySQL Community Server 5.1.50, a new version of the popular Open
Source Database Management System, has been released.  MySQL 5.1.50 is
recommended for use on production systems.

For an overview of what's new in MySQL 5.1, please see

http://dev.mysql.com/doc/refman/5.1/en/mysql-nutshell.html

For information on installing MySQL 5.1.50 on new servers or upgrading
to MySQL 5.1.50 from previous MySQL releases, please see

http://dev.mysql.com/doc/refman/5.1/en/installing.html

MySQL Server is available in source and binary form for a number of
platforms from our download pages at

http://dev.mysql.com/downloads/

Not all mirror sites may be up to date at this point in time, so if
you can't find this version on some mirror, please try again later or
choose another download site.

We welcome and appreciate your feedback, bug reports, bug fixes,
patches, etc.:

http://forge.mysql.com/wiki/Contributing

For information on open issues in MySQL 5.1, please see the errata
list at

http://dev.mysql.com/doc/refman/5.1/en/open-bugs.html

The following section lists the changes in the MySQL source code since
the previous released version of MySQL 5.1.  It may also be viewed
online at

http://dev.mysql.com/doc/refman/5.1/en/news-5-1-50.html

Enjoy!

===

C.1.1. Changes in MySQL 5.1.50 (03 August 2010)

   InnoDB Notes:

 * InnoDB Plugin has been upgraded to version 1.0.11. This
   version is considered of General Availability (GA) quality.
   In this release, the InnoDB Plugin is included in source and
   binary distributions, except RHEL3, RHEL4, SuSE 9 (x86,
   x86_64, ia64), generic Linux RPM packages, and any builds
   produced with the icc compiler. It also does not work for
   FreeBSD 6 and HP-UX or for Linux on generic ia64.

   Bugs fixed:

 * Important Change: Replication: The LOAD DATA INFILE statement
   is now considered unsafe for statement-based replication. When
   using statement-based logging mode, the statement now produces
   a warning; when using mixed-format logging, the statement is
   made using the row-based format.
   (Bug#34283: http://bugs.mysql.com/bug.php?id=34283)

 * Partitioning: UPDATE and INSERT statements affecting
   partitioned tables performed poorly when using row-based
   replication.
   (Bug#52517: http://bugs.mysql.com/bug.php?id=52517)

 * Partitioning: INSERT ON DUPLICATE KEY UPDATE statements
   performed poorly on tables having many partitions. This was
   because the handler function for reading a row from a specific
   index was not optimized in the partitioning handler.
   (Bug#52455: http://bugs.mysql.com/bug.php?id=52455)

 * The server could crash on shutdown, if started with
   --innodb-use-system-malloc=0.
   (Bug#55581: http://bugs.mysql.com/bug.php?id=55581)

 * GROUP BY operations used max_sort_length inconsistently.
   (Bug#55188: http://bugs.mysql.com/bug.php?id=55188)

 * Building MySQL on Solaris 8 x86 failed when using Sun Studio
   due to gcc inline assembler code.
   (Bug#55061: http://bugs.mysql.com/bug.php?id=55061)

 * In debug builds, an assertion could be raised when the server
   tried to send an OK packet to the client after having failed
   to detect errors during processing of the WHERE condition of
   an UPDATE statement.
   (Bug#54734: http://bugs.mysql.com/bug.php?id=54734)

 * The database server could crash when renaming a table that had
   active transactions. (This issue only affected the database
   server when built for debugging.)
   (Bug#54453: http://bugs.mysql.com/bug.php?id=54453)

 * The server could crash during the recovery phase of startup,
   if it previously crashed while inserting BLOB or other large
   columns that use off-page storage into an InnoDB table created
   with ROW_FORMAT=REDUNDANT or ROW_FORMAT=COMPACT.
   (Bug#54408: http://bugs.mysql.com/bug.php?id=54408)

 * For an InnoDB table created with ROW_FORMAT=COMPRESSED or
   ROW_FORMAT=DYNAMIC, a query using the READ UNCOMMITTED
   isolation level could cause the server to stop with an
   assertion error, if BLOB or other large columns that use
   off-page storage were being inserted at the same time.
   (Bug#54358: http://bugs.mysql.com/bug.php?id=54358)

 * A client could supply data in chunks to a prepared statement
   parameter other than of type TEXT or BLOB using the
   mysql_stmt_send_long_data() C API function (or
   COM_STMT_SEND_LONG_DATA command). This led to a crash because
   other data types are not valid for long data.
   (Bug#54041: http://bugs.mysql.com/bug.php?id=54041)

 * mysql_secure_installation did not properly identify local
   accounts and could incorrectly remove nonlocal root accounts.
   (Bug#54004: 

RE: OpenOffice, Go-OO, ODBC, Offline Data Entry

2010-08-19 Thread Lord_Devi
  Is this foolproof? Absolutely not, if there are conflicts between the 
  changes
  by different users. You'll be stuck with He who write last, writes best;
 but
  I think that's as good as it's going to get for you.
 
 AIUI, you could prevent that by having a second timestamp, based-on:
 If based-on in the new record is the same value as changed-on in the
 central data base, update - if they differ, you had somebody else come
 first and will now need some manual alignment.
 
 [JS] That's a good thought, if manual editing is practical.
 ...
 

Hrmm I see where you are going with that. I am thankful for the most
part then that I really only have 4 workers who will be using this
database. I have never done this kind of database programming before, so
this should prove to be interesting ;) Thank you very much for the
advice guys. At least now I know something like what I need is actually
possible.


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



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

2010-08-19 Thread George Larson
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


5.1.x review

2010-08-19 Thread Elim PDT
There are so many versions of 5.1, Is there some review or recommendations for 
a stable one? thanks