Re: mixing and matching mysql & mssql whileloop within an if case

2012-05-03 Thread Alex Schaft
I suppose an easier way is to have a getrow function, Something like while ($row = getrow($RS) { . . . } function getrow($RS) {  if ($current_server_is_mysql)  {   return mysql_fetch_assoc($RS);   } els

Myisam won't support replication in an MySQL Cluster environment

2012-05-03 Thread Brown, Charles
Does anyone have idea or experienced in MySQL Cluster configured for bi-directional replication. Please advise me if you have to use NDBcluster engine in order to get replication between the data nodes. I'm using MYISAM on several tables that will not replicate. ***

Myisam won't support replication in an MySQL Cluster environment

2012-05-03 Thread Brown, Charles
Does anyone have idea or experienced in MySQL Cluster configured for bi-directional replication. Please advise me if you have to use NDBcluster engine in order to get replication between the data nodes. I'm using MYISAM on several tables that will not replicate. ***

RE: Myisam won't support replication

2012-05-03 Thread Rick James
If I am not mistaken, NDB Cluster replication is separate from InnoDB/MyISAM. Perhaps you set one up, but not the other? > -Original Message- > From: Andrew Moore [mailto:eroomy...@gmail.com] > Sent: Thursday, May 03, 2012 2:35 PM > To: Brown, Charles > Cc: MySQL; DC > Subject: Re: Myisa

Re: Myisam won't support replication

2012-05-03 Thread Andrew Moore
Charles, How do you know your replication isn't working? On Thu, May 3, 2012 at 9:50 PM, Brown, Charles wrote: > I noticed that my replication stopped working after migrating to MySQL > cluster. My current engine is myisam. Does anyone have an idea why repl > won't work. Do I have to use the

Myisam won't support replication

2012-05-03 Thread Brown, Charles
I noticed that my replication stopped working after migrating to MySQL cluster. My current engine is myisam. Does anyone have an idea why repl won't work. Do I have to use the ndbengine? This message is intended only for the use of the Addressee and

Re: mixing and matching mysql & mssql whileloop within an if case

2012-05-03 Thread Baron Schwartz
Haluk, I could suggest a number of ways around the if/else construct, such as creating a subclass for the various servers with a uniform interface and hiding the differences inside the class. The actual error that you showed is much simpler, however: you are mixing curly-brace style with what I li

Re: mixing and matching mysql & mssql whileloop within an if case

2012-05-03 Thread Brown, Charles
Sent from my iPhone On May 3, 2012, at 1:02 PM, "Haluk Karamete" wrote: > Please take a look at the following code and tell me if there is a way > around it. > > if ($current_server_is_mysql): >while ($row = mysql_fetch_assoc($RS)) { > else: >while( $row = sqlsrv_fetch_array( $RS, SQL

RE: mixing and matching mysql & mssql whileloop within an if case

2012-05-03 Thread Rick James
Cross-platform coding is folly. There are too many differences (LIMIT, ROWNUM, SEQUENCE vs AUTO_INCREMENT, ...) that you either stumble over, or end up special casing, or you simply code to the "least common denominator", thereby getting poor performance on all platforms. > -Original Mes

mixing and matching mysql & mssql whileloop within an if case

2012-05-03 Thread Haluk Karamete
Please take a look at the following code and tell me if there is a way around it. if ($current_server_is_mysql): while ($row = mysql_fetch_assoc($RS)) { else: while( $row = sqlsrv_fetch_array( $RS, SQLSRV_FETCH_ASSOC)){ endif: Depending on the server I'm working with, I'd like to compile m

RE: using the bin-log approach on the master side, how can I accomplish my replication objectives

2012-05-03 Thread Rick James
That surprise happens whether you filter it on the master or on the slave. The problem is that some tables got updated; some did not. The only viable workaround (that I know of) is to use the "wild" filtering -- this forces the filtering to actually look at the query, not simply use the USE. >

RE: master BIN-LOG maintenace

2012-05-03 Thread Rick James
Or look at how old your one binlog is, and how big it is. Do a little arithmetic to see the avg bytes per day; set max_binlog_size to that. Expire-logs probably only deletes old binlogs, and does not split any binlogs. So what you have now will not really do anything until you have 2 binlogs,

Re: using the bin-log approach on the master side, how can I accomplish my replication objectives

2012-05-03 Thread Nitin Mehta
Thanks for your kind words, Charles! It comes easily to you when you have experienced it. I'm glad it worked for you. From: "Brown, Charles" To: Nitin Mehta Cc: "mysql@lists.mysql.com" Sent: Thursday, May 3, 2012 3:17 PM Subject: RE: using the bin-log app

Re: master BIN-LOG maintenace

2012-05-03 Thread Nitin Mehta
Hi Charles,   I guess your application doesn't generate too much of binary logs. The parameter "expire-logs-days" kicks in at the flush but does not necessarily require a manual "flush logs" command. You can reduce the value of "max_binlog_size" to make sure that at least one new file is created

master BIN-LOG maintenace

2012-05-03 Thread Brown, Charles
Hi Gurus, I would like to set BIN-LOG maintenance procedure for my master. The master is on a windows platform. I’m all for make it simple and clean therefore I’ve been leaning toward the automatic BIN-LOG removal “expire-logs-days=7”. The problem is for this option to work, it should be pre

RE: using the bin-log approach on the master side, how can I accomplish my replication objectives

2012-05-03 Thread Brown, Charles
Hello Nitin, Please give Nitin a prize. What a quiet genius she is. Now, I get it. Now, I can see clearly. I’ve tried it and it worked. Thanks so much. From: Nitin Mehta [mailto:ntn...@yahoo.com] Sent: Wednesday, May 02, 2012 11:25 PM To: Brown, Charles Cc: mysql@lists.mysql.com Subject: Re: us