Re: [SPAM]Re: e: Select distinct year from unix timestamp

2004-05-17 Thread John Fawcett
From: Paul DuBois At 17:50 -0500 5/16/04, Paul DuBois wrote: Not a huge difference, I guess. But I suppose if a query that uses one or the other of these expressions processes a large number of rows, it might pay to run some comparative testing. Another interesting point is whether one

COUNT

2004-05-17 Thread Gustavo Andrade
select count(distinct membros.ID) as total_membros, count(distinct replays.ID) as total_replays, count(distinct downloads.ID) as total_downloads from membros,replays,downloads; if one of the tables have 0 records all the counts will turn to 0 the count works only if all the tables have records

Re: COUNT

2004-05-17 Thread John Fawcett
From: Gustavo Andrade select count(distinct membros.ID) as total_membros, count(distinct replays.ID) as total_replays, count(distinct downloads.ID) as total_downloads from membros,replays,downloads; Why join three tables to count the records in each one? I'm sure the performance will be poor

Select on datetime

2004-05-17 Thread Ashley M. Kirchner
I have a table that has a datetime field that gets set every time data gets entered in the table (for example 2004-05-16 19:08:59). How can I select all entries that were entered one year ago today. And, how can I select entries that were entered one year ago today +7 days. So, if

Re: COUNT

2004-05-17 Thread Dan Nelson
In the last episode (May 17), Gustavo Andrade said: select count(distinct membros.ID) as total_membros, count(distinct replays.ID) as total_replays, count(distinct downloads.ID) as total_downloads from membros,replays,downloads; if one of the tables have 0 records all the counts will turn

RE: C Client compil error

2004-05-17 Thread Carl Fretwell
try... #include windows.h #include mysql.h int main(void) { MYSQL *database; database = mysql_init(database); return(0); } - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, April 26, 2004 8:25 AM Subject: C Client compil error Hello

Re: Connections repeatedly dropped

2004-05-17 Thread Tim Cutts
Hmm, well, I seem to have resolved the problem, and it looks like it was not MySQL's fault. I updated the OS to the current testing release of Debian, which included a C library update. Following a reboot, the code worked perfectly. Looks like this was an Itanium2 C library bug, most

Re: Select on datetime

2004-05-17 Thread Roger Baklund
* Ashley M. Kirchner I have a table that has a datetime field that gets set every time data gets entered in the table (for example 2004-05-16 19:08:59). How can I select all entries that were entered one year ago today. And, how can I select entries that were entered one year ago today

Re: bug?

2004-05-17 Thread Egor Egorov
Anders Gjermshus [EMAIL PROTECTED] wrote: In the mysql documentation it stands: max_user_connections The maximum number of simultaneous connections allowed to any given MySQL account. A value of 0 means ``no limit.'' This variable was added in MySQL 3.23.34. In my configuration

Re: access problem

2004-05-17 Thread Egor Egorov
Jianping Zhu [EMAIL PROTECTED] wrote: I have database Zope I run following command and get error myql grant all on Zope.* to [EMAIL PROTECTED]; ERROR 1044: Access denied for user: '[EMAIL PROTECTED]' to database 'Zope' mysql As a consequece I try to access Zope from a web, it also

Super-smack compile errors

2004-05-17 Thread JG
On Intel - FreeBSD 4.9 STABLE - using MySQL Ver 11.18 Distrib 3.23.55, for portbld-freebsd4.7 (i386) On AMD64 - FreeBSD 5.2 CURRENT - using Mysql Ver 14.3 Distrib 4.1.1-alpha, for portbld-freebsd5.2.1 (amd64) I get the same compile error: # make make all-recursive Making all in src c++

Re: unexpected create table as lock issue

2004-05-17 Thread Heikki Tuuri
Justin, - Alkuperäinen viesti - Lähettäjä: Justin Swanhart [EMAIL PROTECTED] Vastaanottaja: Sasha Pachev [EMAIL PROTECTED] Kopio: [EMAIL PROTECTED]; [EMAIL PROTECTED] Lähetetty: Friday, May 14, 2004 9:22 PM Aihe: Re: unexpected create table as lock issue --- Sasha Pachev [EMAIL

1-Way or 2-Way Replication?

2004-05-17 Thread Robinson, Eric
Hi, Our healthcare organization has 2 geographical locations which I will call corporate_office and satellite_office. Currently, we run a medical application from a MySQL server at the corporate_office. Users at the satellite_office use the same server. Speed across the WAN is acceptable.

Re: 1-Way or 2-Way Replication?

2004-05-17 Thread Alec . Cawley
Robinson, Eric [EMAIL PROTECTED] wrote on 17/05/2004 13:40:10: We want to set up replication to guard against loss of WAN connectivity. All workstations should continue to use the MySQL server at the corporate_office unless the WAN link goes down. Then users at the satellite_office

Re: How big is big?

2004-05-17 Thread Lorenzo Luconi Trombacchi
KingKarsten wrote: Aloha! I want to create a date table which will get about 2 thousand entries per year and should easyly handle 10 years, which means about 20.000 entries. Is that realistic? Or shall I reorganize my database? Where is the border of too many entries and MySQL gets slow? Thanks

RE: 1-Way or 2-Way Replication?

2004-05-17 Thread Robinson, Eric
there is no mechanism for propagating slave changes from the slave back up to the master... synchronization occurs *only* from master to slave (hence the terminology). Then why do they call it 2-way replication? Is there such a thing as master-to-master? -- MySQL General Mailing List For

relay_log_space_limit-entry kills replication

2004-05-17 Thread Lutz Maibach
Hello, trying to save hd-space we configured a 4.0.17-Replicationclient in my.cnf as shown below: max_relay_log_size= 250M relay_log_space_limit = 1000M After restarting Mysql a new relay_log was created correctly every 250M, so we thought everything was working well. The disaster occured

mysqld crash due to innoDB problems?

2004-05-17 Thread Rusty W. Shanklin
DESCRIPTION: Mysqld appears to crash every few days or so. The .err file shows that it may be an innodb problem. (See below for detail) How-To-Repeat I am not able to repeat the problem. The query that runs when the mysqld server dies, is automatically re-run when the server comes back

RE: 1-Way or 2-Way Replication?

2004-05-17 Thread Alec . Cawley
Robinson, Eric [EMAIL PROTECTED] wrote on 17/05/2004 15:48:12: there is no mechanism for propagating slave changes from the slave back up to the master... synchronization occurs *only* from master to slave (hence the terminology). Then why do they call it 2-way replication? Is there

RE: 1-Way or 2-Way Replication?

2004-05-17 Thread Robinson, Eric
Circular replication is possible... A-B-C-A Thanks, but that still does not answer the question... why do they call it 2-way replication? That implies two machines, not several. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:

RE: 1-Way or 2-Way Replication?

2004-05-17 Thread Robinson, Eric
It is there. Look for two-way :-) I don't think they do... A search of the documentation for 2-way yields nothing. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Indexes ignored when using SELECT foo FROM a, b?

2004-05-17 Thread Eamon Daly
I have a table structured like so: CREATE TABLE `foo_equivalency` ( `foo_id` smallint(6) NOT NULL default '0', `type` enum('a_id','b_id','foo_id') NOT NULL default 'foo_id', `id` smallint(6) NOT NULL default '0', KEY `foo_id` (`foo_id`), KEY `type` (`type`) ) TYPE=MyISAM I'm using a

RE: 1-Way or 2-Way Replication?

2004-05-17 Thread Ditto kolankanny
Hi all, In this A-B-C-A setup A is master and B is slave. in the same time B is master and C is slave. and C is master and A is slave. that means All are master and slave. then why don`t A---BA in this same thinking i tried it and its working. for the time being it in a test platform

RE: 1-Way or 2-Way Replication?

2004-05-17 Thread Robinson, Eric
That is my question exactly. -Original Message- From: Ditto kolankanny [mailto:[EMAIL PROTECTED] Sent: Monday, May 17, 2004 8:40 AM To: Robinson, Eric; [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: RE: 1-Way or 2-Way Replication? Hi all, In this A-B-C-A setup A is master and B is

Re: 1-Way or 2-Way Replication?

2004-05-17 Thread Jeff Smelser
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Monday 17 May 2004 10:40 am, Ditto kolankanny wrote: Hi all, In this A-B-C-A setup A is master and B is slave. in the same time B is master and C is slave. and C is master and A is slave. that means All are master and slave. then why

RE: 1-Way or 2-Way Replication?

2004-05-17 Thread Alec . Cawley
Robinson, Eric [EMAIL PROTECTED] wrote on 17/05/2004 16:29:34: It is there. Look for two-way :-) I don't think they do... A search of the documentation for 2-way yields nothing. I presume you mean http://dev.mysql.com/doc/mysql/en/Replication_FAQ.html That is the simplest example of

RE: Indexes ignored when using SELECT foo FROM a, b?

2004-05-17 Thread Dathan Vance Pattishall
Use force index to force the index lookup on foo_id If that doesn't work try analyze table on that table and run the explain again. The OR will not allow you to use a compound index but the primary key or 1st key-foo_id should be used. I just noticed that your table definition foo_id is not

Re: Need Table Joins Example

2004-05-17 Thread Garth Webb
On Sat, 2004-05-15 at 04:04, David Blomstrom wrote: --- Jigal van Hemert [EMAIL PROTECTED] wrote: If you need to know how to display the resulting record sets, example 1 on: http://www.php.net/manual/en/ref.mysql.php gives you a complete piece of code to print out the resulting

Re: [Setup language MySQL ??]

2004-05-17 Thread Egor Egorov
richard [EMAIL PROTECTED] wrote: Is it possible to setup MySQL in french ? For example, when I write and execute SELECT monthname(mydate) from mytable, it return the month name of mydate (march, april, may, ). I'd like it return mars, avril, mai,. = the month is french. So, is

Enforcing integrity of Foreign Keys

2004-05-17 Thread Zachary Agatstein
A very simple question: If I have a table A with PRIMARY KEY K, and table B which has a column C defined as a FOREIGN KEY F referencing table A.K, then, I would expect, C can only take a value from those already existing in table A column K. So, let's assume, for simplicity's sake, table A has

Re: Counting multiple tables

2004-05-17 Thread Egor Egorov
Dathan Vance Pattishall [EMAIL PROTECTED] wrote: SHOW TABLE STATUS to get the count of each table, then your application = adds the number in the Rows field from each of the tables returned. For InnoDB tables SHOW TABLE STATUS returns approximate row count. -Original Message-

Re: Enforcing integrity of Foreign Keys

2004-05-17 Thread Michael Stassen
Which kind of tables do you have? InnoDB tables enforce foreign key integrity, MyISAM tables do not. From the manual http://dev.mysql.com/doc/mysql/en/CREATE_TABLE.html: | In MySQL 3.23.44 or later, InnoDB tables support checking of foreign key | constraints. ... For other storage engines,

Re: Enforcing integrity of Foreign Keys

2004-05-17 Thread Victoria Reznichenko
Zachary Agatstein [EMAIL PROTECTED] wrote: A very simple question: If I have a table A with PRIMARY KEY K, and table B which has a column C defined as a FOREIGN KEY F referencing table A.K, then, I would expect, C can only take a value from those already existing in table A column K.

RE: 1-Way or 2-Way Replication?

2004-05-17 Thread SGreen
Robinson, Eric: 5/17/04 1048 there is no mechanism for propagating slave changes from the slave back up to the master... synchronization occurs *only* from master to slave (hence the terminology). Then why do they call it 2-way replication? Is there such a thing as master-to-master? /Robinson,

RE: 1-Way or 2-Way Replication?

2004-05-17 Thread Robinson, Eric
Shawn, your answer is excellent, and I now understand why replication is a touchy issue. But now I am worried that I will not be able to accomplish what I had hoped. I want to have a server at my corporate office and a server at my branch office. Most of the time, all users at both locations

Re: 1-Way or 2-Way Replication?

2004-05-17 Thread Luis R. Rodriguez
On Mon, May 17, 2004 at 02:11:49PM -0400, [EMAIL PROTECTED] wrote: MySQL does not support distributed locking (yet). -- Snip -- MySQL will have it in a future release but it's ready for an initial alpha test, yet. It is available in alpha releases? Someone is working on this already? What

Select Dates and then select news with that dates

2004-05-17 Thread T. H. Grejc
Here is what I'm trying to achieve: *10.04.2004.* - news 1 - news 2 - news 3 *14.04.2004.* - news 4 *15.04.2004.* - news 5 What method will be the best. Do I have to use two queries. One to select (5) last dates, and then loop throug that results and select news. select dates while (dates)

INSERT table1 SET col1 = table2.col1

2004-05-17 Thread P. Hill
Why when there is a figurae, figurae2 table does the follow give an error? INSERT INTO figurae2 SET id = figurae.id; The error is: ERROR 1109 at line 35: Unknown table 'figurae' in field list Line 35 is the Insert line shown. There are no following lines in the file. I cut and pasted figurae from

Re: INSERT table1 SET col1 = table2.col1

2004-05-17 Thread Victoria Reznichenko
P. Hill [EMAIL PROTECTED] wrote: Why when there is a figurae, figurae2 table does the follow give an error? INSERT INTO figurae2 SET id = figurae.id; The error is: ERROR 1109 at line 35: Unknown table 'figurae' in field list Line 35 is the Insert line shown. There are no following lines

Backups with version 4.1

2004-05-17 Thread Mauricio Pellegrini
Hi I'm using, Mysql version 4.1.1 with InnoDB under SuSE linux 8.2 I don't know if this is the right place to ask. If not please point me in the right direction. I'm performing nightly backups of the datadir. So my backups include a database and the Mysql databases themselves ( also I think

Re: Backups with version 4.1

2004-05-17 Thread William R. Mussatto
Mauricio Pellegrini said: Hi I'm using, Mysql version 4.1.1 with InnoDB under SuSE linux 8.2 I don't know if this is the right place to ask. If not please point me in the right direction. I'm performing nightly backups of the datadir. So my backups include a database and the Mysql databases

RE: 1-Way or 2-Way Replication?

2004-05-17 Thread SGreen
Eric, you are in the same boat I am in. I also have satellite offices across WAN links that should keep functioning even if the WAN is down. My , yet to be tested due to office politics, workaround design was to have each office (satellite and main) have their own mini-master that replicated

MySQL Privileges

2004-05-17 Thread aleksandar . mihajlovic
I am running MySQL 4.1.1-alpha-standard on RH Linux 9. I've found strange problem with privileges: mysql grant reload on *.* to 'fabackup'@'localhost'; Query OK, 0 rows affected (0.00 sec) mysql grant create, insert, drop on mysql.ibbackup_binlog_marker to 'fabackup'@localhost; Query OK, 0 rows

Re: 1-Way or 2-Way Replication?

2004-05-17 Thread SGreen
SORRY My typo--- it is NOT ready for any kind of testing. At least I have not heard of anything Shawn Green Database Administrator Unimin Corporation - Spruce Pine

Re: Select Dates and then select news with that dates

2004-05-17 Thread SGreen
You have several ways to handle this problem. Most of them are based in your PHP (of which I am not an expert) however I can get you all of the articles for the last 5 days in a single query: select format(datefield, '%d.%m.%Y.'), newsfield from newstable where datefield = (DATE_FORMAT(NOW() -

Re: INSERT table1 SET col1 = table2.col1

2004-05-17 Thread P. Hill
Victoria Reznichenko wrote: P. Hill [EMAIL PROTECTED] wrote: Why when there is a figurae, figurae2 table does the follow give an error? INSERT INTO figurae2 SET id = figurae.id; The error is: ERROR 1109 at line 35: Unknown table 'figurae' in field list Look at INSERT .. SELECT statement:

info

2004-05-17 Thread info . autoresponder
We have received your email, thank you. Normally it is our goal to respond to all of our email within 24 hours. Please insure that you have gone to our FAQ's page at: http://www.affordable-fuel-injection.com/fuel-injection-questions.htm for basic information on fuel injection. -- MySQL

Re: 1-Way or 2-Way Replication?

2004-05-17 Thread Jochem van Dieten
[EMAIL PROTECTED] wrote: Eric, you are in the same boat I am in. I also have satellite offices across WAN links that should keep functioning even if the WAN is down. My , yet to be tested due to office politics, workaround design was to have each office (satellite and main) have their own

Re: 1-Way or 2-Way Replication?

2004-05-17 Thread Luis R. Rodriguez
On Mon, May 17, 2004 at 04:07:53PM -0400, [EMAIL PROTECTED] wrote: SORRY My typo--- it is NOT ready for any kind of testing. At least I have not heard of anything Heh :) But do you know if anyone is already working on it? Luis -- GnuPG Key fingerprint = 113F B290 C6D2

Re: Indexes ignored when using SELECT foo FROM a, b?

2004-05-17 Thread Eamon Daly
Another reader pointed out that I actually want to group the ORs together, which allows the query to use the index on foo_id. I've also been experimenting with multiple SELECTs and UNIONs like so: SELECT bar.foo_id, foo_equivalency.foo_id FROM bar JOIN foo_equivalency ON id = bar.a_id WHERE

Re: INSERT table1 SET col1 = table2.col1

2004-05-17 Thread Garth Webb
On Mon, 2004-05-17 at 13:37, P. Hill wrote: Victoria Reznichenko wrote: P. Hill [EMAIL PROTECTED] wrote: Why when there is a figurae, figurae2 table does the follow give an error? INSERT INTO figurae2 SET id = figurae.id; The error is: ERROR 1109 at line 35: Unknown table 'figurae' in

Re: WHERE pk1 AND pk2 returns 0 records

2004-05-17 Thread Daniel Clark
Possibly two rows? Can you change the where clause? WHERE CartID=999 OR ProdID=333 I have a simple query: SELECT * FROM cart WHERE CartID=999 AND ProdID=333 The primary key is made of both CartID and ProdID, both integers. The query will not return the record in question This returns

Re: INSERT table1 SET col1 = table2.col1

2004-05-17 Thread P. Hill
Garth Webb wrote: I'm not asking for an alternative way to do it; I'm asking what is wrong with what I did? It looks like you want to copy over several or all values from a second table. The INSERT .. SELECT syntax isn't an alternate way, its the only way. Okay, thanks for the clarification. I

WHERE pk1 AND pk2 returns 0 records

2004-05-17 Thread Brian Shearer
I have a simple query: SELECT * FROM cart WHERE CartID=999 AND ProdID=333 The primary key is made of both CartID and ProdID, both integers. The query will not return the record in question This returns the row: SELECT * FROM cart WHERE CartID=999 And this returns the same row: SELECT * FROM

replication::redundancy

2004-05-17 Thread farr
In the replication FAQ regarding redundancy/high availability. Its example looks as if it could be ... wrong. : http://dev.mysql.com/doc/mysql/en/Replication_FAQ.html The basic method is to use one of the slaves as the master in the case where the master goes down. The potential problem that

Large inserts, chunking and Concat

2004-05-17 Thread John Ling
Hello, realizing that there is a max_allowed_packet setting that limits the size of the insert statement, is there a way around it by chunking the query? In particular, if the query is to insert a large text or blob, can I simply concatenate smaller pieces of the data in succession using the

InnoDB case sensitive collation

2004-05-17 Thread Matt Mastrangelo
How can an InnoDB table be created with case sensitive collation? The example below creates two identical tables, one MyISAM and the other InnoDB. The InnoDB fails when inserting primary keys that differ in case only. What am I doing wrong? Thanks. drop database test; create database test

Get Involved

2004-05-17 Thread Winner H Manurung
Hello all, I have two simple question: When is the time for 4.1 beta/gamma rollout? I would like to use my spare time to get involved in MySQL development. How? I know it is diffcult, but i am willing to give it a try. I would like to help develop/testing/documenting the major parts like: 1.

Problem with INTO OUTFILE

2004-05-17 Thread Jochen Kaechelin
Can somebody tell me what's wrong with this query: $sql=SELECT * INTO OUTFILE 'infoanforderung/$nameliste' FIELDS TERMINATED BY ';' LINES TERMINATED BY '\n' FROM net_contact WHERE nachname='Erbel'; I get no results! Without INTO OUTFILE everything works fine! -- Jochen Kaechelin -- MySQL

Output File

2004-05-17 Thread Chris Stevenson
I'm trying to run a stored query with the results sent to an excel file. Each time I try I get an Outfile Disabled message. Any suggestions? I'm running Winxp. msql source interests.sql c:\test.xls = Outfile Disabled. Thank you.

mysqld sock fights between two servers

2004-05-17 Thread Greg Willits
I suspect this is more of a unix question (OS X 10.3.3) than a mysql question, but hopefully someone will tolerate it. I have two mysql apps running on the same machine. A mysql 3.23.x on port 14551 (which is integral to the Lasso middleware server), and a separate mysql 4.0.x on 3306. They

Re: Counting multiple tables

2004-05-17 Thread Sasha Pachev
Gustavo Andrade wrote: I want to know if its possible to count the total records of multiple tables: Example: I have 3 tables. I want to know the total records of each table using only 1 query. Is that possible? It is actually possible with 4.0, although rather convoluted: (select count(*) from

Re: Counting multiple tables

2004-05-17 Thread Paul DuBois
At 21:17 -0600 5/17/04, Sasha Pachev wrote: Gustavo Andrade wrote: I want to know if its possible to count the total records of multiple tables: Example: I have 3 tables. I want to know the total records of each table using only 1 query. Is that possible? It is actually possible with 4.0,

Show table status query

2004-05-17 Thread Andrew Barnes
Hi When I run the SHOW TABLE STATUS query against a database with 4 tables, 3 of the tables come have the correct row count, but 1 table changes the No of rows every time I run the query. The correct row count for this table is 313, but the query returns anywhere from 97 to 574. I am running

Re: Comments/questions on High Performance MySQL

2004-05-17 Thread Sasha Pachev
Hans-Peter Grimm wrote: Hi, I just finished reading High Performance MySQL. Congratulations to the authors, it's a great book and I enjoyed reading it. Would be great if someone now started to write MySQL Internals ;-) I actually do have a fairly long chapter on that subject in MySQL Enterprise

super-smack on FreeBSD?

2004-05-17 Thread JG
Has ANYONE been able to get super-smack-1.2 to compile as-is on FreeBSD? ./configure --with-mysql make make install Without errors? Anyone? -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: Counting multiple tables

2004-05-17 Thread Michael Stassen
Sasha Pachev wrote: Gustavo Andrade wrote: I want to know if its possible to count the total records of multiple tables: Example: I have 3 tables. I want to know the total records of each table using only 1 query. Is that possible? It is actually possible with 4.0, although rather convoluted:

Re: Show table status query

2004-05-17 Thread Daniel Kasak
Andrew Barnes wrote: Hi When I run the SHOW TABLE STATUS query against a database with 4 tables, 3 of the tables come have the correct row count, but 1 table changes the No of rows every time I run the query. The correct row count for this table is 313, but the query returns anywhere from 97 to

using host name option

2004-05-17 Thread Timothy Waters
I am having trouble using the -h option in my setup of MySQL. If I use '-h localhost' in the command it will work, but my hostname on my box is tux. If i use '-h tux' for the hostname option, it will not work. I double checked my /etc/hosts and everything is as it should be there. Is there