MySQL Query/rows question.
Hi, i was just wondering... i have inserted 1 row on my table, how come when i did lock table. Mysql did not see one of my insert. Please check mail below, thanks. mysql> select * from louie2; ++---+ | id | firstname | ++---+ | 1 | louie | ++---+ 1 row in set (0.00 sec) mysql> lock table louie read; Query OK, 0 rows affected (0.00 sec) ty, louie... - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Locking TABLES, help.
Hi, I have a scenario.. I lock this mysql table and then a query/insert came in one of my script's. the table is locked, what will happen to that query? Will it retry again to insert on that table or no, it will not. ty, louie... - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
AW: Subselect or other way?
Thats right... But I don't want all id's with nr=123 or nr=456. I want all id's with nr=123 and nr=456 and only these id's. For Example: id nr --- 1123 1 456 1 678 2 457 2 897 2 123 3 123 3 678 3 456 Id 1 and id 3 have only both numbers. If I try your query i become id 1,2,3 and that's not that i want. I want only id 1,3 regards Micha -Ursprüngliche Nachricht- Von: Jonny Stendahl [mailto:[EMAIL PROTECTED]] Gesendet: Mittwoch, 22. Mai 2002 08:27 An: Spielberg Micha; [EMAIL PROTECTED] Betreff: SV: Subselect or other way? OK! You can use SELECT DISTINCT: SELECT DISTINCT id FROM Table WHERE nr=123 OR nr=456 this gives you all uniqe id's with nr = 123 OR nr = 456 and that is id = 1. // Jonny > -Ursprungligt meddelande- > Från: Spielberg Micha [SMTP:[EMAIL PROTECTED]] > Skickat: den 22 maj 2002 08:13 > Till: [EMAIL PROTECTED]; Jonny Stendahl > Ämne: AW: Subselect or other way? > > I think my english ist too bad > > My table looks like this > > id nr > --- > 1 123 > 1 456 > 1 678 > 2 457 > 2 897 > 2 123 > > > I want to select in a query only these id that have nr=123 and nr=456. > In the example its only id 1. > > regards Micha > > -Ursprüngliche Nachricht- > Von: Jonny Stendahl [mailto:[EMAIL PROTECTED]] > Gesendet: Mittwoch, 22. Mai 2002 07:53 > An: Spielberg Micha; [EMAIL PROTECTED] > Betreff: SV: Subselect or other way? > > > This is a simple SELECT statement: > > SELECT id > FROM Table > WHERE nr=3D123 > AND id = 3D456 > > this gives you probably one record, or you could use OR: > > SELECT id > FROM Table > WHERE nr=3D123 > OR id = 3D456 > > this gives you all records with nr 3D123 OR id 3D456 > > // > Jonny > > > > -Ursprungligt meddelande- > > Från: Spielberg Micha [SMTP:[EMAIL PROTECTED]] > > Skickat:den 22 maj 2002 07:46 > > Till: [EMAIL PROTECTED] > > Ämne: Subselect or other way? > > > > Hi, > > > > i have a table like this: > > > > Fields: id,nr > > I want now a query like this: > > SELECT id FROM Table WHERE nr=3D123 and (SELECT id FROM Table > > WHERE nr=3D456). > > > > Must i do this with a temp Table or ist there any other way to do this > > with Joins? > > > > I hope someone can help me.. > > > > regards Micha > > > > - > > Before posting, please check: > >http://www.mysql.com/manual.php (the manual) > >http://lists.mysql.com/ (the list archive) > > > > To request this thread, e-mail <[EMAIL PROTECTED]> > > To unsubscribe, e-mail > > > <[EMAIL PROTECTED]> > > Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: MySQL InnoDB startup problem
David, did you upgrade from a very old version of MySQL to .49? The sorting order of latin1 accent characters was changed about 8 months ago, and that may cause the assertion you have encountered. You should dump and reimport your tables if you have accent characters. Anyway, the B-tree index is now corrupt. Please use the instructions of section 6.1 in http://www.innodb.com/ibman.html to force recovery. Then dump + drop + reimport. Best regards, Heikki Tuuri Innobase Oy --- Order technical MySQL/InnoDB support at https://order.mysql.com/ See http://www.innodb.com for the online manual and latest news on InnoDB - Original Message - From: ""David Piasecki"" <[EMAIL PROTECTED]> Newsgroups: mailing.database.mysql Sent: Wednesday, May 22, 2002 8:04 AM Subject: MySQL InnoDB startup problem > I'm running MySQL 3.23.49. Everything was going good until today. I did > a couple of large table reads/inserts/deletes on the InnoDB tables which > appeared to go fine. I then restarted MySQL which also appeared to go > fine. From that point on, however, I kept losing connection with the DB, > and couldn't run any queries. A check of the error log reveals the > following: > > ---start err log--- > 020521 21:54:13 mysqld restarted > 020521 21:54:19 InnoDB: Database was not shut down normally. > InnoDB: Starting recovery from log files... > InnoDB: Starting log scan based on checkpoint at > InnoDB: log sequence number 0 2556753944 > 020521 21:54:19 InnoDB: Flushing modified pages from the buffer pool... > 020521 21:54:19 InnoDB: Started > /usr/local/mysql/libexec/mysqld: ready for connections > InnoDB: Assertion failure in thread 508094464 in file btr0btr.c line 574 > InnoDB: We intentionally generate a memory trap. > InnoDB: Send a detailed bug report to [EMAIL PROTECTED] > mysqld got signal 11; > This could be because you hit a bug. It is also possible that this > binary > or one of the libraries it was linked agaist is corrupt, improperly > built, > or misconfigured. This error can also be caused by malfunctioning > hardware. > We will try our best to scrape up some info that will hopefully help > diagnose > the problem, but since we have already crashed, something is definitely > wrong > and this may fail > > key_buffer_size=268431360 > record_buffer=131072 > sort_buffer=524280 > max_used_connections=0 > max_connections=400 > threads_connected=0 > It is possible that mysqld could use up to > key_buffer_size + (record_buffer + sort_buffer)*max_connections = 518136 > K > bytes of memory > Hope that's ok, if not, decrease some variables in the equation > ---end err log--- > > I tried grabbing the latest source and recompiling the database, but > still no go. Unfortunately I don't have a backup of the InnoDB tables, > so there isn't a whole lot that I can do in that respect. The data > appears to still be in the tables, because I can on occasion do a select > and it will return data before the database dies. > > Anyone have any experience with this sort of problem? Thanks. > > > David Piasecki > Software Engineer > > > > - > Before posting, please check: >http://www.mysql.com/manual.php (the manual) >http://lists.mysql.com/ (the list archive) > > To request this thread, e-mail <[EMAIL PROTECTED]> > To unsubscribe, e-mail <[EMAIL PROTECTED]> > Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php > - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
SV: Subselect or other way?
OK! You can use SELECT DISTINCT: SELECT DISTINCT id FROM Table WHERE nr=123 OR nr=456 this gives you all uniqe id's with nr = 123 OR nr = 456 and that is id = 1. // Jonny > -Ursprungligt meddelande- > Från: Spielberg Micha [SMTP:[EMAIL PROTECTED]] > Skickat: den 22 maj 2002 08:13 > Till: [EMAIL PROTECTED]; Jonny Stendahl > Ämne: AW: Subselect or other way? > > I think my english ist too bad > > My table looks like this > > id nr > --- > 1 123 > 1 456 > 1 678 > 2 457 > 2 897 > 2 123 > > > I want to select in a query only these id that have nr=123 and nr=456. > In the example its only id 1. > > regards Micha > > -Ursprüngliche Nachricht- > Von: Jonny Stendahl [mailto:[EMAIL PROTECTED]] > Gesendet: Mittwoch, 22. Mai 2002 07:53 > An: Spielberg Micha; [EMAIL PROTECTED] > Betreff: SV: Subselect or other way? > > > This is a simple SELECT statement: > > SELECT id > FROM Table > WHERE nr=3D123 > AND id = 3D456 > > this gives you probably one record, or you could use OR: > > SELECT id > FROM Table > WHERE nr=3D123 > OR id = 3D456 > > this gives you all records with nr 3D123 OR id 3D456 > > // > Jonny > > > > -Ursprungligt meddelande- > > Från: Spielberg Micha [SMTP:[EMAIL PROTECTED]] > > Skickat:den 22 maj 2002 07:46 > > Till: [EMAIL PROTECTED] > > Ämne: Subselect or other way? > > > > Hi, > > > > i have a table like this: > > > > Fields: id,nr > > I want now a query like this: > > SELECT id FROM Table WHERE nr=3D123 and (SELECT id FROM Table > > WHERE nr=3D456). > > > > Must i do this with a temp Table or ist there any other way to do this > > with Joins? > > > > I hope someone can help me.. > > > > regards Micha > > > > - > > Before posting, please check: > >http://www.mysql.com/manual.php (the manual) > >http://lists.mysql.com/ (the list archive) > > > > To request this thread, e-mail <[EMAIL PROTECTED]> > > To unsubscribe, e-mail > > > <[EMAIL PROTECTED]> > > Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Locking TABLES for myisamchk, please help!!
Hi, i was thingking about locking the tables first so no connection could write so i can do myisamchk. Is this process safe? Procedures: 1. lockdb 2. run myisamchk -r or -o 3. unlock db Btw, mysqld is running. I want to off it but i can't its a production server. Hope anyone could give me more info. ty, louie... - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
connecting mysql using servelets
hi list user , i am new to list and new to mysql i gotta do a project of my company w=hci reqiure to extract data from a server the user in his browser reqest a graph .in the client m/c and this requset goes to server where a java servelet has to accept the request ..now what the servelet needs to do is connect to the data base and extract nos from it a sends the data to a program in the server only which creates a graph image ..which is to be sent to the cilent m/c my problem is that cmpany provided me a shema havinga .sql extension ..now how to put the data and how to exctrat the data plz help me out thanks in adavance and queries invited sachin _ Click below to visit monsterindia.com and review jobs in India or Abroad http://monsterindia.rediff.com/jobs - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
AW: Subselect or other way?
I think my english ist too bad My table looks like this id nr --- 1 123 1 456 1 678 2 457 2 897 2 123 I want to select in a query only these id that have nr=123 and nr=456. In the example its only id 1. regards Micha -Ursprüngliche Nachricht- Von: Jonny Stendahl [mailto:[EMAIL PROTECTED]] Gesendet: Mittwoch, 22. Mai 2002 07:53 An: Spielberg Micha; [EMAIL PROTECTED] Betreff: SV: Subselect or other way? This is a simple SELECT statement: SELECT id FROM Table WHERE nr=3D123 AND id = 3D456 this gives you probably one record, or you could use OR: SELECT id FROM Table WHERE nr=3D123 OR id = 3D456 this gives you all records with nr 3D123 OR id 3D456 // Jonny > -Ursprungligt meddelande- > Från: Spielberg Micha [SMTP:[EMAIL PROTECTED]] > Skickat: den 22 maj 2002 07:46 > Till: [EMAIL PROTECTED] > Ämne: Subselect or other way? > > Hi, > > i have a table like this: > > Fields: id,nr > I want now a query like this: > SELECT id FROM Table WHERE nr=3D123 and (SELECT id FROM Table > WHERE nr=3D456). > > Must i do this with a temp Table or ist there any other way to do this > with Joins? > > I hope someone can help me.. > > regards Micha > > - > Before posting, please check: >http://www.mysql.com/manual.php (the manual) >http://lists.mysql.com/ (the list archive) > > To request this thread, e-mail <[EMAIL PROTECTED]> > To unsubscribe, e-mail > <[EMAIL PROTECTED]> > Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
SV: Subselect or other way?
This is a simple SELECT statement: SELECT id FROM Table WHERE nr=3D123 AND id = 3D456 this gives you probably one record, or you could use OR: SELECT id FROM Table WHERE nr=3D123 OR id = 3D456 this gives you all records with nr 3D123 OR id 3D456 // Jonny > -Ursprungligt meddelande- > Från: Spielberg Micha [SMTP:[EMAIL PROTECTED]] > Skickat: den 22 maj 2002 07:46 > Till: [EMAIL PROTECTED] > Ämne: Subselect or other way? > > Hi, > > i have a table like this: > > Fields: id,nr > I want now a query like this: > SELECT id FROM Table WHERE nr=3D123 and (SELECT id FROM Table > WHERE nr=3D456). > > Must i do this with a temp Table or ist there any other way to do this > with Joins? > > I hope someone can help me.. > > regards Micha > > - > Before posting, please check: >http://www.mysql.com/manual.php (the manual) >http://lists.mysql.com/ (the list archive) > > To request this thread, e-mail <[EMAIL PROTECTED]> > To unsubscribe, e-mail > <[EMAIL PROTECTED]> > Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Subselect or other way?
Hi, i have a table like this: Fields: id,nr I want now a query like this: SELECT id FROM Table WHERE nr=3D123 and (SELECT id FROM Table WHERE nr=3D456). Must i do this with a temp Table or ist there any other way to do this with Joins? I hope someone can help me.. regards Micha - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: InnoDB, possible bug?
Andrei, this is probably not a bug in InnoDB. In theory, 4000 random disk seeks would use more time than scanning the whole table of 700 000 rows. The optimizer was tuned .48 (not yet in 4.0.1) to favor index searches over table scans. That may solve the problem here. On the other hand, the fact that MySQL refuses to use the index specified in the USE INDEX clause may be a bug. I have forwarded this email to MySQL developers. Best regards, Heikki Tuuri Innobase Oy --- Order technical MySQL/InnoDB support at https://order.mysql.com/ See http://www.innodb.com for the online manual and latest news on InnoDB - Original Message - From: "Andrei Cojocaru" <[EMAIL PROTECTED]> To: "Heikki Tuuri" <[EMAIL PROTECTED]>; "Mysql List" <[EMAIL PROTECTED]> Sent: Wednesday, May 22, 2002 3:16 AM Subject: Re: InnoDB, possible bug? > I am using mysql 4.0.1-alpha on Linux 2.4.18, the info you requested is: > select count(*) from newsentries10 where playerid=28575 and type=2; > +--+ > | count(*) | > +--+ > | 4218 | > +--+ > 1 row in set (13.81 sec) > > mysql> select count(*) from newsentries10 where playerid=28575 and type=2; > +--+ > | count(*) | > +--+ > | 3705 | > +--+ > 1 row in set (9.72 sec) > > mysql> select count(*) from newsentries10 where type=2; > +--+ > | count(*) | > +--+ > | 611932 | > +--+ > 1 row in set (9.92 sec) > > mysql> explain select straight_join > pn.timestamp,ne.viewpoint,pn.id,pn.type,ne.type,ne.newsid,ne.hidestamp from > newsentries10 ne, pnews pn where ne.playerid=28575 and ne.type=2 and > pn.newsid=ne.newsid; > > +---++---+-+-+---+-- > --++ > | table | type | possible_keys | key | key_len | ref | > rows | Extra | > +---++---+-+-+---+-- > --++ > | ne| ALL| list_news,delete_news | NULL|NULL | NULL | > 774878 | where used | > | pn| eq_ref | PRIMARY | PRIMARY | 4 | ne.newsid | > 1 || > +---++---+-+-+---+-- > --++ > 2 rows in set (0.01 sec) > > mysql> > mysql> explain select > pn.timestamp,ne.viewpoint,pn.id,pn.type,ne.type,ne.newsid,ne.hidestamp from > newsentries10 ne use index (list_news), pnews pn where ne.playerid=28575 and > ne.type=2 and pn.newsid=ne.newsid; > +---++---+-+-+---+-- > --++ > | table | type | possible_keys | key | key_len | ref | > rows | Extra | > +---++---+-+-+---+-- > --++ > | ne| ALL| list_news,delete_news | NULL|NULL | NULL | > 774878 | where used | > | pn| eq_ref | PRIMARY | PRIMARY | 4 | ne.newsid | > 1 || > +---++---+-+-+---+-- > --++ > 2 rows in set (0.00 sec) > > mysql> > mysql> explain select straight_join > pn.timestamp,ne.viewpoint,pn.id,pn.type,ne.type,ne.newsid,ne.hidestamp from > newsentries10 ne use index (list_news), pnews pn where ne.playerid=28575 and > ne.type=2 and pn.newsid=ne.newsid; > +---++---+-+-+---+-- > --++ > | table | type | possible_keys | key | key_len | ref | > rows | Extra | > +---++---+-+-+---+-- > --++ > | ne| ALL| list_news,delete_news | NULL|NULL | NULL | > 774878 | where used | > | pn| eq_ref | PRIMARY | PRIMARY | 4 | ne.newsid | > 1 || > +---++---+-+-+---+-- > --++ > 2 rows in set (0.00 sec) > > Andrei Cojocaru > [EMAIL PROTECTED] > - Original Message - > From: "Heikki Tuuri" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Tuesday, May 21, 2002 12:40 PM > Subject: Re: InnoDB, possible bug? > > > > Andrei, > > > > how many rows in ne satisfy > > > > (1) ne.playerid=28575, > > > > (2) ne.type=2? > > > > What version you are using? .48 was tuned to favor index searches over > table > > scans. > > > > What does EXPLAIN SELECT say if you force the index usage with USE INDEX > and > > STRAIGHT JOIN clauses? > > > > Best regards, > > > > Heikki Tuuri > > Innobase Oy > > --- > > Order technical MySQL/InnoDB support at https://order.mysql.com/ > > See http://www.innodb.com for the online manual and latest news on InnoDB > > > > > > - Original Message - > > From: ""Andrei Cojocaru"" <[EMAIL PROTECTED]> > > Newsgroups: mailing.database.mysql > > Sent: Monday, May 20, 2002 6:46 PM > > Subject: InnoDB, possible bug? > > > > > > > Hello, > > > > > > I'
About index in my sql
Create a table like this: CREATE TABLE itg_passwd ( Username char(20) NOT NULL default '', Password char(20) NOT NULL default '', PRIMARY KEY (Username), KEY (Password(4)) ) TYPE=MyISAM; And insert some data; insert into itg_passwd values('1','h1'), ('2','h2'), ('3','h1/a'); Then Query index of itg_passwd: show index from itg_passwd; I can see Cardinality of index is 'NULL' ! (It should be 3) Why??? - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
MySQL InnoDB startup problem
I'm running MySQL 3.23.49. Everything was going good until today. I did a couple of large table reads/inserts/deletes on the InnoDB tables which appeared to go fine. I then restarted MySQL which also appeared to go fine. From that point on, however, I kept losing connection with the DB, and couldn't run any queries. A check of the error log reveals the following: ---start err log--- 020521 21:54:13 mysqld restarted 020521 21:54:19 InnoDB: Database was not shut down normally. InnoDB: Starting recovery from log files... InnoDB: Starting log scan based on checkpoint at InnoDB: log sequence number 0 2556753944 020521 21:54:19 InnoDB: Flushing modified pages from the buffer pool... 020521 21:54:19 InnoDB: Started /usr/local/mysql/libexec/mysqld: ready for connections InnoDB: Assertion failure in thread 508094464 in file btr0btr.c line 574 InnoDB: We intentionally generate a memory trap. InnoDB: Send a detailed bug report to [EMAIL PROTECTED] mysqld got signal 11; This could be because you hit a bug. It is also possible that this binary or one of the libraries it was linked agaist is corrupt, improperly built, or misconfigured. This error can also be caused by malfunctioning hardware. We will try our best to scrape up some info that will hopefully help diagnose the problem, but since we have already crashed, something is definitely wrong and this may fail key_buffer_size=268431360 record_buffer=131072 sort_buffer=524280 max_used_connections=0 max_connections=400 threads_connected=0 It is possible that mysqld could use up to key_buffer_size + (record_buffer + sort_buffer)*max_connections = 518136 K bytes of memory Hope that's ok, if not, decrease some variables in the equation ---end err log--- I tried grabbing the latest source and recompiling the database, but still no go. Unfortunately I don't have a backup of the InnoDB tables, so there isn't a whole lot that I can do in that respect. The data appears to still be in the tables, because I can on occasion do a select and it will return data before the database dies. Anyone have any experience with this sort of problem? Thanks. David Piasecki Software Engineer - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Having problem installing.
Yep, I'm a n00b, or whatever you want to call it. I'm having a problem installing MySQL version 4.0.1-2 (or any other version for that matter). I'm starting a rather large project where our funds are limited and we want a high performance database, so we chose to go with MySQL. Since we need functions that are only in version 4.0.x (actually we will need functions that are only going to be in 4.1, but we can wait for most of those for now), I've been trying to install that. Originally in RedHat 7.1, then 7.2, then 7.3. None of the installs that weren't default (with the OS) have worked yet. I never actually checked the 3.x versions that installed with the OS, so they may have not worked either though. The error that I commonly get (only see errors when I try manually installing it, otherwise it gives me no errors, but it just doesn't work) involve resolveip (can't lookup localhost.localdomain with resolveip or something like that). I've followed the directions from the website, other websites and even in the "MySQL & mSQL" book by O'REILLY and no matter what directions I follow, I end up with the same problem, can't connect to the db server, even from the db server (let alone one of the other Linux boxes on the network or one of the Win* boxes on the network). Any ideas? Other than RTFM, I've done that and can't seem to find anything related to the problem that I'm having. Server setup: Dual AMD 1600+ OS: openMosix/RedHat 7.3 (currently) for AMD SMP eth0: DHCP (192.x.x.x) eth1: static (10.x.x.x) If there is anything else that you might need to know, I'll post that information also, I figure that this is probably the information that is relevant and I'm trying to keep this under my standard 'novella' that I write in e-mails. Thanks for any help, Matt - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
About index in my sql!
Create a table like this: CREATE TABLE itg_passwd ( Username char(20) NOT NULL default '', Password char(20) NOT NULL default '', PRIMARY KEY (Username), KEY (Password(4)) ) TYPE=MyISAM; And insert some data; insert into itg_passwd values('1','h1'), ('2','h2'), ('3','h1/a'); Then Query index of itg_passwd: show index from itg_passwd; I can see Cardinality of index is 'NULL' ! (It should be 3) Why??? - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: SQL query
This seems like a fairly straight forward and simple query, however you run into the max row information problem as described in the manual at http://www.mysql.com/doc/e/x/example-Maximum-column-group-row.html Finding the first part is fairly easy and straight forward, it is just getting the price at the same time as the other info where you run into that problem. Here is the query I wrote using the max-concat trick as described at the bottom. It would be simple to use the temp table one as well. select tbl1.timestamp, left(max(concat(lpad(tbl2.timestamp,8,'0'),tbl2.price)),8) as timestamp, tbl1.code, substring(max(concat(lpad(tbl2.timestamp,8,'0'),tbl2.price)),9) as price from tbl1, tbl2 where tbl1.timestamp >= tbl2.timestamp and tbl1.ordertype='N' and tbl1.code= and tbl2.code= group by tbl1.timestamp; That should give you the results you are looking for. As for speed the temp table one might be faster depending on the number of rows you have and such. You might want to do some testing to find out. The reason we don't need to use the concat trick on the tbl1.code in the select string is because that is specified in the where clause and can only be that singular value. On a different topic, does anyone know if it would faster to use the "tbl1.code = and tbl2.code = " or to use "tbl1.code = and tbl1.code=tbl2.code"? I've always assumed it was the first, but depending on how the query processor works I could see the second one being faster. If anyone knows for sure, feel free to help me out, Thanks. Harrison - Original Message - From: "Patelli Paolo" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, May 21, 2002 9:49 PM Subject: SQL query > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Hi, > > I have a simple SQL problem: I have two tables (two different log files): > > tbl1 > TimeStamp, Code, OrderType > ... > 10:22:01, , "N" > 10:23:02, , "N" > 10:23:19, , "N" > 10:24:11, 1222, "N" > 10:25:11, , "D" > 10:27:33, , "N" > ... > > tbl2 > TimeStamp Code Price Size > ... > 10:21:00, , 300, 10 > 10:22:20, 1555, 221, 10 > 10:22:30, , 312, 10 > 10:23:41, , 353, 10 > 10:24:56, 1222, 156, 30 > ... > > for each row of tbl1 that satisfy for example the condition OrderType="N" > and Code= I would like to extract tbl2.Price. The price that I want to > select has a tbl2.TimeStamp that is <= tbl1.TimeStamp i.e. given an event in > tbl1 I want the price relative to the previous event recorded in tbl2. > The query output that I want looks like: > > tbl1.TimeStamp, tbl2.TimeStamp, tbl1.Code, tbl2.Price > 10:22:01, 10:21:00, , 300 > 10:23:02, 10:22:30, , 312 > 10:23:19, 10:22:30, , 312 > 10:27:33, 10:23:41, , 353 > > Any suggestion? > > Paolo > > > - -- > > Paolo Patelli > > Actual Position: > Graduate fellow at Santa Fe Institute > 1399 Hyde Park Rd, Santa Fe, New Mexico 87501 USA > ph.: 505 984 8800 ext. 293 > email: [EMAIL PROTECTED] > > PhD student, S. Anna School for Advanced Studies > via Carducci 40, 56100 Pisa, Italy > email: [EMAIL PROTECTED] > > > -BEGIN PGP SIGNATURE- > Version: GnuPG v1.0.6 (GNU/Linux) > Comment: For info see http://www.gnupg.org > > iD8DBQE86vlHk+lyphfv8fURAiI7AJsFz2cbZXSd69skKYUaJ3UpNlKxyACgwOAS > QtE415Io+lXwTQaXlYfixoM= > =id5e > -END PGP SIGNATURE- > > - > Before posting, please check: >http://www.mysql.com/manual.php (the manual) >http://lists.mysql.com/ (the list archive) > > To request this thread, e-mail <[EMAIL PROTECTED]> > To unsubscribe, e-mail <[EMAIL PROTECTED]> > Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php > > > - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: Evaluating a String
I think I will describe the problem in detail. I using Container-Managed Persistence (CMP) beans in J2EE RI 1.3. I will like to specify the SQL for one of the finder methods to be: SELECT * FROM table1 WHERE ( ? ) This is to faciliate me manipulating the WHERE clause b4 sending it as a string into the finder method. I THINK the J2EE sever will insert the string (say table1.field1=0) into the SQL as SELECT * FROM table1 WHERE ( "table1.field1=0" ) and NOT SELECT * FROM table1 WHERE ( table1.field1=0 ) The latter is the correct syntax, note that there's NO SINGEL/DOUBLE QUOTES on the string and this is what I want to achieve. I'm wondering if there's a function that allows you to do something like this: SELECT * FROM table1 WHERE ( function("table1.field1=0") ) will give you SELECT * FROM table1 WHERE ( table1.field1=0 ) TIA Ho Keat __ Do You Yahoo!? Yahoo! Kickin' Party - Win a 5-star getaway to exotic Bali! http://kickin.yahoo.com.sg - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
SQL query
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, I have a simple SQL problem: I have two tables (two different log files): tbl1 TimeStamp, Code, OrderType ... 10:22:01, , "N" 10:23:02, , "N" 10:23:19, , "N" 10:24:11, 1222, "N" 10:25:11, , "D" 10:27:33, , "N" ... tbl2 TimeStamp Code Price Size ... 10:21:00, , 300, 10 10:22:20, 1555, 221, 10 10:22:30, , 312, 10 10:23:41, , 353, 10 10:24:56, 1222, 156, 30 ... for each row of tbl1 that satisfy for example the condition OrderType="N" and Code= I would like to extract tbl2.Price. The price that I want to select has a tbl2.TimeStamp that is <= tbl1.TimeStamp i.e. given an event in tbl1 I want the price relative to the previous event recorded in tbl2. The query output that I want looks like: tbl1.TimeStamp, tbl2.TimeStamp, tbl1.Code, tbl2.Price 10:22:01, 10:21:00, , 300 10:23:02, 10:22:30, , 312 10:23:19, 10:22:30, , 312 10:27:33, 10:23:41, , 353 Any suggestion? Paolo - -- Paolo Patelli Actual Position: Graduate fellow at Santa Fe Institute 1399 Hyde Park Rd, Santa Fe, New Mexico 87501 USA ph.: 505 984 8800 ext. 293 email: [EMAIL PROTECTED] PhD student, S. Anna School for Advanced Studies via Carducci 40, 56100 Pisa, Italy email: [EMAIL PROTECTED] -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE86vlHk+lyphfv8fURAiI7AJsFz2cbZXSd69skKYUaJ3UpNlKxyACgwOAS QtE415Io+lXwTQaXlYfixoM= =id5e -END PGP SIGNATURE- - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Very large database
On Mon, May 20, 2002 at 04:13:36PM -0400, Rick Shifman wrote: > My OS is Linux, running Apache. Do I have to go with Alpha > architecture ? I need to keep 64Gb index in RAM to maintain quick > response for web users. I heard of index clustering across multiple > machines - is that an option ? Thanks. If you want 64GB in RAM, you're looking at something high-end like Sparc Solaris or maybe an Alpha. Anyone running on IBM's z-series mainframe? :-) Jeremy -- Jeremy D. Zawodny, <[EMAIL PROTECTED]> Technical Yahoo - Yahoo Finance Desk: (408) 349-7878 Fax: (408) 349-5454 Cell: (408) 685-5936 MySQL 4.0.2: up 0 days, processed 430,815 queries (141/sec. avg) - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Importing data from Oracle
Hi, I am having two servers running Oracle and MySQL database. Views has been created for me in Oracle and I want to import data from that Oracle table to my MySQL table. I want a script like something main thing is I want to import data from that Oracle database to MySQL daily...like a scheduled job.. The mysqlimport statement imports data only from text filesbut in my case i want to run a scheduled script that imports data from Oracle to MySQL at a specified time... I am using MySQL version 3.23.22 Is there any tool available for free or any other way to do this..Please help me. Shankar __ Do You Yahoo!? LAUNCH - Your Yahoo! Music Experience http://launch.yahoo.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: InnoDB, possible bug?
I am using mysql 4.0.1-alpha on Linux 2.4.18, the info you requested is: select count(*) from newsentries10 where playerid=28575 and type=2; +--+ | count(*) | +--+ | 4218 | +--+ 1 row in set (13.81 sec) mysql> select count(*) from newsentries10 where playerid=28575 and type=2; +--+ | count(*) | +--+ | 3705 | +--+ 1 row in set (9.72 sec) mysql> select count(*) from newsentries10 where type=2; +--+ | count(*) | +--+ | 611932 | +--+ 1 row in set (9.92 sec) mysql> explain select straight_join pn.timestamp,ne.viewpoint,pn.id,pn.type,ne.type,ne.newsid,ne.hidestamp from newsentries10 ne, pnews pn where ne.playerid=28575 and ne.type=2 and pn.newsid=ne.newsid; +---++---+-+-+---+-- --++ | table | type | possible_keys | key | key_len | ref | rows | Extra | +---++---+-+-+---+-- --++ | ne| ALL| list_news,delete_news | NULL|NULL | NULL | 774878 | where used | | pn| eq_ref | PRIMARY | PRIMARY | 4 | ne.newsid | 1 || +---++---+-+-+---+-- --++ 2 rows in set (0.01 sec) mysql> mysql> explain select pn.timestamp,ne.viewpoint,pn.id,pn.type,ne.type,ne.newsid,ne.hidestamp from newsentries10 ne use index (list_news), pnews pn where ne.playerid=28575 and ne.type=2 and pn.newsid=ne.newsid; +---++---+-+-+---+-- --++ | table | type | possible_keys | key | key_len | ref | rows | Extra | +---++---+-+-+---+-- --++ | ne| ALL| list_news,delete_news | NULL|NULL | NULL | 774878 | where used | | pn| eq_ref | PRIMARY | PRIMARY | 4 | ne.newsid | 1 || +---++---+-+-+---+-- --++ 2 rows in set (0.00 sec) mysql> mysql> explain select straight_join pn.timestamp,ne.viewpoint,pn.id,pn.type,ne.type,ne.newsid,ne.hidestamp from newsentries10 ne use index (list_news), pnews pn where ne.playerid=28575 and ne.type=2 and pn.newsid=ne.newsid; +---++---+-+-+---+-- --++ | table | type | possible_keys | key | key_len | ref | rows | Extra | +---++---+-+-+---+-- --++ | ne| ALL| list_news,delete_news | NULL|NULL | NULL | 774878 | where used | | pn| eq_ref | PRIMARY | PRIMARY | 4 | ne.newsid | 1 || +---++---+-+-+---+-- --++ 2 rows in set (0.00 sec) Andrei Cojocaru [EMAIL PROTECTED] - Original Message - From: "Heikki Tuuri" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, May 21, 2002 12:40 PM Subject: Re: InnoDB, possible bug? > Andrei, > > how many rows in ne satisfy > > (1) ne.playerid=28575, > > (2) ne.type=2? > > What version you are using? .48 was tuned to favor index searches over table > scans. > > What does EXPLAIN SELECT say if you force the index usage with USE INDEX and > STRAIGHT JOIN clauses? > > Best regards, > > Heikki Tuuri > Innobase Oy > --- > Order technical MySQL/InnoDB support at https://order.mysql.com/ > See http://www.innodb.com for the online manual and latest news on InnoDB > > > - Original Message - > From: ""Andrei Cojocaru"" <[EMAIL PROTECTED]> > Newsgroups: mailing.database.mysql > Sent: Monday, May 20, 2002 6:46 PM > Subject: InnoDB, possible bug? > > > > Hello, > > > > I've just switched to InnoDB table from myISAM and it's been running > pretty > > smoothly except on this SQL statement it doesn't use any indexes when > there > > are, and therefore is very slow. > > > > mysql> explain select > > pn.timestamp,ne.viewpoint,pn.id,pn.type,ne.type,ne.newsid,ne.hidestamp > from > > newsentries10 ne, pnews pn where ne.playerid=28575 and ne.type=2 and > > pn.newsid=ne.newsid; > > > +---++---+-+-+---+-- > > --++ > > | table | type | possible_keys | key | key_len | ref | > > rows | Extra | > > > +---++---+-+-+---+-- > > --++ > > | ne| ALL| list_news,delete_news | NULL|NULL | NULL | > > 734023 | where used | > > | pn| eq_ref | PRIMARY | PRIMARY | 4 | ne.newsid | > > 1 || > > > +---++---+-+-+---+-- > > --++ > > 2 rows in set (0.00 sec) > > > > (Notice that key f
info...
hi there ... can some one point in the right direction .. other than the mysql manul for mroe information on the INSERT SELECT statement & whether or not it can handle date inserted from a form on a web page... Cheers Peter "the only dumb question is the one that wasn't asked" - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Possible Bug in UPdATE in MySQL 4.0.1 alpha
On Tue, 21 May 2002, Michael Widenius wrote: > > Hi! > > > "Michael" == Michael B Venezia <[EMAIL PROTECTED]> writes: > > >> Description: > Michael> Possible Bug in UPDATE in MySQL 4.0.1 > > > > Michael> Attempting backtrace. You can use the following information to find out > Michael> where mysqld died. If you see no messages after this, something went > Michael> terribly wrong... > Michael> Stack range sanity check OK, backtrace follows: > Michael> 0x807db7f > Michael> 0x823d64a > Michael> 0x8204447 > Michael> 0x821bbd6 > Michael> 0x820bb41 > Michael> 0x80d082f > Michael> 0x80b0479 > Michael> 0x8086de7 > Michael> 0x808a262 > Michael> 0x8084e57 > Michael> 0x808a694 > Michael> 0x8084296 > Michael> Stack trace seems successful - bottom reached > Michael> Please read http://www.mysql.com/doc/U/s/Using_stack_trace.html and follow > Michael> instructions on how to resolve the stack trace. Resolved > Michael> stack trace is much more helpful in diagnosing the problem, so please do > Michael> resolve it > > Michael, could you please read the above instructions and try to > resolve the backtrace for us? > > > > >> How-To-Repeat: > Michael> Did this query on a database called 'medical' below text > > Michael> UPDATE `Physical Examination Report` SET `History of Present > Michael> Illness`='moo\r\nfoo\r\nboo.' WHERE `ID Code of Appointment`=27 > > Any chance you could ftp a copy of the 'Physical Examination Report' > table to ftp://support.mysql.com/pub/mysql/secret > so that we could try to repeat the problem ? > > Just having the table definition formats is not enough to repeat a > problem like this! > > > > Regards, > Monty > I've uploaded the table as PhysicalExaminationReport.tar.gz to the above location. It is very small (actually it only contains one or two records if I recall) The following is the stack trace resolved... 0x807db7f handle_segfault__Fi + 383 0x823d64a pthread_sighandler + 154 0x8204447 _mi_compare_text + 71 0x821bbd6 _mi_ft_cmp + 158 0x820bb41 mi_update + 721 0x80d082f update_row__9ha_myisamPCcPc + 67 0x80b0479 mysql_update__FP3THDP13st_table_listRt4List1Z4ItemT2P4ItemP8st_orderUl15enum_duplicates13thr_lock_type + 2473 0x8086de7 mysql_execute_command__Fv + 5723 0x808a262 mysql_parse__FP3THDPcUi + 270 0x8084e57 dispatch_command__F19enum_server_commandP3THDPcUi + 1319 0x808a694 do_command__FP3THD + 88 0x8084296 handle_one_connection__FPv + 546 - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
strange fulltext behavior
SELECT ISBN,TITLE FROM tBooks WHERE tBooks.ISBN="1876340436" AND MATCH (tBooks.TITLE) AGAINST ("britannica") ++-+ | ISBN | TITLE | ++-+ | 1876340436 | 2000 Lonely Planet Calendar | ++-+ 1 row in set (0.00 sec) Why is it so? I suspected to get an empty result set. MYSQL Ver 11.16 Distrib 3.23.49, for Win95/Win98 (i32) -- ./ premax ./ [EMAIL PROTECTED] - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Inserting images and other blobs
on 5/21/02 2:09 PM, Jim Philips at [EMAIL PROTECTED] wrote: > On Tuesday 21 May 2002 10:54 am, Info_Best-IT wrote: >> Any suggestions on how to load images from a web site into a MySQL db? I >> would like to set up a page that allows you to select an image from the >> local machine and load it to my MySQL DB on my web server. >> >> I'm not sure if it would just be a regular insert statement or something >> else? > > Well, first you've got to get the file onto the local server. In PHP, you can > use fopen() together with other functions to get the file from the user's > machine onto the remote server. But I'm not sure you absolutely want to store > it in the database. > > Yeah, I've heard there are lot's of disadvatages. But it would be cool if it actually was a good thing. So there's no good way to optimize MySQL to handle images well? Is it a Mysql thing or is it a Relational Database issue? /T - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Installation problem
Hi, I've been trying to install Msql-Mysql-modules-1.2216, but I'm getting the following error: After executing #perl Makefile.PL (I've also tried INC="-I/usr/lib" perl Makefile.PL) . . . Looks good Note (probably harmless): No library found for -lgz . . . Then I type #make . . . LD_RUN_PATH="/lib:/usr/lib:/usr/lib/gcc-lib/i386-redhat-linux/2.96" gcc -o ../blib/arch/auto/DBD/mysql/mysql.so -shared -L/usr/local/lib dbdimp.o mysql.o -L/usr/local/mysql/lib/mysql /usr/local/mysql/lib/mysql/libmysqlclient.a -lm -lz -L/usr/lib/gcc-lib/i386-redhat-linux/2.96 -lgcc /usr/bin/ld: cannot find -lz collect2: ld returned 1 exit status make[1]: *** [../blibl/arch/auto/DBD/mysql/mysql.so] Error 1 make[1]: Leaving directory `/usr/dragonsw/Msql-Mysql-modules-1.2216/mysql' make *** [subdirs] Error 2 I've already installed DBI and DataShowTable. I have no idea of what might be going on... Could you please help me here? Thanks in advanced Miguel Angel Tovar Security Consultant Insys, S.A. de C.V. E-mail: [EMAIL PROTECTED] Tel.: +52 (55) 5322-5216 - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Source For MySql
On Tue, 21 May 2002, Mugdha Kulkarni wrote: > Hi, > I know, this might be the dumbest question MySql is Open Source > database, but I am not able from where to download the source code for > MySql. Please help me > > Thanks Here ya go. http://www.mysql.com/downloads/mysql.html Look on those pages, you'll find what you are looking for. Regards, Jason [EMAIL PROTECTED] - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Relations between tables....
How can I set up mysql so as if the id of an entry from table 1 is inserted in table 2 it will not allow me to delete the information in table 1? EX: table1 holds the description of the products (table1_id is the primary key of the table); table2 holds the information about all the purchased products and the customers. How can I set up table1 to lock all the entries that are used in table2 for reference? I appreciate any answer Thank you, Ciprian - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Source For MySql
Hi, I know, this might be the dumbest question MySql is Open Source database, but I am not able from where to download the source code for MySql. Please help me Thanks - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Query help
Here is a query that will do what you want I think: SELECT count(distinct goal.id) as ours, count(distinct goalopp.id) as theirs, game.id FROM game LEFT JOIN goalopp ON game.id=goalopp.game LEFT JOIN goal ON game.id=goal.game GROUP BY game.id HAVING ours > theirs; We have to use a having statement to compare the number of goals since count() is an aggregate function. They can't be computed as part of the where clause as the where clause determines which should be counted in the function. Left Joins are needed in this case because it is possible that there might be 0 goals or goalopp for the game, in which case we still want the number (which would be 0). Hope that helps you understand some of the logic behind why the query has to be this way. Harrison - Original Message - From: "Adriano Manocchia" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, May 21, 2002 1:38 PM Subject: Query help > I can't seem to properly wrap my brain around left joins. If anyone > knows of a good tutorial somewhere, I'd appreciate it. That having been > said, I was hoping someone could help with this query I'm trying to do > as I've been horribly unsuccessful. > > 3 tables: goal (own goals), goalopp (opponent goals), game > > Pertinent fields: > goal.id > goal.game > goalopp.id > goalopp.game > game.id > > One game record for each game. > One goal record for each own goal, one goal record for each opponent > goal, each with a unique id in their table (goal.id, goalopp.id) and a > reference to the game id (goal.game, goalopp.game). > > What I'm trying to do is get the number of games where the goal count is > greater than the goalopp count for a set of games. Of course I could > just loop through an array for each game, but I was hoping to do it with > a single query. So what I'm getting at is essentially > > select (count game) where ((count goal) > (count goalopp)) for each game > where game.something='whatever' > > Help would be greatly appreciated. > > Age > > --- > Adriano "Age" Manocchia [EMAIL PROTECTED] > Cornell University AIM/Yahoo/MSN: SalsaSharkNet > http://salsashark.net/ageICQ: 5962736 > --- > "The capacity to blunder slightly is the real marvel of DNA. > Without this special attribute, we would still be anaerobic > bacteria, and there would be no music." -Lewis Thomas > > > - > Before posting, please check: >http://www.mysql.com/manual.php (the manual) >http://lists.mysql.com/ (the list archive) > > To request this thread, e-mail <[EMAIL PROTECTED]> > To unsubscribe, e-mail <[EMAIL PROTECTED]> > Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php > > > - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Cross-platform Deployment issue.
Hi, I have an application in Java that access MySQL databases through JDBC. The issue is that I have to be able to move the database files across different platforms (Windows, UNIX-Solaris, UNIX-IBM, UNIX-HP). If I go to the manual, MySQL says that the database files are compatible between computers with the same floating-point format. What is this about? How can the floating-point issue be overcome without having to export the data in one platform and export it to the other one? Thanks in advance. Bye, Francisco. __ Do You Yahoo!? LAUNCH - Your Yahoo! Music Experience http://launch.yahoo.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Inserting images and other blobs
On Tuesday 21 May 2002 10:54 am, Info_Best-IT wrote: > Any suggestions on how to load images from a web site into a MySQL db? I > would like to set up a page that allows you to select an image from the > local machine and load it to my MySQL DB on my web server. > > I'm not sure if it would just be a regular insert statement or something > else? Well, first you've got to get the file onto the local server. In PHP, you can use fopen() together with other functions to get the file from the user's machine onto the remote server. But I'm not sure you absolutely want to store it in the database. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: my.cnf
You have to create it yourself. The base mysql install comes with example .cnf files ( 3 I think ) -Original Message- From: Amy Zediak [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 21, 2002 1:12 PM To: [EMAIL PROTECTED] Subject: my.cnf According to the MySQL manual, the my.cnf option files are located in /etc but mine are not there. Any ideas? - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Replication (possible) problems | 'show binlog' command is broken?
Greetings, We got the following lines in our error logfile on one of our slave servers: 020521 13:19:29 Error reading packet from server: Lost connection to MySQL server during query (read_errno 0,server_errno=2013) 020521 13:19:29 Slave: Failed reading log event, reconnecting to retry, log 'db-bin.024' position 833365852 020521 13:19:29 Slave: reconnected to master '[EMAIL PROTECTED]:3306',replication resumed in log 'db-bin.024' at position 833365852 It isn't the first one and I was wondering what could be cause? A network problem? Large data chunk, or something? I tried to see what was the event that cause that problem and the following commands only returns an error: show binlog events in 'db-bin.024' from 833365852 limit 5; ERROR 1064: You have an error in your SQL syntax near 'binlog events in 'db-bin.024' from 833365852 limit 5' at line 1 Any help is appreciated! Mihail Manolov Government Liquidation, LLC 202 467 6868 x.227 [EMAIL PROTECTED] www.govliquidation.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: InnoDB, possible bug?
Andrei, how many rows in ne satisfy (1) ne.playerid=28575, (2) ne.type=2? What version you are using? .48 was tuned to favor index searches over table scans. What does EXPLAIN SELECT say if you force the index usage with USE INDEX and STRAIGHT JOIN clauses? Best regards, Heikki Tuuri Innobase Oy --- Order technical MySQL/InnoDB support at https://order.mysql.com/ See http://www.innodb.com for the online manual and latest news on InnoDB - Original Message - From: ""Andrei Cojocaru"" <[EMAIL PROTECTED]> Newsgroups: mailing.database.mysql Sent: Monday, May 20, 2002 6:46 PM Subject: InnoDB, possible bug? > Hello, > > I've just switched to InnoDB table from myISAM and it's been running pretty > smoothly except on this SQL statement it doesn't use any indexes when there > are, and therefore is very slow. > > mysql> explain select > pn.timestamp,ne.viewpoint,pn.id,pn.type,ne.type,ne.newsid,ne.hidestamp from > newsentries10 ne, pnews pn where ne.playerid=28575 and ne.type=2 and > pn.newsid=ne.newsid; > +---++---+-+-+---+-- > --++ > | table | type | possible_keys | key | key_len | ref | > rows | Extra | > +---++---+-+-+---+-- > --++ > | ne| ALL| list_news,delete_news | NULL|NULL | NULL | > 734023 | where used | > | pn| eq_ref | PRIMARY | PRIMARY | 4 | ne.newsid | > 1 || > +---++---+-+-+---+-- > --++ > 2 rows in set (0.00 sec) > > (Notice that key for ne is NULL when there is obviously an index it could > use, but doesn't, why?) > > the table structures for the two tables are: > mysql> desc newsentries10; > +---+-+--+-+-+---+ > | Field | Type| Null | Key | Default | Extra | > +---+-+--+-+-+---+ > | newsid| int(10) unsigned| | MUL | 0 | | > | playerid | int(10) unsigned| | MUL | 0 | | > | hidestamp | int(10) unsigned| | | 0 | | > | viewpoint | tinyint(3) unsigned | | | 0 | | > | type | tinyint(3) unsigned | | | 0 | | > | delmarker | tinyint(3) unsigned | | MUL | 0 | | > +---+-+--+-+-+---+ > 6 rows in set (0.00 sec) > > mysql> desc pnews; > +---+-+--+-+-++ > | Field | Type| Null | Key | Default | Extra | > +---+-+--+-+-++ > | newsid| int(10) unsigned| | PRI | NULL| auto_increment | > | type | tinyint(3) unsigned | | | 0 | | > | id| int(10) unsigned| | MUL | 0 | | > | timestamp | int(10) unsigned| | | 0 | | > +---+-+--+-+-++ > 4 rows in set (0.00 sec) > > the indexs are: > mysql> show index from newsentries10; > +---++-+--+-+--- > +-+--++-+ > | Table | Non_unique | Key_name| Seq_in_index | Column_name | > Collation | Cardinality | Sub_part | Packed | Comment | > +---++-+--+-+--- > +-+--++-+ > | newsentries10 | 1 | delmarker |1 | delmarker | A > | 0 | NULL | NULL | | > | newsentries10 | 1 | list_news |1 | playerid| A > | 0 | NULL | NULL | | > | newsentries10 | 1 | list_news |2 | type| A > | 0 | NULL | NULL | | > | newsentries10 | 1 | delete_news |1 | newsid | A > | 76379 | NULL | NULL | | > +---++-+--+-+--- > +-+--++-+ > 4 rows in set (0.20 sec) > > mysql> show index from pnews; > +---++--+--+-+---+-- > ---+--++-+ > | Table | Non_unique | Key_name | Seq_in_index | Column_name | Collation | > Cardinality | Sub_part | Packed | Comment | > +---++--+--+-+---+-- > ---+--++-+ > | pnews | 0 | PRIMARY |1 | newsid | A | > 139047 | NULL | NULL | | > | pnews | 1 | id |1 | id | A | > 139047 | NULL | NULL | | > +---++--+--+
Cross-platform Deployment issue.
Hi, I have an application in Java that access MySQL databases through JDBC. The issue is that I have to be able to move the database files across different platforms (Windows, UNIX-Solaris, UNIX-IBM, UNIX-HP). If I go to the manual, MySQL says that the database files are compatible between computers with the same floating-point format. What is this about? How can the floating-point issue be overcome without having to export the data in one platform and export it to the other one? Thanks in advance. Bye, Francisco. __ Do You Yahoo!? LAUNCH - Your Yahoo! Music Experience http://launch.yahoo.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Re: Passwords
Amy, Tuesday, May 21, 2002, 5:25:10 PM, you wrote: >> I read the MySQL manual on how to set passwords but i'm a little confused. >> How can i remove privileges so that you cant log on anonymously? Anonymous user - a user that is defined as '' (empty string) in table "user". So, if you want to remove privileges from anonymous user, you should delete from privilege table rows where user='' or use REVOKE to take away privileges from anonymous user. >> Thanks. >> Amy -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Egor Egorov / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net <___/ www.mysql.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: my.cnf
On UNIX and Linux machines, there are a few places that MySQL will look for your my.cnf. The are detailed at: http://www.mysql.com/doc/O/p/Option_files.html However if none of these files exist, then MySQL will use the default values assigned for all neccesary settings. You can then just create the option files using your preferred text editor and next time you restart mysqld it will use those new values you specified. Harrison - Original Message - From: "Amy Zediak" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, May 21, 2002 1:12 PM Subject: my.cnf > According to the MySQL manual, the my.cnf option files are located in > /etc but mine are not there. Any ideas? > > - > Before posting, please check: >http://www.mysql.com/manual.php (the manual) >http://lists.mysql.com/ (the list archive) > > To request this thread, e-mail <[EMAIL PROTECTED]> > To unsubscribe, e-mail <[EMAIL PROTECTED]> > Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php > > > - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Mysql too slow over the LAN
Hi, Look at mysqld.log and tell us what errors are. Regards, Gelu _ G.NET SOFTWARE COMPANY Permanent e-mail address : [EMAIL PROTECTED] [EMAIL PROTECTED] - Original Message - From: "Avalon" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, May 21, 2002 6:46 PM Subject: Mysql too slow over the LAN > > Hello, > > I have built an application that connects to a mysql > database located on a remote server in our LAN. > > When running the application locally on the server and > I open the main window (it as several forms and does a > lot of queries to fill the fields, etc.) it takes > about 2 to 3 seconds to open. > > However, when I use this application on some other > client in the same LAN, this form takes about 20 to 30 > seconds to open! > > Can someone help me with this? > > Thanks. > > - > Email Enviado utilizando o serviço MegaMail > > - > Before posting, please check: >http://www.mysql.com/manual.php (the manual) >http://lists.mysql.com/ (the list archive) > > To request this thread, e-mail <[EMAIL PROTECTED]> > To unsubscribe, e-mail <[EMAIL PROTECTED]> > Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php > > - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Query help
I can't seem to properly wrap my brain around left joins. If anyone knows of a good tutorial somewhere, I'd appreciate it. That having been said, I was hoping someone could help with this query I'm trying to do as I've been horribly unsuccessful. 3 tables: goal (own goals), goalopp (opponent goals), game Pertinent fields: goal.id goal.game goalopp.id goalopp.game game.id One game record for each game. One goal record for each own goal, one goal record for each opponent goal, each with a unique id in their table (goal.id, goalopp.id) and a reference to the game id (goal.game, goalopp.game). What I'm trying to do is get the number of games where the goal count is greater than the goalopp count for a set of games. Of course I could just loop through an array for each game, but I was hoping to do it with a single query. So what I'm getting at is essentially select (count game) where ((count goal) > (count goalopp)) for each game where game.something='whatever' Help would be greatly appreciated. Age --- Adriano "Age" Manocchia [EMAIL PROTECTED] Cornell University AIM/Yahoo/MSN: SalsaSharkNet http://salsashark.net/ageICQ: 5962736 --- "The capacity to blunder slightly is the real marvel of DNA. Without this special attribute, we would still be anaerobic bacteria, and there would be no music." -Lewis Thomas - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: Help Writing UDF
I am getting lots of emails sent to me for your address. Either you have a virus or you need to contact your hosting company Larry Thrall 2924 1/2 Main Street Santa Monica, CA 90405 t. 310.314.5126 f. 310.450.0143 -Original Message- From: Gav Brown [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 21, 2002 8:34 AM To: [EMAIL PROTECTED] Subject: Help Writing UDF I was wondering if any one could help me with a about writing UDF's for mysql. If I reallocate more memory for the result string; ie char *myResult; myResult = (char *) calloc(1, resultSize); *res_length = (ulong) resultSize; return myResult; Do I have to free it anywhere - and if so where? Or will mysql handle this for me? Cheers Gav Brown - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Inserting images and other blobs
There is a function called Load_File which will cause the mysqld to read the file into a field. It is designed for such things. Check out http://www.mysqldeveloper.com/faqs/index.pcgi?id=7 for more information. Keep in mind that generally it is better to use the file system to store files and the database to store data. The preferred way to do this with images is to just keep track of the name and location of the file in the database. Good luck with your application. Harrison - Original Message - From: "Info_Best-IT" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, May 21, 2002 10:54 AM Subject: Inserting images and other blobs > Any suggestions on how to load images from a web site into a MySQL db? I would like > to set up a page that allows you to select an image from the local machine and load > it to my MySQL DB on my web server. > > I'm not sure if it would just be a regular insert statement or something else? > > Thanks... > /Tim > > > - > Before posting, please check: >http://www.mysql.com/manual.php (the manual) >http://lists.mysql.com/ (the list archive) > > To request this thread, e-mail <[EMAIL PROTECTED]> > To unsubscribe, e-mail <[EMAIL PROTECTED]> > Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php > > > - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Cross-platform Deployment issue.
Hi, I have an application in Java that access MySQL databases through JDBC. The issue is that I have to be able to move the database files across different platforms (Windows, UNIX-Solaris, UNIX-IBM, UNIX-HP). If I go to the manual, MySQL says that the database files are compatible between computers with the same floating-point format. What is this about? How can the floating-point issue be overcome without having to export the data in one platform and export it to the other one? Thanks in advance. Bye, Francisco. __ Do You Yahoo!? LAUNCH - Your Yahoo! Music Experience http://launch.yahoo.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Fw: Mysql Client
Do you mean, a character client for windows or the linux client? On linux I can do everything, delete, alter, insert, create, but I don't think that is going to solve my problem on windows. > - Original Message - > From: "Andrei Cojocaru" <[EMAIL PROTECTED]> > To: "Federico Coco" <[EMAIL PROTECTED]>; "mysql" <[EMAIL PROTECTED]> > Sent: Monday, May 20, 2002 1:47 PM > Subject: Re: Mysql Client > > > > try the command line version of the client first then a GUI based one > > > > Andrei Cojocaru > > [EMAIL PROTECTED] > > - Original Message - > > From: "Federico Coco" <[EMAIL PROTECTED]> > > To: "mysql" <[EMAIL PROTECTED]> > > Sent: Monday, May 20, 2002 9:57 AM > > Subject: Mysql Client > > > > > > > I'm testing MySQL Client on Win98, my Server on Suse Linux 7.0. > > > 1- I select database test > > > 2-Commands-->tables-->Choose Tables, I choose f0001, I can see info > Found > > 3 > > > columns in 1 tables > > > 3-Commands-->Tables-->Edit Tables here nothing happens. > > > 4-Commands-->Tables-->Create Tables here nothing happens. > > > > > > What is going on? > > > > > > TIA. > > > > > > > > > - > > > Before posting, please check: > > >http://www.mysql.com/manual.php (the manual) > > >http://lists.mysql.com/ (the list archive) > > > > > > To request this thread, e-mail <[EMAIL PROTECTED]> > > > To unsubscribe, e-mail > > <[EMAIL PROTECTED]> > > > Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php > > > > > > > > > - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: MySQL 3.23.44 not using indexes
Hi Monty, Michael Widenius wrote: >Hi! > > >Jeremy> commit that affected the key cache yet. > >Sanja has been trying to do improvements to the key cache code, but we >are still not satisfied with this. He just went back to the sub >select code, so we can't just now give a definite answer when we have >a new key cache. > >(I am myself totally concentrating on getting 4.0.2-beta out; When >this is done I hope to have time to take a look a the key cache problem) > 4.0.2 will be labelled beta ? > >Regards, >Monty > > > MySQL, sql, query -- -- \|/ __\|/ `@" / o . \ "@' Microsoft? Por acaso é alguma nova /___| \/ |___\ marca de papel higiênico? \___U__/ .^. Luciano Barcaro - Linux User # 99517 /v\ Registre-se gratuitamente em // \\http://counter.li.org //(.)\\ ICQ # 17266954 ^`~'^ -- - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Mysql too slow over the LAN
Hello, I have built an application that connects to a mysql database located on a remote server in our LAN. When running the application locally on the server and I open the main window (it as several forms and does a lot of queries to fill the fields, etc.) it takes about 2 to 3 seconds to open. However, when I use this application on some other client in the same LAN, this form takes about 20 to 30 seconds to open! Can someone help me with this? Thanks. - Email Enviado utilizando o serviço MegaMail - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Help Writing UDF
I was wondering if any one could help me with a about writing UDF's for mysql. If I reallocate more memory for the result string; ie char *myResult; myResult = (char *) calloc(1, resultSize); *res_length = (ulong) resultSize; return myResult; Do I have to free it anywhere - and if so where? Or will mysql handle this for me? Cheers Gav Brown - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: Need help
Thanks, i had check and had already solve the problem. Gurhan Ozen <[EMAIL PROTECTED]> a dit : > Use perror program to see what the error code means.. > > perror 145 > Error code 145: Unknown error 145 > 145 = Table was marked as crashed and should be repaired > > Repair your table.. > see: http://www.mysql.com/doc/R/E/REPAIR_TABLE.html > > Gurhan > > -Original Message- > From: Bertrand TACHAGO [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, May 21, 2002 9:16 AM > To: [EMAIL PROTECTED] > Subject: Re: Need help > > > Hi, > I have a MySQL database with a table named CONNEXION. When i'm trying to do > something with the specific table, i have the following error: > ERROR1016:Can't open file: 'CONNEXION.MYD'. (errno: 145) > Please can anybody help me? > Thanks in advance > > > -- > > ** > Bertrand TACHAGO E_mails: [EMAIL PROTECTED] / [EMAIL PROTECTED] > Network / information specialist > SDNP SchoolNet Cameroon Phone: (237)221 25 53 > Web site: www.sdnp.cm/tachago > > ** > > > > - > Before posting, please check: >http://www.mysql.com/manual.php (the manual) >http://lists.mysql.com/ (the list archive) > > To request this thread, e-mail <[EMAIL PROTECTED]> > To unsubscribe, e-mail > <[EMAIL PROTECTED]> > Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php > -- ** Bertrand TACHAGOE_mails: [EMAIL PROTECTED] / [EMAIL PROTECTED] Network / information specialist SDNP SchoolNet Cameroon Phone: (237)221 25 53 Web site: www.sdnp.cm/tachago ** - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: adodb
Given your query, you would access it like: $avgField = $avg->fields['avg(fieldname)']; You can also change your query to use an alias like: "select avg(fieldname) as theAvg from tablename" HTH, Scott -Original Message- From: bobbie bob [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 21, 2002 9:12 AM To: [EMAIL PROTECTED] Subject: adodb Hi i'm using adodb in my code to connect to mysql.Its workingfine for the queries which get the values from DB. 1) But When i use the Query $avg=$conn->Execute("select avg(fieldname) from tabname & then i say print $avg it prints ""OBJECT"" when i try print $avg->fields[fieldname] it doesn't print anything. what shall i do? how do i print the value of avg in my php code. 2)$duration=$conn->Execute("select sum(UnixTimeStamp(F1) - UnixTimeStamp(F2)) from tabname print $duration doesn't print anything how do i print the result? plz help me.Mail to [EMAIL PROTECTED] Thanks prasad __ Do You Yahoo!? LAUNCH - Your Yahoo! Music Experience http://launch.yahoo.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Re: Need help
Bertrand, Tuesday, May 21, 2002, 4:15:37 PM, you wrote: BT> I have a MySQL database with a table named CONNEXION. When i'm trying to do BT> something with the specific table, i have the following error: BT> ERROR1016:Can't open file: 'CONNEXION.MYD'. (errno: 145) BT> Please can anybody help me? BT> Thanks in advance # perror 145 Error code 145: Unknown error 145 145 = Table was marked as crashed and should be repaired Try to repair table using myisamchk or REPAIR TABLE. Look at: http://www.mysql.com/doc/R/e/Repair.html -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Egor Egorov / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net <___/ www.mysql.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Mysql Client
Federico, Monday, May 20, 2002, 6:57:28 PM, you wrote: FC> I'm testing MySQL Client on Win98, my Server on Suse Linux 7.0. FC> 1- I select database test 2-Commands-->>tables-->Choose Tables, I choose f0001, I can see info Found 3 FC> columns in 1 tables 3-Commands-->>Tables-->Edit Tables here nothing happens. 4-Commands-->>Tables-->Create Tables here nothing happens. As I assume, you are using MySQLGUI. If so, "Edit Table" and "Create tables" are doing nothing ... FC> What is going on? FC> TIA. -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Victoria Reznichenko / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net <___/ www.mysql.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: RE: Securing a Non-Secure Installation
Frank, Tuesday, May 21, 2002, 12:56:38 PM, you wrote: FS> How can one evaluation the security of a MySQL installation and what are FS> the steps that should be taken to secure an installation from the ground FS> up. What did you mean "security of a MySQL installation"? Access to the MySQL server or secure connection or what? Your question is not clear enough for me ... FS> Thanks FS> Frank -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Egor Egorov / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net <___/ www.mysql.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Re: error message....somewhat lost!
Simon, Monday, May 20, 2002, 7:24:28 PM, you wrote: SKC> I'm running mysql-3.23.36-sun-solaris2.7-sparc. SKC> And yes, I'm pretty sure that the server is installed. I can still SKC> query the database using a DBI script and get results back. SKC> My mysqld is in /usr/local/mysql/bin SKC> When I try running it, I get this error message: SKC> mysqld: Can't change dir to '/usr/local/mysql-3.23.36-sun-solaris2.7-sparc/var/' SKC> (Errcode: 2) SKC> 020520 9:14:29 Aborting Simon, if you have mysqld running why do you try to run it again? If you want to run another instance of mysqld check the following link: http://www.mysql.com/doc/m/y/mysqld_multi.html SKC> I checked the path and there is no var directory in /usr/local/mysql-3.23.36-sun-solaris2.7-sparc SKC> I'm really lost! Thanks for your advice! -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Egor Egorov / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net <___/ www.mysql.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Re: Is this a Bug?: Query returns an unexpected result.
Benjamin, Monday, May 20, 2002, 9:21:02 PM, you wrote: BP> On Mon, May 20, 2002 at 07:28:01PM +0300, [EMAIL PROTECTED] wrote: BP> [...] >> II> select >> II> o.orderid, >> II> o.shipping_date, >> II> o.cancel_date >> II> from orders o, member u >> II> where o.userid = u.userid; BP> [...] >> II> the results of the last two queries are: >> >> II> orderid shipping_date cancel_date >> II> 1 2002-05-20 21:50:24 NULL >> II> 2 2002-05-20 21:50:24 NULL >> II> orderid shipping_date cancel_date >> II> 1 2002-05-20 21:50:24 2002-05-20 21:50:24 >> >> II> in the first query, cancel_date should not be null for orderid=1. >> >> It is fixed in v4.0.2 ... BP> As the 4.0.x tree is still declared alpha, can we expect an back-port BP> of the fix to the 3.23.x tree? Sure, it's fixed in 3.23.51, too. BP> Benjamin. -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Victoria Reznichenko / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net <___/ www.mysql.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: GROUP BY on multiple fields apparently broken
matt, Sunday, May 19, 2002, 6:14:17 PM, you wrote: m> Description: m> mysql> describe DLSummary; m> ++--+--+-+-+---+ m> | Field | Type | Null | Key | Default | Extra | m> ++--+--+-+-+---+ m> | DownloadID | int(10) unsigned | YES | MUL | NULL| | m> | Year | int(10) unsigned | YES | MUL | NULL| | m> | YDay | int(10) unsigned | YES | | NULL| | m> | Count | int(10) unsigned | YES | | NULL| | m> ++--+--+-+-+---+ m> 4 rows in set (0.00 sec) m> mysql> show keys from DLSummary; m> +---+++--+-+---+-+--++--++-+ m> | Table | Non_unique | Key_name | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | Null | Index_type m> | Comment | m> +---+++--+-+---+-+--++--++-+ m> | DLSummary | 1 | Date |1 | Year| A | 1 | NULL | NULL | YES | BTREE m> | | m> | DLSummary | 1 | Date |2 | YDay| A | 377 | NULL | NULL | YES | BTREE m> | | m> | DLSummary | 1 | DownloadID |1 | DownloadID | A | 15378 | NULL | NULL | YES | BTREE m> | | m> +---+++--+-+---+-+--++--++-+ m> 3 rows in set (0.01 sec) m> BUG m> mysql> select Year,YDay,sum(Count) from DLSummary group by Year,YDay; m> ERROR 1062: Duplicate entry '2001-125' for key 1 m> BUG m> mysql> select Year,YDay,sum(Count) from DLSummary group by concat(Year,YDay); m> +--+--++ m> | Year | YDay | sum(Count) | m> +--+--++ m> | 2001 | 124 | 2140 | m> | 2001 | 125 | 10302 | m> . m> This seems rather odd. GROUP BY Year,YDay is documented to be topologically m> equivalent to GROUP BY CONCAT(Year,YDay) (well, more or less) but has m> functional difference. m> Bug tested in 4.0.2 @ BK 1.1272 (May 17th) and also on 4.0.2 as of around m> March 2nd, so it's nothing recent. Thank you for your bug report! -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Victoria Reznichenko / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net <___/ www.mysql.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: restarting MySQL on OS X
Alex, Tuesday, May 21, 2002, 3:43:16 PM, you wrote: AP> I was wondering if anyone knew the "proper" way to restart MySQL on OS X? AP> I did mysqladmin -p shutdown then safe_mysqld...is this the same as AP> if the machine started up? mysqladmin shutdown - takes down your MySQL server. Using safe_mysqld you run MySQL server again. -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Egor Egorov / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net <___/ www.mysql.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Help a newbie please
Hoa, Tuesday, May 21, 2002, 6:33:46 AM, you wrote: HD> Please don't kill me. I want to learn about databases. I hear MySQL is a HD> good start. I have RedHat Linux and I've download and (I believe) installed HD> mysql. HD> Okay, my questions are? What is the difference between the mysql server and HD> the client program? :-) MySQL is a RDBMS (Relational DataBase Management System). Briefly MySQL server makes management of databases, data storage and processing and so on ... MySQL client program is used to communicate with MySQL server :) HD> Do I need both? If you want to work with MySQL server you must have it :) As a client program you can use MySQL client program or any GUI or you can develop your own application :) HD> What is the role of the server and HD> what is the role of the client program? See above. HD> How do I start inputing data into HD> the database? At first you should create your database. How to create databases read in our manual: http://www.mysql.com/doc/C/r/Creating_database.html At second you should create a table: http://www.mysql.com/doc/C/R/CREATE_TABLE.html About inserting data into tables you can also read in our manual: http://www.mysql.com/doc/I/N/INSERT.html HD> Thanks in advance for your help. HD> Hoa -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Victoria Reznichenko / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net <___/ www.mysql.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: difference between fixed length tables MyISAM vs. ISAM
Hi. Just a little addition to the original e-mail: you want to try SHOW TABLE STATUS Bye, Benjamin. On Mon, May 20, 2002 at 10:08:13PM -0700, [EMAIL PROTECTED] wrote: > On Sun, May 19, 2002 at 06:26:54AM -0700, Henry Hank wrote: > > > > Hello All, > > > > I recently moved my database from mysql 3.22.29 to 3.23.41, and > > udated all my tables to MyISAM tables. Under ISAM, I could take the > > filesize of the ISD table and divide by the record length to get the > > exact number of records returned by "select count(*)" from that > > table (or vise-versa - it always worked). [...] -- [EMAIL PROTECTED] - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Is this a Bug?: Query returns an unexpected result.
Hi. On Tue, May 21, 2002 at 02:14:26PM +0300, [EMAIL PROTECTED] wrote: > > This bug was fixed interim, as it is no longer present in 4.0.2 nor in > 3.23.51. Ah. Okay. Thanks for testing. This must be this change from 3.23.49, I guess: -- + Fixed unlikely caching bug when doing a join without keys. In this case the last used field for a table always returned NULL. -- Don't know why I missed it when I looked the first time. Sorry about the false alarm. Regards, Benjamin. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Inserting images and other blobs
Any suggestions on how to load images from a web site into a MySQL db? I would like to set up a page that allows you to select an image from the local machine and load it to my MySQL DB on my web server. I'm not sure if it would just be a regular insert statement or something else? Thanks... /Tim - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Crash & Incorrect Database
Hello, I'm not sure if my previous post made it to the list, but it seems that mysql no longer accepts '.' in database names. I merely changed the . with _ and the missing databases came alive :) Kind Regards, 0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0 escape net m a k i n g t h e n e t w o r k f o r y o u 465b South Road ph 8293 2526 KESWICK SA 5035 fx 8293 2949 0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0 On Tue, 21 May 2002, Myk Melez wrote: > Stavros Patiniotis wrote: > > >Hello, > > > >My hard drive has just failed on my database server, and I have rebuilt it > >and copied the data from backups back on to the drive, however mySQL > >cannot see all of the databases. > > > >A 'show databases' shows all of the databases, however 'use DBNAME' says > >ERROR 1102: Incorrect database name > > > > > My first guess is a file/directory permissions problem. Make sure the > backups you copied over are owned by the user the MySQL server runs as > (probably "mysql"). > > -myk > > > - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Large table delete from ...
At 01:22 AM 5/19/2002, you wrote: >Dear all, > >I have some large MySQL tables and II want to delete for example month >2-2002 >entirelly from an sql table. > >I use now ... >delete from table_name where year(data)=2002 and month(data)=2; > >I have almost 25.000.000 row and something like 7-8 mil is from month 2. > >Seems to make it for 2 hours and it's very much as time, I need other tables >as well to clean up and then need to stop too much from clients the >database. > >Can be do this in other way? > >Also if there a possibilities to export and delete this records?? > >Regards, >Valics Lehel Valics, If you are using MyISAM tables, you may want to put each month into a separate table, and then have your query use Merge Tables (quite fast). To delete a month, delete all the rows from the table which takes a few milliseconds (MySQL is basially dropping the table and rebuilding it when you do a "delete * from myisam_table" or change your merge tables definition. Mike >- >Before posting, please check: >http://www.mysql.com/manual.php (the manual) >http://lists.mysql.com/ (the list archive) > >To request this thread, e-mail <[EMAIL PROTECTED]> >To unsubscribe, e-mail <[EMAIL PROTECTED]> >Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Crash & Incorrect Database
Stavros Patiniotis wrote: >Hello, > >My hard drive has just failed on my database server, and I have rebuilt it >and copied the data from backups back on to the drive, however mySQL >cannot see all of the databases. > >A 'show databases' shows all of the databases, however 'use DBNAME' says >ERROR 1102: Incorrect database name > > My first guess is a file/directory permissions problem. Make sure the backups you copied over are owned by the user the MySQL server runs as (probably "mysql"). -myk - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
mysqladmin hanging on Solaris 8/Intel
Hello! I have a strange problem with mysqladmin on Solaris 8. I can't seem to shut down the server via "mysqladmin -uroot -p shutdown". It just... well... sits there. Hitting gives bash-2.03$ mysqladmin shutdown ^CWarning; Aborted waiting on pid file: '/opt/db/simon.pid' after 121 seconds bash-2.03$ The Pidfile says 7962. ps -ef says mysqld is running with PID 7962. Connecting to the mysql server after running mysqladmin and terminating it works, but the uptime has been reset. I really wouldn't want to get rough with it, so how do I take it down gracefully with minimum danger of losing data? Cheers, Markus -- Markus Lervik Linux-administrator Vaasa City Library - Regional Library +358-6-325 3589 / +358-40-832 6709 - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: innodb rollbacks
On Tuesday 21 May 2002 12:24 am, Jeremy Zawodny wrote: > On Mon, May 20, 2002 at 12:25:26PM -0400, walt wrote: > > Does anyone know where rollbacks are stored for innodb tables? I > > assume memory since I keep getting a table full error when trying to > > drop an index. sql,query > > I'm not exactly sure what you're asking, but the rollback information > needs to be stored on disk. Otherwise it cannot recover form a crash. > > Anyway, I suspect that your problem is that your tablespace is full. > Can you try added another file and see if that makes the problem go > away? > > Jeremy Thanks for your reply Jeremy! I'm an Oracle person, so I tend to think of things being in multiple files/tablespaces. Do you know if there is a way to view the rollback stats? I've got 6GB of datafiles and only 1 table loaded with 46 rows, 14 indexes, and approx 1.6million records. I'm trying now to load all the data again in a seperate table to see what it takes to fill up the datafiles. Thanks again! -- Walter Anthony System Administrator National Electronic Attachment Atlanta, Georgia 1-800-782-5150 ext. 1608 "If it's not broketweak it" - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: MySQL 3.23.44 not using indexes
Hi! > "Jeremy" == Jeremy Zawodny <[EMAIL PROTECTED]> writes: Jeremy> On Fri, May 17, 2002 at 11:41:49AM +0300, Michael Widenius wrote: Jeremy> [snip] Jeremy> That reminds me. A while back (9 months, maybe), I seem to remember Jeremy> you discussion a re-write of the key cache so that it would use a more Jeremy> locking strategy. Jeremy> Is that supposed to happen in 4.0.x? I don't recall having seen a Jeremy> commit that affected the key cache yet. Sanja has been trying to do improvements to the key cache code, but we are still not satisfied with this. He just went back to the sub select code, so we can't just now give a definite answer when we have a new key cache. (I am myself totally concentrating on getting 4.0.2-beta out; When this is done I hope to have time to take a look a the key cache problem) Regards, Monty -- For technical support contracts, goto https://order.mysql.com/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Mr. Michael Widenius <[EMAIL PROTECTED]> / /|_/ / // /\ \/ /_/ / /__ MySQL AB, CTO /_/ /_/\_, /___/\___\_\___/ Helsinki, Finland <___/ www.mysql.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Error 1030: error 127 (table handler)
We've been seeing this quite often at our web application company. The development machines run debian linux with kernel 2.4.x (they differ) and ReiserFS, and on local installations of the web app, which puts DB, web server, and CGIs on the same box, we see frequent table corruption. Sometimes it's on the order of a couple of times a week, which is absolutely ridiculous considering how little the DB install is stressed on developer boxes. Fortunately the DB server used for the public cluster, which gets its own debian linux 2.4.x machine, and I *think* doesn't use ReiserFS (the maintenance crew has changed its collective mind several times, much to the annoyance of the development and QA teams), does *not* exhibit this problem, or so the crew claims. (Don't even ask about the politics of communication within our company...) This is clearly a BIG BIG worry for me, but the story I am handed (from some very dubious sources) is that it's an interaction between MySQL and ReiserFS and that as long as the public servers don't user ReiserFS we'll be fine. Can anybody actually lend credence to this claim? -rob On 21/5/02 at 2:49 pm, Matthias Jaekle <[EMAIL PROTECTED]> wrote: > Hello, > > approximatly twice a week I get Error 1030: error 127 (table handler) on > one table. This table is around 2.3 GB, the indexfile around 2.2 GB. > There are around 24.000.000 records in the table. > > I am running mysql 4.0.1-alpha on linux with 2.4.18 kernel. But I also > got this error with older mysql versions (3.23) and kernels. > > Sometimes restarting mysql solves the problem, sometimes I have to check > the table to get back a running system (no errors found) and sometimes I > had to repair the index or data file. But I can not find any schema. > > Checking and repairing tables take multiple hours and stops our normal > work. So it is very bad. > > Does anybody have an idea, how to solve this problem ? > Does somebody else have problems like this ? > Could there be misconfiguration responsible ? > > Many thanks > > Matthias Jaekle > > > > - > Before posting, please check: >http://www.mysql.com/manual.php (the manual) >http://lists.mysql.com/ (the list archive) > > To request this thread, e-mail <[EMAIL PROTECTED]> > To unsubscribe, e-mail <[EMAIL PROTECTED]> > Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php > > - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: MyCC problems with qt3.0.4
Hi! This problem is now fixed in the current BK tree and will OK in 0.8.3. Below is the modification you need to make MyCC work with Qt 3.04! +++ mycc/src/CSqlEditor/syntaxhighliter_sql.cpp @@ +125 @@ SyntaxHighlighter_SQL::SyntaxHighlighter_SQL() : QTextPreProcessor(), lastFormat( 0 ), lastFormatId( -1 ) { - formats.setAutoDelete(true); +#ifdef WIN32 + formats.setAutoDelete(true); //This avoids a mem-leak under Win32 ? +#endif hasSqlSyntaxHighlighting = false; hasDatabaseSyntaxHighlighting = false; QIntDictIterator it(*g_SqlEditorStyles); for ( ; it.current(); ++it ) if (it.current()->ID != SQLKeyWord::highlight_PARENTHESES_MATCHING) addFormat(it.current()->ID, new QTextFormat(it.current()->Font, it.current()->Color)); } > -Original Message- > From: Kevin Lester [mailto:[EMAIL PROTECTED]] > Sent: Friday, May 17, 2002 2:36 PM > To: [EMAIL PROTECTED] > Subject: MyCC problems with qt3.0.4 > > > I'm running a pretty standard install of RedHat 7.2 on a x86 > machine. I compiled MyCC with qt3.0.4 and everything worked > well except when I closed a popup window the program would > seg fault. I re-compiled it using qt3.0.2 and it works fine > now. You might want to make sure that users know they must > use 3.0.2 if they want it to work properly. Of course > fixing the problem with qt3.0.4 would be nice as well. :) Regards, Jorge -- For technical support contracts, visit https://order.mysql.com/?ref=mjdc __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Mr. Jorge del Conde <[EMAIL PROTECTED]> / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Full-Time Developer /_/ /_/\_, /___/\___\_\___/ Mexico City, Mexico <___/ www.mysql.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: Need help
Use perror program to see what the error code means.. perror 145 Error code 145: Unknown error 145 145 = Table was marked as crashed and should be repaired Repair your table.. see: http://www.mysql.com/doc/R/E/REPAIR_TABLE.html Gurhan -Original Message- From: Bertrand TACHAGO [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 21, 2002 9:16 AM To: [EMAIL PROTECTED] Subject: Re: Need help Hi, I have a MySQL database with a table named CONNEXION. When i'm trying to do something with the specific table, i have the following error: ERROR1016:Can't open file: 'CONNEXION.MYD'. (errno: 145) Please can anybody help me? Thanks in advance -- ** Bertrand TACHAGOE_mails: [EMAIL PROTECTED] / [EMAIL PROTECTED] Network / information specialist SDNP SchoolNet Cameroon Phone: (237)221 25 53 Web site: www.sdnp.cm/tachago ** - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Passwords
> Hello~ > > I read the MySQL manual on how to set passwords but i'm a little confused. > How can i remove privileges so that you cant log on anonymously? > Thanks. > Amy > - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: Securing a Non-Secure Installation
There is no secure, nonsecure installation. You usually take security measurements after the installation.. The security mesaure you take before installation is to create a group and user called mysql to have appropriate permissions on the datadirs, socketfiles, etc. See: http://www.mysql.com/doc/P/r/Privilege_system.html Gurhan -Original Message- From: Frank Schmuck [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 21, 2002 5:57 AM To: [EMAIL PROTECTED] Subject: RE: Securing a Non-Secure Installation How can one evaluation the security of a MySQL installation and what are the steps that should be taken to secure an installation from the ground up. Thanks Frank - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: select in select
You can use JOIN... See: http://www.mysql.com/doc/A/N/ANSI_diff_Sub-selects.html Gurhan -Original Message- From: van den Heuvel, Frank [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 21, 2002 8:47 AM To: '[EMAIL PROTECTED]' Subject: select in select Hello, I would like to do this witihn mysql: SELECT con.id,con.name FROM contacts con, registrar_contact reg WHERE NOT con.id IN (SELECT contactid FROM registrar_contact WHERE registrarid=1) can someone tell me how to do this ? contacts table consists of: id(primary key) name registrar_contact consists of: registrarid contactid(this is linked to contacts id field) (there is no primary key) thanks in advance. Regards, Frank - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Best SQL Statement
Dear All, I have a table contains airline ticket prices, and I want to get the following data from this table The first 5 records of the lowest price of each airline from each city, and don't want to get a duplicated combination of (airline, city) in this result (even if I didn't see all airlines or all cities, I want to see only five records). I get the required results (in MSAccess) by doing the following: 1- Create a query "Q1" with the following source: SELECT distinct [ticket cut rate].[primary airline] FROM [ticket cut rate] 2- Then Create a second Query "Q2" with the following source: SELECT Q1.[primary airline], Min([ticket cut rate].[price per adult]) AS [MinOfprice per adult] FROM Q1 INNER JOIN [ticket cut rate] ON Q1.[primary airline] = [ticket cut rate].[primary airline] GROUP BY Q1.[primary airline]; 3- And I get the required results from the following Query: SELECT TOP 5 First([ticket cut rate].origin) AS FirstOforigin, [ticket cut rate].[primary airline], [ticket cut rate].[price per adult] FROM (Q1 INNER JOIN Q2 ON Q1.[primary airline] = Q2.[primary airline]) INNER JOIN [ticket cut rate] ON (Q2.[primary airline] = [ticket cut rate].[primary airline]) AND (Q2.[MinOfprice per adult] = [ticket cut rate].[price per adult]) GROUP BY [ticket cut rate].[primary airline], [ticket cut rate].[price per adult]; How can I get the same result with only one sql statement??? Oh by the way, can I create queries in MySQL just like MSAccess Please help bst rgds Hayan - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: Need help
check that the file exists. also check that the user that mysql is running as has the appropriate permissions to read/write that file. run the "perror" command. -Original Message- From: Bertrand TACHAGO [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 21, 2002 09:16 To: [EMAIL PROTECTED] Subject: Re: Need help Hi, I have a MySQL database with a table named CONNEXION. When i'm trying to do something with the specific table, i have the following error: ERROR1016:Can't open file: 'CONNEXION.MYD'. (errno: 145) Please can anybody help me? Thanks in advance -- ** Bertrand TACHAGOE_mails: [EMAIL PROTECTED] / [EMAIL PROTECTED] Network / information specialist SDNP SchoolNet Cameroon Phone: (237)221 25 53 Web site: www.sdnp.cm/tachago ** - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
mysql priviledges question
Could someone give me a brief description of the following priviledges and what they are used for...? 1) References Not yet implemented. Is that still true? 2) File ?? 3) Index Is this so the person can create an index, and if so, they must first have the alter statement right? I didnt see much in the mysql manual about these priviledges Thank you, Taylor Taylor Lewick Unix System Administrator Fortis Benefits 816 881 6073 "Help Wanted. Seeking Telepath..." "You Know where to apply." Please Note The information in this E-mail message is legally privileged and confidential information intended only for the use of the individual(s) named above. If you, the reader of this message, are not the intended recipient, you are hereby notified that you should not further disseminate, distribute, or forward this E-mail message. If you have received this E-mail in error, please notify the sender. Thank you * - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: returning top two values
[snip] I want to retrieve members of each family that have the two highest scoring values for a column. i.e the max and second max. Is there a function similar to max() or greatest() that will return the top 2 values when grouping by family ID? [/snip] Try this query select foo, MAX(bar) from table order by bar DESC limit 2; HTH! Jay - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: select in select
[snip] > SELECT con.id,con.name FROM contacts con, registrar_contact reg > WHERE NOT con.id IN > (SELECT contactid FROM registrar_contact WHERE registrarid=1) [/snip] Current versions of MySQL do not support sub-selects. HTH! Jay - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
SV: returning top two values
Hi Rich, Use the LIMIT 2 and sort the SELECT with ORDER BY family ID DESC // Jonny > -Ursprungligt meddelande- > Från: R.Dobson [SMTP:[EMAIL PROTECTED]] > Skickat: den 21 maj 2002 14:57 > Till: [EMAIL PROTECTED] > Ämne: returning top two values > > Hi, > I have a table containing data on a number of families. > > I want to retrieve members of each family that have the two highest > scoring values for a column. i.e the max and second max. > Is there a function similar to max() or greatest() that will return the > top 2 values when grouping by family ID? > > I can do this using perl in about three steps but would rather make life > easier for myself if I can. > > Thanks in advance > Rich > > mysql query > > > - > Before posting, please check: >http://www.mysql.com/manual.php (the manual) >http://lists.mysql.com/ (the list archive) > > To request this thread, e-mail <[EMAIL PROTECTED]> > To unsubscribe, e-mail > <[EMAIL PROTECTED]> > Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: returning top two values
Not a problem. I think the easist way to do it is SELECT * FROM families ORDER BY score DESC LIMIT 2 Of course you need your grouping statement in there but the ORDER BY section shouldntmake a difference. There are MAX and MIN functions but my understanding is that those will only return THE highest/lowest values and not say the highest two values. It would work Ibelieve if there were two families with the same highest score. Someone correct me if I'mwrong. -Nick > Hi, > I have a table containing data on a number of families. > > I want to retrieve members of each family that have the two highest > scoring values for a column. i.e the max and second max. > Is there a function similar to max() or greatest() that will return the > top 2 values when grouping by family ID? > > I can do this using perl in about three steps but would rather make > life easier for myself if I can. > > Thanks in advance > Rich > > mysql query > > > - > Before posting, please check: > http://www.mysql.com/manual.php (the manual) > http://lists.mysql.com/ (the list archive) > > To request this thread, e-mail To > unsubscribe, e-mail > Trouble > unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: restarting MySQL on OS X
At 9:20 AM -0400 5/21/02, Reid Sutherland (mysql) wrote: >Alex Pilson wrote: >>I was wondering if anyone knew the "proper" way to restart MySQL on OS X? >> >>I did mysqladmin -p shutdown then safe_mysqld...is this the same as >>if the machine started up? > >Not exactly the same. But for intents and purposes it does what you want. > >If you want to truly make it seem like the system went down and came >up, do the following: > ># kill -9 ># kill `cat /path/to/mysql.pid` > ># /path/to/safe_mysqld & > >Or you can try this. > ># /etc/init.d/mysqld stop (or something similar) >then ># /etc/init.d/mysqld start I knew there was more to this than what I was doing. Thanks I think this is what I am looking for. -- <---> Alex Pilson FlagShip Interactive, Inc. [EMAIL PROTECTED] 404.728.4417 404.642.8225 CELL // Web Design // Lasso 5 Web Development/Hosting // MySQL Development // Apple DVD Studio Pro Authoring/Training // Macromedia Director/Flash Authoring <---> - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: restarting MySQL on OS X
Alex Pilson wrote: > I was wondering if anyone knew the "proper" way to restart MySQL on OS X? > > I did mysqladmin -p shutdown then safe_mysqld...is this the same as if > the machine started up? Not exactly the same. But for intents and purposes it does what you want. If you want to truly make it seem like the system went down and came up, do the following: # kill -9 # kill `cat /path/to/mysql.pid` # /path/to/safe_mysqld & Or you can try this. # /etc/init.d/mysqld stop (or something similar) then # /etc/init.d/mysqld start -- -reid - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Need help
Hi, I have a MySQL database with a table named CONNEXION. When i'm trying to do something with the specific table, i have the following error: ERROR1016:Can't open file: 'CONNEXION.MYD'. (errno: 145) Please can anybody help me? Thanks in advance -- ** Bertrand TACHAGOE_mails: [EMAIL PROTECTED] / [EMAIL PROTECTED] Network / information specialist SDNP SchoolNet Cameroon Phone: (237)221 25 53 Web site: www.sdnp.cm/tachago ** - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Apache + php + MYSQL
Jay Blanchard wrote: > [snip all kinds of stuff] >$query = "SELECT * FROM appl"; > $connection = mysql_connect("linuxsrv", "sameer", "sameer"); > mysql_select_db("rcmms", $connection); > $result = mysql_query($query, $connection); > ?> > I says that mysql_connect > > Fatal error: Call to undefined function: mysql_connect() > in /var/www/html/rcmms/appl.php on line 5 > [/snip] > > Try... >$connection = mysql_pconnect("linuxsrv", "sameer", "sameer"); > mysql_select_db("rcmms", $connection); > $result = mysql_query($query, $connection); > $query = "SELECT * FROM appl"; > ?> This is wrong. You can't define a variable _after_ you attempt to use it in a function. > Connections first, database selections next, then queries and results. If > you get an "undefined function" now there is no MySQL support in your PHP > compile. As you mentioned, the problem here is that he is lacking support for mysql in his PHP build. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: restarting MySQL on OS X
There is a link for mysql-startupitem.pkg.tar.gz on http://www.entropy.ch/software/macosx/mysql/ This will install the startup stuff needed to do what you want. On 5/21/2002 5:43 AM, "Alex Pilson" <[EMAIL PROTECTED]> wrote: > I was wondering if anyone knew the "proper" way to restart MySQL on OS X? > > I did mysqladmin -p shutdown then safe_mysqld...is this the same as > if the machine started up? -- Jim Dickenson mailto:[EMAIL PROTECTED] Computers for Marketing Corporation http://www.cfmc.com/ - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Possible Bug in UPdATE in MySQL 4.0.1 alpha
Hi! > "Michael" == Michael B Venezia <[EMAIL PROTECTED]> writes: >> Description: Michael>Possible Bug in UPDATE in MySQL 4.0.1 Michael> Attempting backtrace. You can use the following information to find out Michael> where mysqld died. If you see no messages after this, something went Michael> terribly wrong... Michael> Stack range sanity check OK, backtrace follows: Michael> 0x807db7f Michael> 0x823d64a Michael> 0x8204447 Michael> 0x821bbd6 Michael> 0x820bb41 Michael> 0x80d082f Michael> 0x80b0479 Michael> 0x8086de7 Michael> 0x808a262 Michael> 0x8084e57 Michael> 0x808a694 Michael> 0x8084296 Michael> Stack trace seems successful - bottom reached Michael> Please read http://www.mysql.com/doc/U/s/Using_stack_trace.html and follow Michael> instructions on how to resolve the stack trace. Resolved Michael> stack trace is much more helpful in diagnosing the problem, so please do Michael> resolve it Michael, could you please read the above instructions and try to resolve the backtrace for us? >> How-To-Repeat: Michael>Did this query on a database called 'medical' below text Michael>UPDATE `Physical Examination Report` SET `History of Present Michael> Illness`='moo\r\nfoo\r\nboo.' WHERE `ID Code of Appointment`=27 Any chance you could ftp a copy of the 'Physical Examination Report' table to ftp://support.mysql.com/pub/mysql/secret so that we could try to repeat the problem ? Just having the table definition formats is not enough to repeat a problem like this! Regards, Monty - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
select in select
> Hello, > > I would like to do this witihn mysql: > > SELECT con.id,con.name FROM contacts con, registrar_contact reg > WHERE NOT con.id IN > (SELECT contactid FROM registrar_contact WHERE registrarid=1) > > can someone tell me how to do this ? > > contacts table consists of: > id(primary key) > name > > registrar_contact consists of: > registrarid > contactid(this is linked to contacts id field) > (there is no primary key) > > > thanks in advance. > > Regards, > > Frank > - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: restarting MySQL on OS X
alex, chuck a copy of phpMyAdmin onto the machine. edit the phpMyAdmin configuration file to your username and password and load it up on the loopback address. you should find a button saying 'reload mysql' on the page. phpMyAdmin rules!!! cheers, jake on 21/5/02 1:43 pm, Alex Pilson at [EMAIL PROTECTED] wrote: > I was wondering if anyone knew the "proper" way to restart MySQL on OS X? > > I did mysqladmin -p shutdown then safe_mysqld...is this the same as > if the machine started up? - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
returning top two values
Hi, I have a table containing data on a number of families. I want to retrieve members of each family that have the two highest scoring values for a column. i.e the max and second max. Is there a function similar to max() or greatest() that will return the top 2 values when grouping by family ID? I can do this using perl in about three steps but would rather make life easier for myself if I can. Thanks in advance Rich mysql query - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: MyISAM internal algorithms
Hi, What i know : Indexing progressively, smaller regions of data space using a B tree like data structure. Regards, Gelu _ G.NET SOFTWARE COMPANY Permanent e-mail address : [EMAIL PROTECTED] [EMAIL PROTECTED] - Original Message - From: "Nick Stuart" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Tuesday, May 21, 2002 3:09 PM Subject: Re: MyISAM internal algorithms > Ok, so know you got me interested. What exactly are R-Trees. I know the > structure of B trees, hadto program a small version of a B' tree before, but never heard of an R-Tree. > Any explanation > or link to where I might find some info would be appreciated. > -Nick > > > On Mon, May 20, 2002 > at 09:39:52AM -0600, Andrei Cojocaru wrote: > >> > >> I believe mySQL > uses B-Trees (not > binary trees), that's about all I > >> know :) > > > > Right. The indexes are B- > Tree > structures (until R-Trees appear in 4.1, > > of course). > > > > Jeremy > > -- > > Jeremy D. > > Zawodny | Perl, Web, MySQL, Linux Magazine, Yahoo! > > <[EMAIL PROTECTED]> | > > http://jeremy.zawodny.com/ > > > > - > > Before posting, please check: > > > > http://www.mysql.com/manual.php (the manual) > > http://lists.mysql.com/ (the list > > archive) > > > > To request this thread, e-mail <[EMAIL PROTECTED]> > > To > > unsubscribe, e-mail > > [EMAIL PROTECTED]> > Trouble > > unsubscribing? Try: > http://lists.mysql.com/php/unsubscribe.php > > > > > - > Before posting, please check: >http://www.mysql.com/manual.php (the manual) >http://lists.mysql.com/ (the list archive) > > To request this thread, e-mail <[EMAIL PROTECTED]> > To unsubscribe, e-mail <[EMAIL PROTECTED]> > Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php > > - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Error 1030: error 127 (table handler)
Hello, approximatly twice a week I get Error 1030: error 127 (table handler) on one table. This table is around 2.3 GB, the indexfile around 2.2 GB. There are around 24.000.000 records in the table. I am running mysql 4.0.1-alpha on linux with 2.4.18 kernel. But I also got this error with older mysql versions (3.23) and kernels. Sometimes restarting mysql solves the problem, sometimes I have to check the table to get back a running system (no errors found) and sometimes I had to repair the index or data file. But I can not find any schema. Checking and repairing tables take multiple hours and stops our normal work. So it is very bad. Does anybody have an idea, how to solve this problem ? Does somebody else have problems like this ? Could there be misconfiguration responsible ? Many thanks Matthias Jaekle - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
select in select
Hello, I would like to do this witihn mysql: SELECT con.id,con.name FROM contacts con, registrar_contact reg WHERE NOT con.id IN (SELECT contactid FROM registrar_contact WHERE registrarid=1) can someone tell me how to do this ? contacts table consists of: id(primary key) name registrar_contact consists of: registrarid contactid(this is linked to contacts id field) (there is no primary key) thanks in advance. Regards, Frank - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
db name alias proxy
Hi! > "Grigory" == Grigory Kolesov <[EMAIL PROTECTED]> writes: Grigory> 1) Endiannes. I figured out that the size of packet is stored at the Grigory> beginning of packet as little endian unsigned int. Grigory> Is it so in all cases, or it just happens because both client and server Grigory> run on little endian machines? The packets are always sent as little endians, independent of the architecture of the server/client. Grigory> 2) Currently I rewrite only packets which contain: Grigory> +\x02+dbname Grigory> ++\x00+dbname (connection init) Grigory> +\x03+"\s*use\s*"+dbname. Grigory> I am not sure whether it is always correct. The above command will take care of the 'USE database' commands, but not be able to handle SQL commands where you directly refer to the database. Grigory> 3) Does anyone need such tool, should I post it on web somewhere? You could always add it to the MySQL portal section at: http://www.mysql.com/portal/software/html/index.html Regards, Monty -- For technical support contracts, goto https://order.mysql.com/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Mr. Michael Widenius <[EMAIL PROTECTED]> / /|_/ / // /\ \/ /_/ / /__ MySQL AB, CTO /_/ /_/\_, /___/\___\_\___/ Helsinki, Finland <___/ www.mysql.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
restarting MySQL on OS X
I was wondering if anyone knew the "proper" way to restart MySQL on OS X? I did mysqladmin -p shutdown then safe_mysqld...is this the same as if the machine started up? -- <---> Alex Pilson FlagShip Interactive, Inc. [EMAIL PROTECTED] 404.728.4417 404.642.8225 CELL // Web Design // Lasso 5 Web Development/Hosting // MySQL Development // Apple DVD Studio Pro Authoring/Training // Macromedia Director/Flash Authoring <---> - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Re: Bug in fulltext search in latest mysql-4.0.2 source
Hi! > "Vadim" == Vadim P <[EMAIL PROTECTED]> writes: Vadim> Sergei Golubchik wrote: >>> rebuild your indexes (the proper way to do it is to issue >>> REPAIR table_name USE_FRM Vadim> Sergei, would ALTER TABLE.. DROP INDEX.. ADD FULLTEXT... do the same trick? Yes, this would do the same thing as REPAIR, but a bit slower. Regards, Monty -- For technical support contracts, goto https://order.mysql.com/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Mr. Michael Widenius <[EMAIL PROTECTED]> / /|_/ / // /\ \/ /_/ / /__ MySQL AB, CTO /_/ /_/\_, /___/\___\_\___/ Helsinki, Finland <___/ www.mysql.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: MyISAM internal algorithms
Ok, so know you got me interested. What exactly are R-Trees. I know the structure of B trees, hadto program a small version of a B' tree before, but never heard of an R-Tree. Any explanation or link to where I might find some info would be appreciated. -Nick > On Mon, May 20, 2002 at 09:39:52AM -0600, Andrei Cojocaru wrote: >> >> I believe mySQL uses B-Trees (not binary trees), that's about all I >> know :) > > Right. The indexes are B- Tree structures (until R-Trees appear in 4.1, > of course). > > Jeremy > -- > Jeremy D. Zawodny | Perl, Web, MySQL, Linux Magazine, Yahoo! > <[EMAIL PROTECTED]> | http://jeremy.zawodny.com/ > > - > Before posting, please check: > http://www.mysql.com/manual.php (the manual) > http://lists.mysql.com/ (the list archive) > > To request this thread, e-mail <[EMAIL PROTECTED]> To > unsubscribe, e-mail > Trouble > unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: Apache + php + MYSQL
[snip all kinds of stuff] I says that mysql_connect Fatal error: Call to undefined function: mysql_connect() in /var/www/html/rcmms/appl.php on line 5 [/snip] Try... Connections first, database selections next, then queries and results. If you get an "undefined function" now there is no MySQL support in your PHP compile. HTH! Jay - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: HOWTO: diffs between rows.
On Tue, 21 May 2002, David Shields wrote: > Probably a very simple one for you guys, but I'm stuck. > Given a simple table (events): > idint > sttime not null > ettime not null > > I know I can get duration by converting st and et to secs and subtracting > (that bits easy), but how would I go about getting the gap between > successive records IN MY SQL STATEMENT (without processing the result set > in my application language (php)): i.e. > idst et > 1 09:00 10:00 > 2 10:15 10:45 > 3 11:45 12:00 > ... > i.e. my result wants to be (assuming data is good, and sort by st) > > idst et gap_since_last_row > 1 09:00 10:00 0 (no prev row) > 2 10:15 10:45 0:15 > 3 11:45 12:00 1:00 > ... > I suspect I should be using SQL variables, but docs seem a bit opaque. > > Anyone point me in right direction ? David, get the manual, look at the JOIN command. You have to LEFT JOIN the table to itself on the condition that t2.id = (t1.id - 1) that looks like: SELECT ANY_FUNCTION(t1.st, t2.et) FROM mytable AS t1 LEFT JOIN mytable AS t2 ON t2.id = (t1.id -1) WHERE ... This gives you access to the columns of two subsequent rows and you may process the data as you like. I did not test this, but it should work. For the first row, as expected, all columns of the right table t2 are set to NULL. Thomas - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Mysql Client
Do you mean, a character client for windows or the linux client? On linux I can do everything, delete, alter, insert, create, but I don't think that is going to solve my problem on windows. - Original Message - From: "Andrei Cojocaru" <[EMAIL PROTECTED]> To: "Federico Coco" <[EMAIL PROTECTED]>; "mysql" <[EMAIL PROTECTED]> Sent: Monday, May 20, 2002 1:47 PM Subject: Re: Mysql Client > try the command line version of the client first then a GUI based one > > Andrei Cojocaru > [EMAIL PROTECTED] > - Original Message - > From: "Federico Coco" <[EMAIL PROTECTED]> > To: "mysql" <[EMAIL PROTECTED]> > Sent: Monday, May 20, 2002 9:57 AM > Subject: Mysql Client > > > > I'm testing MySQL Client on Win98, my Server on Suse Linux 7.0. > > 1- I select database test > > 2-Commands-->tables-->Choose Tables, I choose f0001, I can see info Found > 3 > > columns in 1 tables > > 3-Commands-->Tables-->Edit Tables here nothing happens. > > 4-Commands-->Tables-->Create Tables here nothing happens. > > > > What is going on? > > > > TIA. > > > > > > - > > Before posting, please check: > >http://www.mysql.com/manual.php (the manual) > >http://lists.mysql.com/ (the list archive) > > > > To request this thread, e-mail <[EMAIL PROTECTED]> > > To unsubscribe, e-mail > <[EMAIL PROTECTED]> > > Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php > > > > > - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
mysqlbug
SEND-PR: -*- send-pr -*- SEND-PR: Lines starting with `SEND-PR' will be removed automatically, as SEND-PR: will all comments (text enclosed in `<' and `>'). SEND-PR: From: bug To: [EMAIL PROTECTED] Subject: [50 character or so descriptive subject here (for reference)] >Description: when configuring the problem is that configure cant find >some libs: libstdc++.so.3. >libstdc++.so.2 exits >What can I do? >How-To-Repeat: >./configure -with-mit-threads >Creating db table >Creating host table >Creating user table >Creating func table >Creating tables_priv table >Creating columns_priv table >Installation of grant tables failed! >/usr/libexec/ld-elf.so.1: Shared object "libc_r.so.4" not found >Examine the logs in ./data for more information. >You can also try to start the mysqld demon with: >./bin/mysqld --skip-grant & >You can use the command line tool >./bin/mysql to connect to the mysql >database and look at the grant tables: shell> ./bin/mysql -u root mysql mysql> show tables >Try 'mysqld --help' if you have problems with paths. Using --log >gives you a log in ./data that may be helpful. The latest information about MySQL is available on the web at >Fix: >Submitter-Id: >Originator:Engeniy V.Lyapin >Organization: Albumin >MySQL support: [none | licence | email support | extended email support ] >Synopsis: >Severity: <[ non-critical | serious | critical ] (one line)> >Priority: <[ low | medium | high ] (one line)> >Category: mysql >Class: <[ sw-bug | doc-bug | change-request | support ] (one line)> >Release: mysql-3.22.32 (Source distribution) >Environment: System: FreeBSD andreyco 3.3-RELEASE FreeBSD 3.3-RELEASE #0: Thu Sep 16 23:40:35 GMT 1999 [EMAIL PROTECTED]:/usr/src/sys/compile/GENERIC i386 Some paths: /usr/bin/perl /usr/bin/make /usr/bin/gcc /usr/bin/cc GCC: gcc version 2.7.2.3 Compilation info: CC='gcc' CFLAGS='' CXX='gcc' CXXFLAGS='' LDFLAGS='' Configure command: ./configure --with-unix-socket-path=/var/tmp/mysql.sock --wi th-low-memory --with-mit-threads=yes - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: HOWTO: diffs between rows.
You could join the table against itself, matching each row against every following record and then summarizing to find the "next" one. If your table is of a fair size, you'd need to play with the optimizer to make sure you get the efficiency you need. The SQL would be along the lines of: select max(curRow.id), time_to_sec(min(matchedRow.st)) - time_to_sec(max(curRow.et)) from events as curRow, events as matchedRow where curRow.et <= matchedRow.st group by curRow.id On 21/5/02 at 10:43 am, David Shields <[EMAIL PROTECTED]> wrote: > Probably a very simple one for you guys, but I'm stuck. > Given a simple table (events): > idint > sttime not null > ettime not null > > I know I can get duration by converting st and et to secs and subtracting > (that bits easy), but how would I go about getting the gap between > successive records IN MY SQL STATEMENT (without processing the result set > in my application language (php)): i.e. > idst et > 1 09:00 10:00 > 2 10:15 10:45 > 3 11:45 12:00 > > i.e. my result wants to be (assuming data is good, and sort by st) > > idst et gap_since_last_row > 1 09:00 10:00 0 (no prev row) > 2 10:15 10:45 0:15 > 3 11:45 12:00 1:00 > > I suspect I should be using SQL variables, but docs seem a bit opaque. > > Anyone point me in right direction ? > > David. > > - > Before posting, please check: >http://www.mysql.com/manual.php (the manual) >http://lists.mysql.com/ (the list archive) > > To request this thread, e-mail <[EMAIL PROTECTED]> > To unsubscribe, e-mail <[EMAIL PROTECTED]> > Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php > > - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php