Re: Will SELECT COUNT(*) FROM TABLE ever be cheap on INNODB?

2005-11-02 Thread Jigal van Hemert
Shankar Unni wrote: [EMAIL PROTECTED] wrote: If I understand the InnoDB engine correctly, I don't see how they could speed it up unless they start tracking how many records belong to each active version within a database. But one thing you can do to speed it up somewhat is to do a

Re: Question for JDBC and Mysql

2005-11-02 Thread Alec . Cawley
Xiaobo Chen [EMAIL PROTECTED] wrote on 01/11/2005 20:28:38: Hi, all I have a question like this: There's a field in table_A, date_time, if I say this in Mysql: select min(date_time), max(date_time) from table_A; it returned something like this:

Checking MySQL security

2005-11-02 Thread fredzy padzy
Hello everyone' I'm interesting and working in IT security and have to do some security test. Sometime there is a oracle DB, sometime, it's about mySQL. I found a lot a free scripts'n' tools to check the oracle security level but i' did not find any for mySQL. I only found a '.c' file which try

struct ST_SCHEMA_TABLE

2005-11-02 Thread Sergey Glukhov
Hi! Hello I would like to ask about struct ST_SCHEMA_TABLE found in sql\tables.h (version mysql-5.0.13-rc. If I am correct this struct didn't exist in early 5.0 versions). ST_SCHEMA_TABLE introduced in 5.0.3. This struct holds the information about information_schema(I_S) tables(see

Delivery by Demand

2005-11-02 Thread Fabricio Mota
Hi all, In the past, I worked as a Oracle user. I've noted that in oracle (or maybe in that configuration), when we request a great amount of data, such like: select * from million_records_table It does not delivers the entire table at the first moment. It delivers a little amount of data -

fixing messed up permissions

2005-11-02 Thread douglass_davis
I screwed up the permissions on my database. Basically I revoked all the permissions of the root account on the mysql database. To try to fix this, I went through all of the instructions here: http://dev.mysql.com/doc/refman/5.0/en/resetting-permissions.html I changed this a little to do

Re: fixing messed up permissions

2005-11-02 Thread Michael Stassen
[EMAIL PROTECTED] wrote: I screwed up the permissions on my database. Basically I revoked all the permissions of the root account on the mysql database. To try to fix this, I went through all of the instructions here: http://dev.mysql.com/doc/refman/5.0/en/resetting-permissions.html I

Re: MySQL show databases - all db shown

2005-11-02 Thread Michael Stassen
BÁRTHÁZI András wrote: Hi, When I migrated from 3.23 to 4.0 version (if I'm remember well), I think I missed to upgrade something, so all my MySQL users are able to see the list of the databases on my server. Currently, the MySQL version is 5.0.15, i ran the mysql database upgrade script,

Not finding customers without invoices

2005-11-02 Thread Brian Dunning
I'm trying to find a list of customers including a count of all their invoices, but it's not including customers who have no invoices - and it should. What's broken? SELECT customers.company, count(invoices.id) as invcount FROM customers, invoices WHERE customers.id= invoices.customer_id

Mysql and JDBC connection time out.

2005-11-02 Thread Xiaobo Chen
Hi, all. First, I should give some information on the setting: I have mysql database, say, mydatabase, existing in one machine A which is Solaris; I am trying to connect this database from another XP machine. The code snippet in the XP machine looks like this: String driver =

Re: Migration problem

2005-11-02 Thread Michael Stassen
[EMAIL PROTECTED] wrote: snip First, THANK YOU VERY MUCH!!! You actually posted the results of SHOW CREATE TABLE and EXPLAIN. I wish everyone who had a query problem would do those two very simple things. Agreed! Second, let's look again at what your EXPLAIN is telling you. If you locate

Re: Not finding customers without invoices

2005-11-02 Thread Alec . Cawley
Brian Dunning [EMAIL PROTECTED] wrote on 02/11/2005 16:22:29: I'm trying to find a list of customers including a count of all their invoices, but it's not including customers who have no invoices - and it should. What's broken? SELECT customers.company, count(invoices.id) as invcount

Re: Not finding customers without invoices

2005-11-02 Thread Ian Sales (DBA)
Brian Dunning wrote: I'm trying to find a list of customers including a count of all their invoices, but it's not including customers who have no invoices - and it should. What's broken? SELECT customers.company, count(invoices.id) as invcount FROM customers, invoices WHERE customers.id=

RE: Not finding customers without invoices

2005-11-02 Thread Paul Rhodes
Hi Mike, You'll need to use a LEFT JOIN instead of an INNER JOIN. LEFT JOIN returns mismatches between tables. Try something like: SELECT customers.company, count(invoices.id) as invcount FROM customers LEFT JOIN invoices ON customers.id= invoices.customer_id GROUP BY customers.id ORDER BY

Re: Not finding customers without invoices

2005-11-02 Thread Michael Stassen
[EMAIL PROTECTED] wrote: Brian Dunning [EMAIL PROTECTED] wrote on 02/11/2005 16:22:29: I'm trying to find a list of customers including a count of all their invoices, but it's not including customers who have no invoices - and it should. What's broken? SELECT customers.company,

Re: Not finding customers without invoices

2005-11-02 Thread Brian Dunning
Thanks very much to all of you! Obviously I need to learn more about joins. Appreciate the kick in the pants. :) -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: MySQL show databases - all db shown

2005-11-02 Thread BÁRTHÁZI András
Hi Michael, Thanks for your help. When I migrated from 3.23 to 4.0 version (if I'm remember well), I think I missed to upgrade something, so all my MySQL users are able to see the list of the databases on my server. Currently, the MySQL version is 5.0.15, i ran the mysql database upgrade

Re: MySQL show databases - all db shown

2005-11-02 Thread Michael Stassen
BÁRTHÁZI András wrote: Hi Michael, Thanks for your help. When I migrated from 3.23 to 4.0 version (if I'm remember well), I think I missed to upgrade something, so all my MySQL users are able to see the list of the databases on my server. Currently, the MySQL version is 5.0.15, i ran the

Re: Mysql and JDBC connection time out.

2005-11-02 Thread Hassan Schroeder
Xiaobo Chen wrote: then I tried 'telnet': telnet aaa.bbb.ca or telnet aaa.bbb.ca:3306 both case, it said: Could not connected to the host , on port 23: connect failed. Your second example is invalid -- it should be `aaa.bbb.ca 3306` -- so it's not surprising that didn't work :-) But

Re: Mysql and JDBC connection time out.

2005-11-02 Thread Xiaobo Chen
I already turned off the firewall on the XP machine, but it doesn't work either. I am doubting that in the database on the other Solaris machine, it doesn't allow the connection from the XP machine. I am doubting this way because other application on other Solaris machine can conenction to the

optimize table on live database

2005-11-02 Thread phillip
Hello, I've been looking for information related to best practice on how to OPTIMIZE TABLE table name with out taking the database offline. I understand that it is not good to run an optimize while the database is being used. So what is a good way of handling this? In my particular

Re: Mysql and JDBC connection time out.

2005-11-02 Thread Hassan Schroeder
Xiaobo Chen wrote: I already turned off the firewall on the XP machine, but it doesn't work either. I am doubting that in the database on the other Solaris machine, it doesn't allow the connection from the XP machine. I am doubting this way because other application on other Solaris machine

re: impossible WHERE noticed question

2005-11-02 Thread James Black
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I am trying to figure out why a query sometimes doesn't work, and so I decided to use explain to help me. We are using myslq 4.1.8 at the moment, btw. The only difference between the two queries is I change skywise to rcooksey. mysql explain select

Re: Will SELECT COUNT(*) FROM TABLE ever be cheap on INNODB?

2005-11-02 Thread SGreen
Jigal van Hemert [EMAIL PROTECTED] wrote on 11/02/2005 03:29:14 AM: Shankar Unni wrote: [EMAIL PROTECTED] wrote: If I understand the InnoDB engine correctly, I don't see how they could speed it up unless they start tracking how many records belong to each active version within a

Re: Mysql and JDBC connection time out.

2005-11-02 Thread Xiaobo Chen
I can not use 'telnet aaa.bbb.ca 3306' on XP machine, it will give error like this: Could not open connection to the host, on port 3306. Connection failed. But if I try on other Solaris machines ,it will say something like this: Trying (IP address) Connected to aaa.bbb.ca. Escape character is

Re: Delivery by Demand

2005-11-02 Thread SGreen
Fabricio Mota [EMAIL PROTECTED] wrote on 11/02/2005 10:23:46 AM: Hi all, In the past, I worked as a Oracle user. I've noted that in oracle (or maybe in that configuration), when we request a great amount of data, such like: select * from million_records_table It does not delivers the

Re: Mysql and JDBC connection time out.

2005-11-02 Thread Hassan Schroeder
Xiaobo Chen wrote: I can not use 'telnet aaa.bbb.ca 3306' on XP machine, it will give error like this: Could not open connection to the host, on port 3306. Connection failed. But if I try on other Solaris machines ,it will say something like this: Trying (IP address) Connected to

mysql5.0 DBD::Mysql, INSERT working but SELECT not showing INSERTED contents

2005-11-02 Thread Harry Hoffman
Hi All, I've been trying to figure out what's going on with this for a little bit now. I've just upgraded to MySQL-5 on a system running RHAS-3. Everything seemed to go smoothly for the upgrade, but I'm noticing something I'm calling a bug (although I could be doing something wrong, as I Am

Re: mysql5.0 DBD::Mysql, INSERT working but SELECT not showing INSERTED

2005-11-02 Thread Heikki Tuuri
Harry, you have to commit your transaction. Otherwise it is rolled back when the connection ends. Regards, Heikki Oracle/Innobase - Original Message - From: Harry Hoffman [EMAIL PROTECTED] Newsgroups: mailing.database.myodbc Sent: Wednesday, November 02, 2005 10:48 PM Subject:

Re: Will SELECT COUNT(*) FROM TABLE ever be cheap on INNODB?

2005-11-02 Thread Heikki Tuuri
All, a fast COUNT(*) is in the TODO of InnoDB. But it is relatively difficult to implement without reducing INSERT performance. Regards, Heikki Oracle/Innobase - Original Message - From: Jigal van Hemert [EMAIL PROTECTED] Newsgroups: mailing.database.myodbc Sent: Wednesday,

Re: Re:Re: Re: How Can I upgrade TPC-C performance test result for mysql

2005-11-02 Thread Heikki Tuuri
George, is the utilization of both CPUs only 10 %? How big it is in the test with MS SQL Server? The workload is very much disk-bound if CPU usage is only 10 %. Regards, Heikki Oracle/Innobase - Original Message - From: yanghaifeng [EMAIL PROTECTED] Newsgroups:

encoding blues

2005-11-02 Thread robert rottermann
Hi there, it seems that I managed to put data into a MySQL Database utf8-encoded altough the database is set to use latin1. My question now is, how can I change the records to either latin1 or the db to accept them as utf8. HUGE thanks for any hints robert -- MySQL General Mailing List

dumping a single table that contains fields in multiple character sets

2005-11-02 Thread Michael R. Gile
It has been discussed on this list and on the web site that the mysqldump behavior has changed from 4.0 to 4.1, and now converts all data from the character set of the data to the default-character-set (which is utf8 by default). So my question is: how does one reliably use mysqldump to back

LOAD DATA INFILE and SET REPLACE

2005-11-02 Thread John thegimper
Why cant i get this to work? The name dont get replaced... :P LOAD DATA LOCAL INFILE '/tmp/myfile.txt' INTO TABLE cache FIELDS TERMINATED BY '\t' LINES TERMINATED BY '\n' IGNORE 1 LINES (name) SET name = REPLACE(name, 'Coke', 'Pepsi'); - FREE

LOAD DATA IF?

2005-11-02 Thread John thegimper
Is it possible to specify and IF statement or IGNORE statement when useing LOAD DATA? Example SET price = IF PRICE( 20) THEN IGNORE SET price = IGNORE IF 20 - FREE E-MAIL IN 1 MINUTE! - [EMAIL PROTECTED] - http://www.pc.nu -- MySQL General

mysql server socket problem

2005-11-02 Thread russbucket
Running SuSE10.0, mysql-4.1.13-3 php4-4.4.0-6 apache2-2.0.54-10 Not sure if this is the right place to ask this question? when I try the following link from my browser I get the following error as root or user.

Problem with server socket

2005-11-02 Thread russbucket
Running SuSE10.0, mysql-4.1.13-3 php4-4.4.0-6 apache2-2.0.54-10 Not sure if this is the right place to ask this question? when I try the following link from my browser I get the following error as root or user.

How does this work?

2005-11-02 Thread Brian Dunning
If I say: SELECT * FROM tablename ORDER BY rand() LIMIT 50 Will that give me the first 50 records from the table and randomize their order, or will it give me 50 records randomly from throughout the entire table? -- MySQL General Mailing List For list archives:

Re: How does this work?

2005-11-02 Thread Brian Dunning
On Nov 2, 2005, at 6:03 PM, Matt Babineau wrote: It will do your whole table. Then give you 50 records. But there won't be any duplicates, right? It won't include the same records more than once. I know that sounds stupid, just trying to debug an odd problem. -- MySQL General Mailing

Differnce between fields of int type

2005-11-02 Thread Jerry Swanson
What is the difference between these two fields? Both fields hold number 5, but for some query marked_id field gives result. marked_id | int(11) | | | 0 | id | int(11) | YES | | NULL | Where you can see difference between these fields? TH

Re: How does this work?

2005-11-02 Thread SGreen
Brian Dunning [EMAIL PROTECTED] wrote on 11/02/2005 09:12:39 PM: On Nov 2, 2005, at 6:03 PM, Matt Babineau wrote: It will do your whole table. Then give you 50 records. But there won't be any duplicates, right? It won't include the same records more than once. I know that sounds stupid,

UNICODE and BLOBS

2005-11-02 Thread Steve Johnson
The documentation notes that BLOBS must escape certain characters ( NULL, etc ). Since a blob is not of any character set, how do I know how to prepare a blob for insert? ( which character set / character size to use to test for characters that need to be escaped? Thanks, Steve -- MySQL

Table design question

2005-11-02 Thread Karam Chand
Hi, A very simple question. I have two products at our website and i would like to keep track of how many of each softwares were downloaded daily. I am planning to create the following table: id - auto_incr date_of_download - data product_name - enum value containing the two products Then I

Odd mysqld behavior

2005-11-02 Thread Ligaya Turmelle
System - Windows XP SP2 Version - 5.0.15-nt I just ran into some odd behavior with the mysqld on Windows XP... I am learning about Stored procedures and went to copy and paste an example provided in an article on dev.mysql.com

Re: UNICODE and BLOBS

2005-11-02 Thread Paul DuBois
At 20:15 -0700 11/2/05, Steve Johnson wrote: The documentation notes that BLOBS must escape certain characters ( NULL, etc . What documentation are you referring to? Also, NULL is not a character. Do you mean NUL (byte with value of 00)? I suspect the escaping that you're referring to is

Re: How does this work?

2005-11-02 Thread Paul DuBois
At 17:59 -0800 11/2/05, Brian Dunning wrote: If I say: SELECT * FROM tablename ORDER BY rand() LIMIT 50 Will that give me the first 50 records from the table and randomize their order, or will it give me 50 records randomly from throughout the entire table? LIMIT is applied after ORDER BY.

Re: How does this work?

2005-11-02 Thread Paul DuBois
At 18:12 -0800 11/2/05, Brian Dunning wrote: On Nov 2, 2005, at 6:03 PM, Matt Babineau wrote: It will do your whole table. Then give you 50 records. But there won't be any duplicates, right? It won't include the same records more than once. I know that sounds stupid, just trying to debug

Re: LOAD DATA INFILE and SET REPLACE

2005-11-02 Thread Paul DuBois
At 23:46 +0100 11/2/05, John thegimper wrote: Why cant i get this to work? The name dont get replaced... :P LOAD DATA LOCAL INFILE '/tmp/myfile.txt' INTO TABLE cache FIELDS TERMINATED BY '\t' LINES TERMINATED BY '\n' IGNORE 1 LINES (name) SET name = REPLACE(name, 'Coke', 'Pepsi'); Please file

Re: LOAD DATA IF?

2005-11-02 Thread Paul DuBois
At 1:16 +0100 11/3/05, John thegimper wrote: Is it possible to specify and IF statement or IGNORE statement when useing LOAD DATA? Example SET price = IF PRICE( 20) THEN IGNORE SET price = IGNORE IF 20 What is the semantics of IGNORE? What do you expect to happen? -- Paul DuBois, MySQL

Re: optimize table on live database

2005-11-02 Thread Paul DuBois
At 14:08 -0500 11/2/05, [EMAIL PROTECTED] wrote: Hello, I've been looking for information related to best practice on how to OPTIMIZE TABLE table name with out taking the database offline. I understand that it is not good to run an optimize while the database is being used. So what is a good

Re: MySQL show databases - all db shown

2005-11-02 Thread Paul DuBois
At 12:59 -0500 11/2/05, Michael Stassen wrote: BÁRTHÁZI András wrote: Hi Michael, Thanks for your help. When I migrated from 3.23 to 4.0 version (if I'm remember well), I think I missed to upgrade something, so all my MySQL users are able to see the list of the databases on my server.

Re: Mysql and JDBC connection time out.

2005-11-02 Thread Paul DuBois
At 14:57 -0400 11/2/05, Xiaobo Chen wrote: I already turned off the firewall on the XP machine, but it doesn't work either. I am doubting that in the database on the other Solaris machine, it doesn't allow the connection from the XP machine. I am doubting this way because other application on

Repairing data

2005-11-02 Thread Steffan A. Cline
I ran into a situation where upon importing a client's data I noticed that they had in address field 123 easy street #600. Is there a query I can do to take the field address and truncate the #600 and stick it into the field address2? I am sure it might take some regexp or something but its a bit

RE: Now what's that called?

2005-11-02 Thread Alexander Shaw
Thanks Jimmy - that's the one. -Original Message- From: Jimmy Guerrero [mailto:[EMAIL PROTECTED] Sent: 31 October 2005 19:39 To: 'Alexander Shaw'; mysql@lists.mysql.com Subject: RE: Now what's that called? Hello, Are you think of Eventum? http://dev.mysql.com/downloads/other/eventum/

MySQL Licensing

2005-11-02 Thread George Vanev
Hi Everyone, We have purchased MySQL License a few months ago. We already installed our product in one company. I don't know if we have to buy another license if we want to install it to another customer? And what happens if we want to upgrade to MySQL 5.0.x, for example. Do we need a new

Re: LOAD DATA IF?

2005-11-02 Thread John thegimper
I dont want it to INSERT that row. Sample.txt name;category;price samsung;dvd;60 siemens;mobile;40 none;none;0 Say i dont want to insert rows where category is mobile or price = 0. So in this case only the 'samsung;dvd;60' row would be inserted. Is this possible? Quoting Paul DuBois [EMAIL