Re: Updating from 4 to 5

2010-06-29 Thread Nilnandan Joshi
Grant, I think, you should run mysqlupgrade after copying old data in new servers. Regards, nilnandan Grant Peel wrote: Hi all, I am about to move from FreeBSD 6 to FreeBSD 8. With that, the mysql server version will be changed from 4 to 5. I am assuming I can load all the users tables,

Mysql error causing database to not accept threads

2010-06-29 Thread Machiel Richards
Good morning all Hope everyone is well We received an error on a MySQL database this morning which caused it to be unavailable for connections. Error: ERROR 1135 (0): Can't create a new thread (errno 11); if

Re: Mysql error causing database to not accept threads

2010-06-29 Thread Benedikt Schackenberg
Note that some of the memory settings are per connection, if you have 63 connections, you may have up to 63 copies of the buffers, and you have pretty huge buffers even with 30GB of memory. Join buffers close to 1 G, tmp_table_size of 2 G, 63 connections could mean upto 63 copies of these,

RE: Mysql error causing database to not accept threads

2010-06-29 Thread machiel.richards
Hi Yes, we did check the amount of free O/S memory and this was the same as during normal operating times when the system is working. Even the load averages on the system was very low. At the moment of this incident there was only 300 odd connections from the website

Two Primary Keys

2010-06-29 Thread Victor Subervi
Hi; I have the following: create table pics ( picture_id int auto_increment primary key, product_sku int not null primary key, picture_num int not null, picture_desc varchar(100), picture_data longblob ); which doesn't work I need to auto_increment and declare primary key on two

Re: Two Primary Keys

2010-06-29 Thread Jo�o C�ndido de Souza Neto
As far as I know, if you have an auto_increment primary key, you cant have any other field in its primary key. João Cândido. Victor Subervi victorsube...@gmail.com escreveu na mensagem news:aanlktikzksmbx5hue0x_q3hx_68gicndghpkjdrna...@mail.gmail.com... Hi; I have the following: create

Re: Two Primary Keys

2010-06-29 Thread Victor Subervi
2010/6/29 João Cândido de Souza Neto j...@consultorweb.cnt.br As far as I know, if you have an auto_increment primary key, you cant have any other field in its primary key. Makes sense. Actually, I was just copying what someone else gave me and adding the auto_increment, then I got to

Re: Two Primary Keys

2010-06-29 Thread Jo�o C�ndido de Souza Neto
I think the real question is: What´s the purpose of any other field in my primary key if the first one is an auto_increment and will never repeat? -- João Cândido de Souza Neto Victor Subervi victorsube...@gmail.com escreveu na mensagem

Re: Two Primary Keys

2010-06-29 Thread petya
If you use innodb, primary key lookups are far faster than secondary indexes. Peter On 06/29/2010 03:34 PM, João Cândido de Souza Neto wrote: I think the real question is: What´s the purpose of any other field in my primary key if the first one is an auto_increment and will never repeat?

Re: Two Primary Keys

2010-06-29 Thread Shawn Green (MySQL)
On 6/29/2010 9:24 AM, Victor Subervi wrote: Hi; I have the following: create table pics ( picture_id int auto_increment primary key, product_sku int not null primary key, picture_num int not null, picture_desc varchar(100), picture_data longblob ); which doesn't work I need to

Re: Two Primary Keys

2010-06-29 Thread Jo�o C�ndido de Souza Neto
I think the best, or may be the right way is to use picture_id as primary key and a unique index to product_sku. -- João Cândido de Souza Neto Victor Subervi victorsube...@gmail.com escreveu na mensagem news:aanlktikzksmbx5hue0x_q3hx_68gicndghpkjdrna...@mail.gmail.com... Hi; I have the

Re: Two Primary Keys

2010-06-29 Thread Victor Subervi
2010/6/29 João Cândido de Souza Neto j...@consultorweb.cnt.br I think the best, or may be the right way is to use picture_id as primary key and a unique index to product_sku. Yes, sounds good. So the purpose, then, is to speed lookups on fields commonly accessed. I'd forgotten that. Thanks, V

Re: Two Primary Keys

2010-06-29 Thread Dušan Pavlica
Hi, try this and you will see exactly how autoincrement behaves in MyISAM tables when it is part of primary key. 1) declare table like this: CREATE TABLE `test_tbl` ( `field1` int(10) unsigned NOT NULL default '0', `field2` int(10) unsigned NOT NULL auto_increment, `field3` char(10) NOT

Re: The query doesn't use the specified indexes

2010-06-29 Thread Ashish Mukherjee
If cardinality is high (i.e large number of rows returned in the set for your query), then mysql may need to resort to filesort. - Ashish 2010/6/21 Octavian Rasnita octavian.rasn...@ssifbroker.ro Hi, I have made an InnoDB table and I am trying to search using some keys, but they are not

Re: Two Primary Keys

2010-06-29 Thread petya
You were talking about multiple fields in the primary key, not multiple primary keys. On 06/29/2010 03:51 PM, Johan De Meersman wrote: Correct, but you still can't have more than one primary key. Kind of defeats the idea of it being primary, really. On Tue, Jun 29, 2010 at 3:36 PM, petya

Consulta Cursores y Codigo dinamico

2010-06-29 Thread Fernando Siguenza
Amigos tengo una consulta, hay como ejecutar codigo dinamico en un procedimiento almacenado, por ejemplo en un procedimiento almacenado tengo una variable la cual almacena una consulta algo asi: set strConsulta='Select * from clientes where ..' como ejecuto la consulta que

RE: Two Primary Keys

2010-06-29 Thread Steven Staples
@Dušan Pavlica; I must say thank you. This is really interesting, and in the 7 years I've been using mysql and sql, I've never know this (or had, but didn't realize what I had done). This little bit of information could make for some interesting changes to a couple of my projects I am working

Re: Updating from 4 to 5

2010-06-29 Thread Grant Peel
nilnandan, I meant to say Mysqlupgrade :-) Further, I can use the old mysql tables, (the mysql gant tables, user/passwd/host tables etc) and the mysqlupgrade will update them as necessary? -Grant - Original Message - From: Nilnandan Joshi To: Grant Peel Cc:

Re: Updating from 4 to 5

2010-06-29 Thread Michael Dykman
There are binary differences between v4.x and 5.x (5.1.x recommended).. The cleanest approach would be to do mysqldump on the old database and inject that into your new server. - michael dykman On Tue, Jun 29, 2010 at 4:04 PM, Grant Peel gp...@thenetnow.com wrote: nilnandan, I meant to say

Uninstalling MySQL 6.x from Windows

2010-06-29 Thread Miguel Cardenas
Hello I have an old windows installation with MySQL 6.x and want to remove it so I can install latest version 5.1.48 but I tried once before with another computer and newer installation never worked, had to reinstall whole windows to make a new clean installation. How can I remove completely

Re: Two Primary Keys

2010-06-29 Thread Kyong Kim
This isn't true for innodb. I think the only requirement is that you need to have a unique index on the auto increment column. We created a composite primary key + auto_increment to take advantage of clustering by primary key while satisfying unique constraint for the primary key. It worked out

Re: Consulta Cursores y Codigo dinamico

2010-06-29 Thread Johan De Meersman
Ay Caramba. I think you'll find it a bit, well, pointless to post spanish in the generic MySQL list, that's what mysql-es is for. Now if you'd care to translate... :-) 2010/6/29 Fernando Siguenza fs...@hotmail.com Amigos tengo una consulta, hay como ejecutar codigo dinamico en un