RE: Compare DATETIME to DATE

2008-12-31 Thread Gary W. Smith
Truncate the time part of the datetime field when doing the compare AND DATE_FORMAT(customer.created_dt, '%Y-%m-%d 00:00:00') BETWEEN '2008-12-30' AND '2008-12-30' Should work. Probably not the most efficient. The other options would be to use take end date + 1 day, minue 1 second. That's e

INNODB and Max Processors

2009-01-30 Thread Gary W. Smith
A few weeks back I was reading an article that said that INNODB doesn't take adantage of servers using more than 4 processors. I think I also recieved this as a reply some time ago as to the same thing. I was wondering if this is indeed true. We are using 5.1.30 and wanted to pickup a new du

RE: Upgrade story / request for insight

2009-02-25 Thread Gary W. Smith
Jerry, To touch a little more on Claudio's statement, you are trying to compare monkey's and trucks when you talk about mysql on these two different OS's. Microsoft is a different best when it comes to the install. What caught my attention though is you are running mysql 4.0 on CentOS. Thi

RE: non-auto increment question

2009-02-25 Thread Gary W. Smith
Not sure that this is the problem BUT you should probably qualify the name of the variable such that "SELECT MAX(id) AS id FROM book". But you don't want "max(id) as id" but rather "max(id) + 1 as id". With that you can then just return the final value. Also, if you don't want to alias the val

RE: [PHP] RE: non-auto increment question

2009-02-26 Thread Gary W. Smith
> Being rather new to all this, I understood from the MySql manual that > the auto_increment is to b e used immediately after an insertion not > intermittently. My application is for administrators (the site owner & > designates) to update the database from and administration directory, > accessed

Replication and changing engine type

2007-12-06 Thread Gary W. Smith
We have a master/master environment that has tables in innodb. We want to setup a slave that will be used for reporting and some other stuff as well. We want to use MyISAM as the engine on the slave'd server. Since all of the table creations are also part of the replication, is it possible t

RE: Replication and changing engine type

2007-12-06 Thread Gary W. Smith
> You can set the default storage engine on each of the servers and then > don't declare it explicitly in any CREATE TABLE statements. This seems like the most viable option. Since almost all of the remote tables are created with INNODB it should work fine. I do have one table that isn't but we

Column level replication q?

2008-02-19 Thread Gary W. Smith
We need to replicate a table to a third part. The information in the table is pretty much public, with the exception of one column. Is it possible to replicate all of the tables with the exception of one column? What I was thinking was to replication it to a 2nd machine that will limit it to

RE: Column level replication q?

2008-02-19 Thread Gary W. Smith
). From: [EMAIL PROTECTED] on behalf of Baron Schwartz Sent: Tue 2/19/2008 5:15 PM To: Gary W. Smith Cc: mysql@lists.mysql.com Subject: Re: Column level replication q? Hi, This isn't "natively" supported. You can hack it with replication to a t

RE: Column level replication q?

2008-02-20 Thread Gary W. Smith
2/20/2008 1:19 AM To: Gary W. Smith; mysql@lists.mysql.com Subject: R: Column level replication q? Of course I am talking about a materialized view, did you try? Here some useful links: http://forums.mysql.com/read.php?100,21746,21746#msg-21746 and from the reply in the same forum topic by W

RE: Column level replication q?

2008-02-20 Thread Gary W. Smith
n the other end, we don't even need to have the same table names. So we can replicate it just like this with no problem. Thanks for the links, Gary From: Nanni Claudio [mailto:[EMAIL PROTECTED] Sent: Wed 2/20/2008 1:19 AM To: Gary W. Smith; mysql@lists

RE: Column level replication q?

2008-02-21 Thread Gary W. Smith
x27;t expect. Gary From: Michael Dykman [mailto:[EMAIL PROTECTED] Sent: Thu 2/21/2008 8:06 AM To: mysql@lists.mysql.com Cc: Gary W. Smith; Baron Schwartz Subject: Re: Column level replication q? On Wed, Feb 20, 2008 at 10:48 AM, Gary W. Smith <[EMAIL PROTECTED

Failed auth loggin

2008-08-22 Thread Gary W. Smith
Hello, I've been looking through the documentation/list and haven't found anything directly on this subject. It's possible that I'm just not looking in the right place. I would like to log all failed authentications to the server. It would be nice to be able to log the attempted user name

RE: too many connections

2008-09-19 Thread Gary W. Smith
Gail, I know the list has already recommended allowing more connections but the bigger question is what is sucking them all up. Even with 1000 connections things like apache can only use the number of connections that there are processes (* the number of connections used within each process)

Capacity/Load question

2007-02-10 Thread Gary W. Smith
Hello, Just looking for a little feedback before deciding on a data engine path and configuration. We're working on an application that is expected to have a high growth rate over the coming years. We're at the stage of designing the backend databases to maximize performance while keeping costs

Master -> Slave/Master -> Slave problem.

2007-02-13 Thread Gary W. Smith
I'm working with two distinct databases on four different boxes. Databases A on Server A needs to be present everywhere (Server B, C and D). Database B needs to be present on Server C. So I setup replication from Server A to Server B and Server D and then I setup replication from Server B to Serv

RE: Master -> Slave/Master -> Slave problem.

2007-02-14 Thread Gary W. Smith
> You should have: > log-slave-updates > > on the slave/master host(s) > > > Best regards, > Irek Slonina Irek, Thanks for the follow up. Someone else has mentioned it but I just noticed that it was offlist.

RE: Master -> Slave/Master -> Slave problem.

2007-02-14 Thread Gary W. Smith
> Hi, > > on server B you need to set log-slave-updates to pass statements from A > over B to D. > > BTW: I can recommend you to use replicate-wild-do-table=db_name.* > instead of replicate-do-db, otherwise statements with db prefix before > tables won't replicate over B to D. RTM please > > >

stored proc question.

2007-02-14 Thread Gary W. Smith
I have a string ("word word bob jack") such that I want to pass to the store proc as a single entity, split it in the store proc, and do a specific action for each word. Any advice on how to do this? There is more going on that just that single word so multiple calls isn't practical and they stri

RE: stored proc question.

2007-02-14 Thread Gary W. Smith
> I have a string ("word word bob jack") such that I want to pass to the > store proc as a single entity, > split it in the store proc, and do a specific action for each word. > Any > advice on how to do this? There is more going on that just that single > word so multiple calls isn't practical an

InnoDB fixed file size, how much is left?

2007-02-14 Thread Gary W. Smith
I'm working on migrating an bunch of MyISAM tables over to InnoDB. For development we want to use a fixed amount of space. So I have specified 10 100MB files in my.cnf. I started replicating data over but what I can't tell is how much space I have left. Running show innodb status\G shows a lot

RE: InnoDB fixed file size, how much is left?

2007-02-14 Thread Gary W. Smith
> -Original Message- > From: Gary W. Smith [mailto:[EMAIL PROTECTED] > Sent: Wednesday, February 14, 2007 8:01 PM > To: mysql@lists.mysql.com > Subject: InnoDB fixed file size, how much is left? > > I'm working on migrating an bunch of MyISAM tables over to In

RE: InnoDB fixed file size, how much is left?

2007-02-15 Thread Gary W. Smith
> For what you described... you will not get a fixed size... > > If you have set file_per_table flag in my.cnf you might want to know > that the .ibd files in the database directory are by default > auto-extending... so those files WILL grow... along with your data... > > The shared tablespaces t

RE: SQL Translation

2007-02-15 Thread Gary W. Smith
> > Select * > > from group_mstr gm,group_payers gp > > where gm.practice_id = '1' > > and gp.location_id = '2' > > and gp.practice_id =* gm.practice_id > > and gp.group_id =* gm.group_id > > order by gp.payer_id > > I bet =* is shorthand for an outer join (not sure if it's left or > right). Yo

Disable DNS reserve lookup for auth

2007-02-22 Thread Gary W. Smith
We have 4 development servers that are fairly configured the same way. We have an admin account on each server using %" for the hostname. This works on 3 of the 4 servers. The 4th server seems to do a lookup and since the client machine (i.e. my workstation) isn't specifically specified access is

RE: Disable DNS reserve lookup for auth

2007-02-22 Thread Gary W. Smith
> We have 4 development servers that are fairly configured the same way. > We have an admin account on each server using %" for the hostname. > This > works on 3 of the 4 servers. The 4th server seems to do a lookup and > since the client machine (i.e. my workstation) isn't specifically > specifie

RE: struggling with select query

2007-02-27 Thread Gary W. Smith
> select distinct > TraderPersonalInfo.TraderID,PM2.PlatformID,PM4.PlatformID > from TraderPersonalInfo,Locations,Platforms PF2,Platforms PF4, > PlatformMap PM2,PlatformMap PM4 > where (TraderPersonalInfo.TraderID = PM2.TraderID) > and (PM2.PlatformID = PF2.PlatformID) > and PM2.PlatformID = 2

Stored proc permissions question

2007-02-28 Thread Gary W. Smith
I have a set of tables that contain sensitive user information. I need to use this data for validation BUT I don't want the end user to have access to read this data. In MSSQL I used to be able to create a stored proc to do the work (even though the user didn't have access to the table). I was w

RE: Stored proc permissions question

2007-02-28 Thread Gary W. Smith
> Do you know about the "SQL SECURITY { DEFINER | INVOKER }" options to > CREATE PROCEDURE? With them it should be possible to > * deny selects to users on the tables > * allow selects to users to this procedure > * having the procedure itself working with the rights of root/definer I did not, but

RE: Stored proc permissions question

2007-02-28 Thread Gary W. Smith
> The next question is what permissions do I need to give > [EMAIL PROTECTED] to just access that one permission? The sound of that thump thump thump is my head hitting the wall. There is like a single small line in the GRANT section of the how to that mentioned "TABLE|PROCEDURE|FUNCTIO" but none

RE: Stored proc permissions question

2007-02-28 Thread Gary W. Smith
> Better add "SQL SECURITY DEFINER" to it. I noticed that it works with and without this. I have added it to the procedure. Another quick question though. Since I have added the end user that will execute the procedure it works fine, until I drop the procedure and recreate it then I have to rea

Another stored proc question

2007-02-28 Thread Gary W. Smith
This is a follow-up to the earlier stored proc question. I have a stored proc, with user level permissions for execute. If I drop the stored proc and then create it again, the user level execute permissions go away. What is the proper way to edit/alter a store proc without losing these permissio

RE: Breaking Up Tables

2007-03-01 Thread Gary W. Smith
> I have an unusual problem. My current production server's OS is corrupt > and I'm building a new one. However, due to the corruption, I can't > move files out of it. I have a "back door" through Zope, but I can only > move files of a certain size (I don't know how large ;). I need to back > up a

RE: Replication performance questions

2007-03-01 Thread Gary W. Smith
I could be wrong BUT... > 1) Does increasing the number of replication slaves increase query > latency on the master? We're considering tiering the replication if > it might help - replicate the master to two slaves, each of which > replicates to ten clients. The slaves should only be pulling fr

RE: Replication performance questions

2007-03-01 Thread Gary W. Smith
> Also, what type of database are you using? INNODB? MyISAM? If you > are > running MyISAM then things can get slow on updates. Sorry, I missed where you said you were using MyISAM. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.

Stored process accessing tables in different database

2007-03-01 Thread Gary W. Smith
I'm having trouble with a stored proc. The problem is that the first table is in a different database. Here is the test stored proc below. Where I run this I get " ERROR 1327 (42000): Undeclared variable: s". I have tried it by declaring "clientdev.servers s" and just by using "clientdev.server

RE: Replication performance questions

2007-03-01 Thread Gary W. Smith
> The table is MyISAM. I searched on google a bit for info on slow > updates with MyISAM and didn't really hit it on the nose. Can I ask > you to elaborate? > In /etc/my.cnf try adding: long_query_time = 1 log-slow-queries=/var/lib/mysql/mysql-slow.log Restart and then watch the file. If a a

RE: Replication performance questions

2007-03-02 Thread Gary W. Smith
> Inserts are of the form (updates are analogous): > > insert into dns_records (zone, host, data, ... ) > values ('domain.com', 'www', '1.2.3.4', ... ); > > Queries are of the form: > > select ttl, type, mx_priority, case > when lower(type)='txt' then > concat('\"', dat

RE: Best update strategy with MyISAM

2007-03-02 Thread Gary W. Smith
Mike, Below is an message written a few months back tailing a discussion on why MyISAM is and is not faster than InnoDB. Basically my understanding is that if you have multiple simultaneous updates/inserts, stay away from MyISAM. We switched from MyISAM to InnoDB because of the concurrency is

RE: Stored process accessing tables in different database

2007-03-02 Thread Gary W. Smith
> You SELECT statrment > SELECT > (s.server_disk_space * s.server_load * s.server_ram), > s.server_fqdn, > s.server_url, > s.server_id > INTO > L_server_load, > L_server_fqdn, > L_server_url, > L_server_id > FROM clientdev.servers s > WHERE s.active = 1 >

RE: Synchronizing two MySQL servers over slow network

2007-08-25 Thread Gary W. Smith
> for generating Statutory reports. Also cluster can not be a solution as > it > requires min. 100 MB network. Says who? But clustering won't help. You are looking for active/active, which could be accomplished but this would possibly lead to specific conflicts if people are trying to edit the s

RE: Lengtht of TEXT data types

2007-09-02 Thread Gary W. Smith
> Hello list > > I have doubt on TEXT data types... Checking my notes I see these ones: > > TINYTEXT/TINYBLOB (2^8) 255 chars > TEXT/BLOB (2^16) 64K chars > MEDIUMTEXT/MEDIUMBLOB (2^24) 16M chars > LONGTEXT/LONGBLOB (2^32) chars > > Well, my doubt consist on this... are these FIXED lengths for t