Fwd: our server got stuck

2007-09-10 Thread Nipuna Perera
hi All, Last month, one of the our server got stuck but We could n't find the reason. Here I have attached the OS(Red Hat Enterprise Linux AS relese 4) message log. I think issue may be in MySQL. We are using MySQL Server version: 5.1.12-beta MySQL Community Server (GPL) So if you can please send

Re: table based replication into a different db

2007-09-10 Thread Baron Schwartz
Christian Parpart wrote: Hi all, i would like to replicate just tables beginning with a certain prefix while the replication slave host's database name also differs. i remember i once read something about it, but can't really find it on the net anymore, so does anyone have a hint for me here,

Big SELECT: ordering results by where matches are found

2007-09-10 Thread Chris Sansom
I'm sure there must be an accepted technique for this, but it's something I haven't tried before, so if anyone can point me in the right direction I'd be grateful. I'm writing a search facility for a site where the data is stored in several tables - let's say 5 for this example - and I want

Re: Big SELECT: ordering results by where matches are found

2007-09-10 Thread Baron Schwartz
Chris Sansom wrote: I'm sure there must be an accepted technique for this, but it's something I haven't tried before, so if anyone can point me in the right direction I'd be grateful. I'm writing a search facility for a site where the data is stored in several tables - let's say 5 for this

Re: Big SELECT: ordering results by where matches are found

2007-09-10 Thread Chris Sansom
At 11:01 -0400 10/9/07, Baron Schwartz wrote: I've built similar systems with a series of UNION queries. Each UNION has a column for relevance, which can be a sum of CASE statements, such as IF(name matches, 1, 0) + IF(text matches, 1, 0) AS relevance... The entire UNION can then be ordered by

Re: Big SELECT: ordering results by where matches are found

2007-09-10 Thread Chris Sansom
At 11:01 -0400 10/9/07, Baron Schwartz wrote: The entire UNION can then be ordered by relevance. You could also just add in an arbitrary number in each UNION, to get the effect of ordering by where in the hierarchy the match is found. Actually, your pointing me towards UNION may have done

more options for MySQL tools by MySQL

2007-09-10 Thread C K
Hello all, I want to suggest one thing relating to MySQL Tools for 5.0(Administrator, Query browser etc.) - A new feature can be added to use command line options to synchronize structure and data, data transfer in many formats and scheduling above tasks on windows/linux and other OS. If these

Best Practice - Encryption

2007-09-10 Thread J.R. Bullington
Hi MySQL'ers -- I run multiple HIPAA compliant databases and a lot of very secure patient information in my MySQL databases. However, I am a bit of a security phreak and want to go a step further and encode the data INSIDE the database so that, in the very unlikely event that someone can

Re: Big SELECT: ordering results by where matches are found

2007-09-10 Thread Baron Schwartz
Chris Sansom wrote: At 11:01 -0400 10/9/07, Baron Schwartz wrote: The entire UNION can then be ordered by relevance. You could also just add in an arbitrary number in each UNION, to get the effect of ordering by where in the hierarchy the match is found. Actually, your pointing me towards

MySQL Connector/J 5.1.3 RC is available!

2007-09-10 Thread Mark Matthews
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, MySQL Connector/J 5.1.3 RC, a new release candidate of the Type-IV pure-Java JDBC driver for MySQL has been released. Version 5.1.3 is suitable for use with any MySQL version including MySQL-4.1, MySQL-5.0, MySQL-5.1 beta or the MySQL-6.0

Really strange index/speed issues

2007-09-10 Thread Chris Hemmings
Hello, I have a table, currently holding 128,978 rows... In this table, I have a section column (int) and a price column (int). Every row has a section of 1 currently, every row has a price, ranging from 1 to 10,000. I have an index on both columns separately. Have a look at these two

Re: bitwise logic

2007-09-10 Thread Jeremy Cole
Hi, You can actually unpack them using some fairly cryptic stuff. I would only use this to unpack them once to re-store them as INT. Here's an example: CREATE TABLE ip (packed CHAR(4)); INSERT INTO ip (packed) VALUES (0xB16212C); mysql SELECT * FROM ip; ++ | packed | ++ |

Re: Really strange index/speed issues

2007-09-10 Thread Jeremy Cole
Hi Chris, Chris Hemmings wrote: Hello, I have a table, currently holding 128,978 rows... In this table, I have a section column (int) and a price column (int). Every row has a section of 1 currently, every row has a price, ranging from 1 to 10,000. I have an index on both columns

Re: Really strange index/speed issues

2007-09-10 Thread Chris Hemmings
Jeremy Cole wrote: Hi Chris, Chris Hemmings wrote: Hello, I have a table, currently holding 128,978 rows... In this table, I have a section column (int) and a price column (int). Every row has a section of 1 currently, every row has a price, ranging from 1 to 10,000. I have an index on

Re: Really strange index/speed issues

2007-09-10 Thread Dan Buettner
Chris, a couple of thoughts - First, your index on the section is doing you no good (at this time) since all the values are the same. You may already know that, but thought I'd mention it. Second, my theory on why query #1 is faster - if all your prices range from 1 up, and you're querying for

Re: Really strange index/speed issues

2007-09-10 Thread Chris Hemmings
Dan Buettner wrote: Chris, a couple of thoughts - First, your index on the section is doing you no good (at this time) since all the values are the same. You may already know that, but thought I'd mention it. Second, my theory on why query #1 is faster - if all your prices range from 1 up,

Re: Really strange index/speed issues

2007-09-10 Thread Baron Schwartz
Hi Chris, Chris Hemmings wrote: Dan Buettner wrote: Chris, a couple of thoughts - First, your index on the section is doing you no good (at this time) since all the values are the same. You may already know that, but thought I'd mention it. Second, my theory on why query #1 is faster - if

Re: Really strange index/speed issues

2007-09-10 Thread Chris Hemmings
Baron Schwartz wrote: Hi Chris, Chris Hemmings wrote: Dan Buettner wrote: Chris, a couple of thoughts - First, your index on the section is doing you no good (at this time) since all the values are the same. You may already know that, but thought I'd mention it. Second, my theory on why

Implement a logging table; avoiding conflicting inserts

2007-09-10 Thread Fan, Wellington
Hello Listies, Given: MySQL 4.0.12, I need to implement a pageview log with a resolution of 1 day. I propose this table: CREATE TABLE `pageviews` ( `id` int(11) NOT NULL auto_increment, `date` date NOT NULL default '-00-00', `url` char(120) NOT NULL default '', `views` mediumint(9)

Re: Database page corruption on disk occurring during mysqldump on a fresh database

2007-09-10 Thread Maurice Volaski
Thank you for your replies. I attempted to restore again and most oddly, mysql complained that it couldn't restore to a particular table because it wasn't in the database, which, of course, it had to be because the restore itself had just recreated it. So I blew away the entire mysql directory

Data corruption and server crash issues in replicated setup

2007-09-10 Thread David Schneider-Joseph
Hi all, Starting Wednesday night, we observed several weird errors indicative of data corruption shortly before a CPU spike and complete crash on our master db server (opera.oursite.com). opera.oursite.com had crashed twice with signal 11 in recent weeks, but we had never observed any data

Re: Using MAX function to fetch primary id

2007-09-10 Thread Brent Baisley
You can do it as long as there is only a single record with the max value. If there is more than 1 record with the same max value, there isn't a single record to pull. To do it, you would need to join on the results of the max query, and part of the join condition would be the max value

What should be a simple query...

2007-09-10 Thread Mike Mannakee
I have two tables, one called RMAs and the other called rma_line_items. The first one has the general details of the RMA (Return Merchandise Authorization) , the second holds the details of each item being returned. What I want is a listing of the RMA ids (which are unique in the RMAs table)