innodb madness

2007-02-05 Thread Marten Lehmann
Hello, mysql was such a reliable and unbreakable database until innodb showed up. All the time I had problems with mysql it was related to innodb. Today again: InnoDB: Starting crash recovery. InnoDB: Reading tablespace information from the .ibd files... 070206 09:29:19 mysqld ended Is there an

Re: outer join question

2007-02-05 Thread KMiller
Thanks much! ViSolve DB Team-2 wrote: > > Hello, > > Try this... > > select a.rhrqid,a.rhrqsid,a.rhrssid,b.sid,b.rlsid > from rqhistory a left join relay b > on (a.rhrqid = b.rqid and (a.rhrqsid = b.rlsid or a.rhrqsid = b.sid or > a.rhrssid = b.rlsid or a.rhrssid = b.sid)) > where a.rhrqsi

Re: outer join question

2007-02-05 Thread ViSolve DB Team
Hello, Try this... select a.rhrqid,a.rhrqsid,a.rhrssid,b.sid,b.rlsid from rqhistory a left join relay b on (a.rhrqid = b.rqid and (a.rhrqsid = b.rlsid or a.rhrqsid = b.sid or a.rhrssid = b.rlsid or a.rhrssid = b.sid)) where a.rhrqsid = 101 or a.rhrssid = 101 Thanks, ViSolve DB Team - Ori

outer join question

2007-02-05 Thread KMiller
This query isn't what I want... select a.rhrqid,a.rhrqsid,a.rhrssid,b.sid,b.rlsid from rqhistory a left join relay b on a.rhrqsid = 101 or a.rhrssid = 101 and (a.rhrqid = b.rqid and (a.rhrqsid = b.rlsid or a.rhrqsid = b.sid or a.rhrssid = b.rlsid or a.rhrssid = b.sid)) because it returns all row

Re: mysql limits

2007-02-05 Thread mos
At 12:18 PM 2/5/2007, kalin mintchev wrote: > Put as much memory in the machine as possible. Building indexes for a > table > of that size will consume a lot of memory and if you don't have enough > memory, building the index will be done on the hard disk where it is 100x > slower. I've had 100M

Re: MySQL to Postgres

2007-02-05 Thread Chris
Jim C. wrote: OK, I've another question. This one is about the INSERT command. When I uncomment some of these statements I get an error in regards to a comma. What I'm afraid of is that perhaps there is a compatibility issue such that an INSERT command on Postgres can't take as many records as

Monitoring for corrupt tables and transiently failing master INSERTs

2007-02-05 Thread Kevin Burton
We're trying to write a monitoring process for our master so that if a table is corrupt it will raise flags which can then trigger operations. We can do the basic stuff such as asserting that the port is open and that we can ping the machine but I want to test if any INSERT/UPDATE/DELETEs are fai

Re: Cloning a table with different column names

2007-02-05 Thread Tim Johnson
On Monday 05 February 2007 10:07 pm, Rolando Edwards wrote: Hi Roland: > Here is something convoluted and sick ... convoluted and sick can work. I actually had something equally convoluted and sick in mind, but was fishing for a second opinion > run 'mysqldu

Re: SELECT data FROM two tables into outfile

2007-02-05 Thread Rolando Edwards
SELECT header.date_in,header.pid,header.status,body.body_data into outfile '/tmp/mysql/117070515226878' from header,body where header.date_in='1170705152' and body.date_in=header.date_in and header.pid='26878' and body.pid=header.pid ; - Original Message - From: "List User" <[EMAIL PRO

Re: Cloning a table with different column names

2007-02-05 Thread Rolando Edwards
Here is something convoluted and sick ... run 'mysqldump --no-data ' and redirect to a text file. change the table name and column names in the text file as desired (using perl) run mysql client redirect input from the text file Something with more dignity (and no perl) create table like ; alt

SELECT data FROM two tables into outfile

2007-02-05 Thread List User
Hello list: Need some help with the following query: mysql> SELECT header.date_in,header.pid,header.status,body.body_data from header,body where header.date_in='1170705152' and body.date_in=header.date_in and header.pid='26878' and body.pid=header.pid into outfile '/tmp/mysql/117070515226878'

Cloning a table with different column names

2007-02-05 Thread Tim Johnson
Hello: I have a need to create two tables from imported data. The only difference between the tables is the column names. The data will be the same. Can anyone propose a mysql method to create a new table from an existing table with new column names? thanks tim -- Tim Johnson <[EMAIL PROTECTED

Re: MySQL to Postgres

2007-02-05 Thread Jochem van Dieten
On 2/5/07, Jim C. wrote: When I uncomment some of these statements I get an error in regards to a comma. What I'm afraid of is that perhaps there is a compatibility issue such that an INSERT command on Postgres can't take as many records as MySQL. What version are you running? Jochem -- MyS

Re: MySQL to Postgres

2007-02-05 Thread Jochem van Dieten
On 2/5/07, Jim C. wrote: CREATE TABLE "credits" ( "person" integer NOT NULL default '0', "chanid" int NOT NULL default '0', "starttime" timestamp NOT NULL default '1970-01-01 00:00:00+00', "role" VARCHAR NOT NULL, CONSTRAINT role_check CHECK "role" IN ('actor','director','producer','ex

Triggers and Stored procedure problems

2007-02-05 Thread Lars trollsen
Well I´m having some problems with a trigger and i don´t know how to handle this situation. Let´s start... well I have 2 tables (Table1 and Table2). Only fictional tables. CREATE TABLE `table1` ( `id` int(10) unsigned NOT NULL auto_increment, `status` tinyint(1) unsigned NOT NULL, PRIMARY KEY

Re: MySQL to Postgres

2007-02-05 Thread Jim C.
Chris White wrote: > Jim C. wrote: >>> CREATE TABLE "credits" ( >>> "person" integer NOT NULL default '0', >>> "chanid" int NOT NULL default '0', >>> "starttime" timestamp NOT NULL default '1970-01-01 00:00:00+00', >>> "role" VARCHAR NOT NULL, >>> CONSTRAINT role_check CHECK "role" IN >>

Re: mysql limits

2007-02-05 Thread kalin mintchev
> Put as much memory in the machine as possible. Building indexes for a > table > of that size will consume a lot of memory and if you don't have enough > memory, building the index will be done on the hard disk where it is 100x > slower. I've had 100M row tables without too much problem. However

Re: UTF-8 collation problem with greek extended characters

2007-02-05 Thread Sven Fuchs
Am 05.02.2007 um 18:11 schrieb Chris White: SELECT * FROM tablename WHERE fieldname LIKE BINARY '[greek small eta]' that *should* ( see disclaimer ;) ) give you what you need Yes, it does. I should have also asked for SELECT DISTINCT fieldname ... in the first place, but looking at your an

Re: MySQL to Postgres

2007-02-05 Thread Chris White
Jim C. wrote: CREATE TABLE "credits" ( "person" integer NOT NULL default '0', "chanid" int NOT NULL default '0', "starttime" timestamp NOT NULL default '1970-01-01 00:00:00+00', "role" VARCHAR NOT NULL, CONSTRAINT role_check CHECK "role" IN ('actor','director','producer','executive_pro

Re: MySQL to Postgres

2007-02-05 Thread Jim C.
OK, I've another question. This one is about the INSERT command. When I uncomment some of these statements I get an error in regards to a comma. What I'm afraid of is that perhaps there is a compatibility issue such that an INSERT command on Postgres can't take as many records as MySQL. Seems to

Re: MySQL to Postgres

2007-02-05 Thread Jim C.
> CREATE TABLE "credits" ( > "person" integer NOT NULL default '0', > "chanid" int NOT NULL default '0', > "starttime" timestamp NOT NULL default '1970-01-01 00:00:00+00', > "role" VARCHAR NOT NULL, > CONSTRAINT role_check CHECK "role" IN > ('actor','director','producer','executive_produ

Re: MYSQL under windows -- Max number of instances

2007-02-05 Thread Daniel da Veiga
On 2/5/07, Brown, Charles <[EMAIL PROTECTED]> wrote: Is it possible to setup two instances of MySQL under windows? I am wondering because I would like to setup and test replication Yes, theoretically you can, it should follow the same way of having two mysql servers running, you just have to

Re: max_allowed_packet in my.ini

2007-02-05 Thread colbey
Don't store binary data in large blobs - You should instead chunk your data for better performance and no packet limitation issues. Good implementation article at: http://www.dreamwerx.net/phpforum/?id=1 On Mon, 5 Feb 2007, abhishek jain wrote: > On 2/3/07, abhishek jain <[EMAIL PROTECTED]> wro

Re: MySQL to Postgres

2007-02-05 Thread Jim C.
> It looks more like the person that designed the schema has payed very > little attention to the SQL standard. You can not blame anyone but the > designer for naming a field 'role' (which is a keyword in the SQL > standard) or using a non-standard set field type instead of a proper > lookup table.

Re: UTF-8 collation problem with greek extended characters

2007-02-05 Thread Chris White
Sven Fuchs wrote: These characters are stored/retrieved correctly. But they are wrongly regarded the same character by statements like SELECT * FROM tablename WHERE fieldname LIKE '[greek small eta]' The database's character-set is set to "UTF-8 Unicode (utf8)" and the table's and varchar fie

Re: MySQL to Postgres

2007-02-05 Thread Jim C.
> It looks more like the person that designed the schema has payed very > little attention to the SQL standard. You can not blame anyone but the > designer for naming a field 'role' (which is a keyword in the SQL > standard) or using a non-standard set field type instead of a proper > lookup table.

UTF-8 collation problem with greek extended characters

2007-02-05 Thread Sven Fuchs
MySQL 4.1.22 seems to treat the following characters as equal (comparing them as varchar values): U+03B7 (206 183) greek small letter eta U+1F75 (225 189 181) greek small letter eta with accent oxia U+1FC4 (225 191 135) greek small letter eta with accent persispomeni and accent ypogegrammenti

RE: Getting number days between 2 dates

2007-02-05 Thread Jerry Schwartz
The original query should not generate a syntax error. I just tried it. However, DATEDIFF(CURDATE(), xxx) will probably evaluate to TRUE for every record so the WHERE clause as written isn't useful. Regards, Jerry Schwartz Global Information Incorporated 195 Farmington Ave. Farmington, CT 06032

max mysql under windows

2007-02-05 Thread Brown, Charles
Hello All. Is it possible to setup two instances of MySQL under windows? I am wondering because I would like to setup and test replication Thanks Charles This message is intended only for the use of the Addressee and may contain i

MYSQL under windows -- Max number of instances

2007-02-05 Thread Brown, Charles
Hello All. Is it possible to setup two instances of MySQL under windows? I am wondering because I would like to setup and test replication Thanks Charles This message is intended only for the use of the Addressee and may contain information that

Re: mysql limits

2007-02-05 Thread mos
At 09:44 PM 2/4/2007, kalin mintchev wrote: hi all... i just wanted to ask here if somebody has experience in pushing the mysql limits... i might have a job that needs to have a table (or a few tables) holding about a 100 million records. that's a lot of records is there any limitation of s

Re: select on multiple fields in several tables?

2007-02-05 Thread Brent Baisley
You can also use the following syntax if you want to pull all the fields from only certain tables: SELECT table1.*,table2.*,table3.field1,table3.field2 FROM table1, table2, table3 ... - Original Message - From: "Ryan Stille" <[EMAIL PROTECTED]> To: Sent: Sunday, February 04, 2007 11:

Re: Getting number days between 2 dates

2007-02-05 Thread Duncan Hill
On Sunday 04 February 2007 17:24:29 Jim MacDiarmid wrote: > I've been trying to figure this out using the CURDATE() function, but I > keep getting a syntax error. Below is the code I'm using: > > SELECT > `vb_links`.`DateAdded` > FROM > `vb_links` > WHERE DATEDIFF( CURDATE() , `vb_links`.`DateAdded

Error MYI 1016 - damaged database table

2007-02-05 Thread Rodica Rosu Fridez
Bonjour, Nous avons rencontré ce message d'erreur lorsqe l'on veut accéser notre plateforme e-commerce www.styltech.ch La personne qui administrait le site ne travaille plus chez nous. J'ai trouvé la documentation qui nous conseille: 1016 - Can't open file '.MYI' (errno: 145) The error message

Re: mysql limits

2007-02-05 Thread ViSolve DB Team
Hi, It can handle. You can extend the file size also. File size limit depends on the OS. Obviously the performance depends on both the processor speed and the memory. Table optimization,indexing will improve performance. Thanks ViSolve DB Team - Original Message - From: "kalin mintch

Re: mysql limits

2007-02-05 Thread kalin mintchev
thanks... my question was more like IF mysql can handle that amount of records - about 100 million... and if it's just a question of cpu power and memory? > Hi, > > The limit for the table can be set when you create the table itself. > the MAX_ROWS and AVG_ROW_LENGTH variables (m X n matr

Re: SET @var and insert that as cunting var into table with insertselect

2007-02-05 Thread Dušan Pavlica
Barry napsal(a): Dušan Pavlica schrieb: Barry napsal(a): Hello Everyone! I am having a big problem with counting inserting rows. This is my Query: SELECT MAX(id) INTO @maxid FROM table1; // @maxid is now 44 INSERT INTO table2 (orderid, someothervars) SELECT @maxid +1, blahvar FROM tabl