Re: data file too big

2004-01-23 Thread Mikhail Entaltsev
I believe that this will flush those logs: mysql reset master; No.. It won't shrink any of InnoDB datafiles: 101Mib_logfile0 101Mib_logfile1 1.9Gibdata1 1.5Gibdata2 It could help if you have some MySQL binary logs: hostname-bin.001 ... hostname-bin.00N Best regards,

Re: Comparing Table IDs

2004-01-23 Thread Mikhail Entaltsev
select t2.* from TableTwo t2 left join TableOne t1 on (t2.ID = t1.ID) where t1.ID is NULL - Original Message - From: Phillip S. Baker [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, January 23, 2004 7:26 AM Subject: Comparing Table IDs Greetings all, I have 3-4 tables of

Re: MySQL listen on one IP only

2004-01-23 Thread Johannes Franken
* Andrew Boothman [EMAIL PROTECTED] [2004-01-23 03:28 +0100]: I've got a box that has several IP addresses assigned to it, but I'd like MySQL to listen on just one of those. You can add bind-address=YOURIPADDRESS to the [mysqld]-section of my.cnf and then restart mysqld. See

Re: anybody used prepared statements in 4.1 succesfully?

2004-01-23 Thread Brian Power
yeah, I tried the new connector. but I'm getting strange results when using a date field, My sql looks like.. Where R_Date ? and R_Date ? and H_ID ? My code looks like... perparedStmt.setDate(1,new java.sql.Date(myDate.getTime())); R_Date looks like... R_Date date Not null It

Mysql does io writes when working with temp tables

2004-01-23 Thread mysqlgen
We are running a portal site using mysql and I have been trying to sqeeze some more performance out of our 4-CPU Linix 2.4.20 intel box. Our content is all read-only and we use in-memory temp tables a lot in our queries. I was watching vmstat as I was issuing some queries and I noticed that almost

Largest OLTP on MySQL?

2004-01-23 Thread Hassan Shaikh
Who has the world's largest OLTP running on MySQL? Appreciate URL containing details. Thanks. Hassan

Order by problem

2004-01-23 Thread Sagar C Nannapaneni
Hi all, I have an ID field in my database...it reads like this ASS1 ASS23 ASS4 ASS10 ASS6 . . . when i'm retrieving the data by taking ORDER BY clause it is sorting like this ASS1 ASS10 ASS23 ASS4 ASS6 means its only sorting by the 4 the character. i want the sorting to be done like the

Re: Order by problem

2004-01-23 Thread Martijn Tonies
Hi, == I have an ID field in my database...it reads like this ASS1 ASS23 ASS4 ASS10 ASS6 when i'm retrieving the data by taking ORDER BY clause it is sorting like this ASS1 ASS10 ASS23 ASS4 ASS6 means its only sorting by the 4 the character. i want the sorting to be done like the following ==

Re: Order by problem

2004-01-23 Thread Benoit St-Jean
Martijn Tonies wrote: Hi, == I have an ID field in my database...it reads like this ASS1 ASS23 ASS4 ASS10 ASS6 when i'm retrieving the data by taking ORDER BY clause it is sorting like this ASS1 ASS10 ASS23 ASS4 ASS6 means its only sorting by the 4 the character. i want the sorting to be done

mysqldump and --opt

2004-01-23 Thread Curley, Thomas
HI all, I am trying to use mysqldump for a new DB: entered: mysqldump --opt -uroot -p dbname dbBak Output mysqldump: Got error: 1044: Access denied for user: '[EMAIL PROTECTED]' to database 'mdirect' when using LOCK TABLES Then I logon as root (without specifing a db) - works

Update through API C

2004-01-23 Thread Salvo Di Fazio
Hi, I've wrote this lines of code mysql_query(mp_cnn, UPDATE pg_info SET x=3, y=5 WHERE pg_id=0); but when I controll my db the record isn't change. Why? -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Update through API C

2004-01-23 Thread NighTiger
Hi, I've wrote this lines of code mysql_query(mp_cnn, UPDATE pg_info SET x=3, y=5 WHERE pg_id=0); but when I controll my db the record isn't change. Why? -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: Order by problem

2004-01-23 Thread Frederic Wenzel
Sagar C Nannapaneni wrote: ASS1 ASS23 ASS4 ASS10 ASS6 . . when i'm retrieving the data by taking ORDER BY clause it is sorting like this ASS1 ASS10 ASS23 ASS4 ASS6 means its only sorting by the 4 the character. No, it's not sorted by the first four characters but it's sorted lexicographically

Stored Procedure and the procs.db column

2004-01-23 Thread Martijn Tonies
Hi all, I'm investigating the Stored Procedures in MySQL 5, and I'm wondering... I've been looking through the procs table in mysql - what does column db do? It stays null when I defined a procedure. And how can you get a list of available procedures? SHOW PROCEDURE doesn't seem to work? With

Re: Permission Problem in OS X

2004-01-23 Thread Brent Baisley
I'm not sure how much help I'll be since I have never had a problem running MySQL on OSX in the two years I have been using it on OSX. First, you should not need to use sudo or the root account for anything you do with MySQL except maybe installing it. Second, I would always specify the account

SELECT statement

2004-01-23 Thread Gary Broughton
I'm attempting to collate a webpage showing results by various football teams in various cup competitions, and am trying to minimise the number of selects as best I can. What I'm trying to get out in one statement is the number of home matches played by Burnley, how many they've won, drawn and

Re: Update through API C

2004-01-23 Thread NighTiger
mmm I've deleted a select before the update function -- SELECT -- // usiamo mysql_real_query al posto di mysql_query xche' la prima e' piu' veloce if (mysql_real_query(mp_cnn, c_query, strlen(c_query)) != 0) return (-1); else { mp_res = mysql_use_result(mp_cnn);

strange unique index behaviour on null values

2004-01-23 Thread mehdi
hi all, I have a very strange problem with some indexes. It is a unique index on a column containing null data. when I do a query like select * from xxx where yyy is null I get only one row (the first) but I know there is more. recentely, this table switched to innodb and we changed the server.

Re: Order by problem

2004-01-23 Thread mos
At 06:49 AM 1/23/2004, Sagar C Nannapaneni wrote: Hi all, I have an ID field in my database...it reads like this ASS1 ASS23 ASS4 ASS10 ASS6 . . . when i'm retrieving the data by taking ORDER BY clause it is sorting like this ASS1 ASS10 ASS23 ASS4 ASS6 means its only sorting by the 4 the

Re: Order by problem

2004-01-23 Thread mos
The following might help, but will certainly be quite slow: SELECT ... ORDER BY ABS(SUBSTRING(field, 4)); A better (and faster) solution will probably be indexing the records with a numeric field, as usual. Fred, Doesn't MySQL always physically sort the rows and not use the index to

Re: anybody used prepared statements in 4.1 succesfully?

2004-01-23 Thread Mark Matthews
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Brian Power wrote: yeah, I tried the new connector. but I'm getting strange results when using a date field, My sql looks like.. Where R_Date ? and R_Date ? and H_ID ? My code looks like... perparedStmt.setDate(1,new

Restoring database doesn't restore all tables

2004-01-23 Thread Danny Smitherman
I could use some help with restoring a backup. I have a backup file, generated using the mysqldump command. This file is approximately one gigabyte in size. I use the following command to restore this backup file: mysql -u root DevDBs New.all.aca When the command is finished executing, I

Odd Rounding?

2004-01-23 Thread Andrew Kuebler
Can anyone explain why: SELECT ROUND(.012345, 5) - .01234 Why doesn't mysql round the 5 up to .01235? How do I get it to round up? I've tried manipulating ceil, floor, round and truncate and I can't seam to find an easy way to do this. I read in the manual that this behavior depends on the C

Re: temporary table in 4.0.17 on Windows W2000 and NT4 from client running xp

2004-01-23 Thread Mikhail Entaltsev
Hi, 1) Try to reproduce the situation with pure myscl client (command-line client). 2) There is no any MySQL parameter that change life time of temporary tables. Only two parameter that defines life time for connection to mysql: - interactive_timeout The number of seconds the server waits for

Removing sub-query

2004-01-23 Thread Michael McTernan
Hi there, I'm using MySQL 4.0.15 on RedHat 9.0. I've got problem for which I can't figure out how to do it efficiently without using a subquery. 4.1.0 isn't really an option since this is going into a stable environment. The table is like this. +--+--++ | revision | id |

RE: Odd Rounding?

2004-01-23 Thread David Brodbeck
-Original Message- From: Andrew Kuebler [mailto:[EMAIL PROTECTED] Can anyone explain why: SELECT ROUND(.012345, 5) - .01234 Why doesn't mysql round the 5 up to .01235? How do I get it to round up? Oftentimes standard practice is to round up if the digit before the 5 is odd,

RE: Odd Rounding?

2004-01-23 Thread Andrew Kuebler
Actually, no, it rounds to .01233. -Original Message- From: Andrew Kuebler [mailto:[EMAIL PROTECTED] Can anyone explain why: SELECT ROUND(.012345, 5) - .01234 Why doesn't mysql round the 5 up to .01235? How do I get it to round up? Oftentimes standard practice is to round up

Re: Odd Rounding?

2004-01-23 Thread Mikhail Entaltsev
Hi, I have email from Georg Richter about this problem in my MySQL archive: From: Georg Richter [EMAIL PROTECTED] Hi, From http://www.mysql.com/doc/en/Mathematical_functions.html: Note that the behaviour of ROUND() when the argument is half way between two

Re: Odd Rounding?

2004-01-23 Thread Keith C. Ivey
On 23 Jan 2004 at 12:13, Andrew Kuebler wrote: Can anyone explain why: SELECT ROUND(.012345, 5) - .01234 Why doesn't mysql round the 5 up to .01235? How do I get it to round up? I've tried manipulating ceil, floor, round and truncate and I can't seam to find an easy way to do this.

Re: stored proc containing subquery crashes mysqld-nt.exe

2004-01-23 Thread Tobias Asplund
On Fri, 23 Jan 2004, Rob Kemmer wrote: Hi, MySQL Team! I've downloaded and successfully installed v5.0 win2k, and am happily using stored procs, but seem to be encountering problems with subqueries in stored procs. When I run a stored proc containing a subquery, the first pass works, but

RE: Odd Rounding?

2004-01-23 Thread Matt Lynch
Hi Andrew Consider using NUMERIC or DECIMAL to maintain precision. From the manual: The NUMERIC and DECIMAL types are implemented as the same type by MySQL, as permitted by the SQL-92 standard. They are used for values for which it is important to preserve exact precision, for example with

Bind bind bind

2004-01-23 Thread Bcskai Gerg
Hi , Is everybody have ever made bind to column and for where coluse in one ? select colname from table where wcol=? colname is binded to one attay and the ? is binded to an other... My server (4.1) is dump all the time) Thnaks Gerg -- MySQL General Mailing List For list archives:

CREATE TABLE

2004-01-23 Thread Jeremiah Jacks
Help! I am totally stumped. Why won't this execute successfully? CREATE TABLE user_shipping_info ( user_id INT UNSIGNED NOT NULL, as_acct VARCHAR(8) NOT NULL, email_address VARCHAR(40), company VARCHAR(50), phone_number VARCHAR(15), fax_number

question regarding MAX() and INSERT

2004-01-23 Thread stairwaymail-mysql
I would like to do the following: INSERT INTO tt (a,i) VALUES ('text',MAX(i)+1); This doesn't work b/c MAX() isn't allowed here. Does anyone know how I can still achieve this with ONE query? Thanks. Dan -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To

Re: anybody used prepared statements in 4.1 succesfully?

2004-01-23 Thread Brian Power
I get same the problem with any row. this statement returns 1 row with the stable build but returns 0 when using the nightly one. Select P_ID,R_Date from performances Where R_Date = ? and P_ID = 171576 Resultset with stable build looks like.. P_IDR_Date 171576 2002-02-02 Column

MySQL replication performance questions

2004-01-23 Thread Rajarshi Chaudhuri
Hi, I have gone through the MySQL documentation and FAQs. But still I have a few questions - 1. Is there a performance comparison between MySQL Pro and MaxDB? Is MaxDB much better than MySQL? 2. Does MaxDB also has a C/C++ interface? 3. Is replication supported by

Re: data file too big

2004-01-23 Thread Asif Iqbal
On Fri, 23 Jan 2004, Mikhail Entaltsev wrote: Date: Fri, 23 Jan 2004 09:34:52 +0100 From: Mikhail Entaltsev [EMAIL PROTECTED] To: Gregory Newby [EMAIL PROTECTED], Asif Iqbal [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: data file too big I believe that this will flush those logs:

Re: CREATE TABLE

2004-01-23 Thread Aleksandar Bradaric
Hi, Error: ERROR 1005: Can't create table './tamiyausa/user_shipping_info.frm' (errno: 150) C:\mysql\binperror 150 Error code 150: Unknown error 150 = Foreign key constraint is incorrectly formed Look like your foreign keys are not properly defined. Do both tables exist? And the fields

JOIN, GROUP BY INDEX

2004-01-23 Thread Hsiu-Hui Tseng
Hi, I have some question on JOIN and INDEX usage on GROUP BY. Hope you can help me. thanks! 1. If there is any performance differenct for join from a small table to a big table and join from a big table to a small table? 2. If index on group by column order, will it have any query performance

Release 4.1.1

2004-01-23 Thread Sharma, Saurabh
Hi Matt Can you let me know when is the version 4.1.1 expected to release (complete)? If its not confidential and you know something about it. And I could use mysql with websphere studio 5.1 and its running fine Thanks and Regards Saurabh Sharma Fidelity Brokerage Technology ' 617-563-2662

(Left) Join and Union

2004-01-23 Thread Chris Boget
Can you UNION 2 queries and use the result to JOIN with another table? (SELECT tableA.name, tableC.company FROM tableA) UNION (SELECT tableB.name FROM tableB) LEFT JOIN tableC ON tableA.name = tableC.name; This doesn't work. But I don't know if it isn't working because I have the wrong syntax

Installation Query

2004-01-23 Thread multimedia-fan
Greetings. If these questions were answered before I apologize in advance. I am trying to install MySQL on a new server that I got. Server is Red Hat 7.2 (not my choice), Dual P4 Xeon 2.8, 6 GB, 36GB Raid 5. Few questions I have: 1. What installation is recommended on such system. Binary,

CASE after the WHERE

2004-01-23 Thread Chris Boget
It used to be that I used SQL for basic stuff and did the rest in my code. Now I'm starting to learn some of the cooler features of SQL and I'm trying to figure out what I can move into a query and what I'll still need my code to do thing. In trying this conversion, I've run across something

If Else statement

2004-01-23 Thread Mike Tuller
I am trying write a shell script to check to see if a record exists and if it does, update information, and if it doesn't insert information. Is there a way to do an if else statement in MySql? I'm stuck on how to do this. I don't want to write it in perl. Mike -- MySQL General Mailing List

[BUG] SHOW INDEX bug for fulltext indexes in MySQl 4.0.17

2004-01-23 Thread Dave Rolsky
Here's a recipe: create table foo (foo text, bar text); create fulltext index foo on foo (foo, bar); mysql show index from foo; +---++--+--+-+---+-+--++--++-+ | Table | Non_unique |

Replication Madness

2004-01-23 Thread DePhillips, Michael P
Hi Folks Every now and again one of my slaves try's to connect to its master via its ip address as opposed to its dns name. This causes a problem because the ip address does not have credentials on the master, therefore, connection refused -replication ends -databases out of sync- angry

Does the MySQL packet limitation still exist?

2004-01-23 Thread Aaron P. Lopez
Hello, Does the packet limitation of 16MB still exist for the client/server protocol in MySQL? I am trying to upload files greater than 16MB from a php/apache interface, with no success. Files 15MB are saved just fine into the database. The datatype on the field is longblob. From the mysql cli

Select help

2004-01-23 Thread Mike Mapsnac
Hello I want to select from the table sum of logins for each day. For example: Date Logins 2004-01-22 10 2004-01-23 12 Any ideas if such select is possible? +--+--+ | Field| Type |

Embedded mySQL

2004-01-23 Thread Rajarshi Chaudhuri
Hello, For embedded mySQL server there is a restriction that You cannot set this up as a master or a slave (no replication). To support replication using embedded mySQL is there any steps that I can follow (e.g., by modifying portion of the source code etc.)? Pls. advise Regds,

Re: Replication Madness

2004-01-23 Thread Mikael Fridh
I'm not sure I quite follow you here. I think you mean that when the slave connects to the master, sometimes the master does not resolve the address the slave has - thus failing because you don't have grants for the slave's IP address.. Generally I think it's a bad idea to be dependent on a dns

Postponing Integrity Checking...

2004-01-23 Thread Matthew Bogosian
I searched the archives and the manual for an answer to this, but I haven't found an answer. I have several InnoDB tables: CREATE TABLE test_parent ( id INTEGER NOT NULL PRIMARY KEY ) TYPE = INNODB; CREATE TABLE test_child ( id INTEGER NOT NULL PRIMARY KEY,

Re: Select help

2004-01-23 Thread Aleksandar Bradaric
Hi, I want to select from the table sum of logins for each day. Would this help: mysql select date_format(your_date_column, %Y-%m-%d), count(*) - from your_table - group by date_format(your_date_column, %Y-%m-%d); Take care, Aleksandar -- MySQL General Mailing List For list

Re: Select help

2004-01-23 Thread Mikael Fridh
- Original Message - From: Mike Mapsnac [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, January 23, 2004 11:42 PM Subject: Select help Hello I want to select from the table sum of logins for each day. Here's one way to do it. SELECT SUBSTRING(last_login, 1, 10) AS day,

In replication, can you have a slave act as a master to a different slave?

2004-01-23 Thread Bill Thomason
Here is my scenario: I have 3 linux boxes - 2 with mysql 4.0.16 and 1 with 4.0.17. I have a 4.0.16 master (sys1) replicating a database (db1) that is roughly 1.5GB to a slave system (sys2) running 4.0.17. For the sake of a formal representation I'll say that (sys1,db1) -- (sys2,db1)

Fulltext search

2004-01-23 Thread Sidar LC.
How can I implement fulltext search engine on InnoDB and MySQL 5. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

ResultSet

2004-01-23 Thread Sidar LC.
Can stored procedure return a result set for my java program? -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: Postponing Integrity Checking...

2004-01-23 Thread Paul DuBois
At 15:52 -0800 1/23/04, Matthew Bogosian wrote: I searched the archives and the manual for an answer to this, but I haven't found an answer. I have several InnoDB tables: CREATE TABLE test_parent ( id INTEGER NOT NULL PRIMARY KEY ) TYPE = INNODB; CREATE TABLE test_child

Re: Fulltext search

2004-01-23 Thread Paul DuBois
At 18:34 -0600 1/23/04, Sidar LC. wrote: How can I implement fulltext search engine on InnoDB and MySQL 5. You can't. FULLTEXT indexes are supported only for MyISAM tables. http://www.mysql.com/doc/en/Fulltext_Search.html -- Paul DuBois, MySQL Documentation Team Madison, Wisconsin, USA MySQL

optimizer: GROUP BY unnessesary slow using ANSI notation for redundant group by's.

2004-01-23 Thread Stefan Traby
Hi ! For my forum system, I use the following query to generate the main-overview: (using 4.0.16-log) select f1.id as BoardId, f1.name as Board, f1.more as BoardDesc, f2.id as AreaId, f2.name as Area, f2.more as AreaDesc, count(distinct f3.id) as

RE: Fulltext search

2004-01-23 Thread electroteque
when when when will it be available for innodb ? -Original Message- From: Paul DuBois [mailto:[EMAIL PROTECTED] Sent: Saturday, January 24, 2004 11:43 AM To: Sidar LC.; [EMAIL PROTECTED] Subject: Re: Fulltext search At 18:34 -0600 1/23/04, Sidar LC. wrote: How can I implement fulltext

RE: Replication Madness

2004-01-23 Thread DePhillips, Michael P
Thanks for the reply. I agree with your first solution but I feel this is very limiting. I would like be able to connect with a dns name with assurance that it will succeed. I think this is a reasonable feature to request. I have, for example, a DNS Round Robin used for load sharing. It is

query performance

2004-01-23 Thread Larry Brown
I have a db that had some 20,000 records or so in it. I have a query to find out how many jobs have been input during the current day. To add them I ran the following query... select count(idnumber) from maintable where inputdatetime '$date 00:00:00' and client='smith' $date is the current

Re: Postponing Integrity Checking...

2004-01-23 Thread Matthew Bogosian
Although this does the trick (kind of), this just turns off integrity checking for that session, right? When I turn it back on, any statement that would have failed but didn't is still in a failed state. In other words, I could screw up and so something like: SET FOREIGN_KEY_CHECKS = 0;

Need help with a SELECT statement across 3 tables

2004-01-23 Thread Brandon Ewing
Isn't it great when you've got this pretty picture in your head about what you want SQL to do for you, but aren't sure how to write it down? I've got 3 tables, they are: server - a table that tracks all of our servers, including os, where they are, access details, etc update_track - a table

Re: Postponing Integrity Checking...

2004-01-23 Thread Paul DuBois
At 17:32 -0800 1/23/04, Matthew Bogosian wrote: Although this does the trick (kind of), this just turns off integrity checking for that session, right? When I turn it back on, any statement that would have failed but didn't is still in a failed state. In other Right. You're not supposed to use it

Re: Postponing Integrity Checking...

2004-01-23 Thread Matthew Bogosian
On Fri, 23 Jan 2004, Paul DuBois wrote: At 17:32 -0800 1/23/04, Matthew Bogosian wrote: Although this does the trick (kind of), this just turns off integrity checking for that session, right? When I turn it back on, any statement that would have failed but didn't is still in a failed state. In

Re: query performance

2004-01-23 Thread mos
At 07:10 PM 1/23/2004, Larry Brown wrote: I have a db that had some 20,000 records or so in it. I have a query to find out how many jobs have been input during the current day. To add them I ran the following query... select count(idnumber) from maintable where inputdatetime '$date 00:00:00'