RE: SQL Statement Help

2005-12-14 Thread Charles Walmsley
Dear Jesse Could I please reinforce what Shawn is implying and suggest you look again at your table structure? All my experience over many years with DB design (admittedly not with MySql) suggest that you make have started to dig a little hole but it could easily become a very large one. With

User can see all databases...

2005-12-14 Thread William R. Dickson
OK, I strongly suspect I've just done something stupid here, but I'm having trouble figuring it out. I had a disk go bad on a MySQL server this past weekend. I did a clean system install (FreeBSD 5.4) on a new disk, installed the MySQL 3.23 port, and restored the mysql data directory from

HELP [nativecode=2013 ** Lost connection to MySQL server during query]

2005-12-14 Thread Doug Dalton
I am running mysql 4.1.13 on Suse 10 and I get an error on a simple select query, I have checked the threads on lost connection and my connection times as well as making sure my calls are all made from non forking processes etc... I cannot seem to resolve this error? can someone point me

Re: User can see all databases...

2005-12-14 Thread Michael Stassen
William R. Dickson wrote: OK, I strongly suspect I've just done something stupid here, but I'm having trouble figuring it out. I had a disk go bad on a MySQL server this past weekend. I did a clean system install (FreeBSD 5.4) on a new disk, installed the MySQL 3.23 port, and restored the

mysqldump: get both USE db_name and single tables

2005-12-14 Thread Michael Williams
Hi all, In yet another predicament. I'm wondering if there is any way to use the -B db_name option while at the same time specifying the table name(s) to be exported. The reason I ask is I am attempting to synchronize files from multiple databases from the dump files, and it would

Benchmark()

2005-12-14 Thread Raimundo Sierra
It is not clear to me what benchmark really does. Example: SELECT SQL_NO_CACHE * FROM mytable where myVarcharRow like 'sometext%' or otherVarcharRow like 'someothertext'; takes approx. 0.3 seconds. If you benchmark this query, which to my understanding should run and not just parse the

Re: change a variables value

2005-12-14 Thread wangxu
Now,i use default_character_set=utf8 in my.ini. When i restart my server,character_set_database and character_set_server change to utf8 but not character_set_client. Other, i don't hope character_set_database and character_set_server change. - Original Message - From: Gleb Paharenko

[OT] SPAM

2005-12-14 Thread Stephen Cook
What's the deal with SPAM on the list? -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: use deterministic within procedure

2005-12-14 Thread wangxu
thanks. I have read the links with you said. But i have a question,too. What would happen if i call a non-deterministic function that have been declared deterministic. - Original Message - From: Gleb Paharenko [EMAIL PROTECTED] To: mysql@lists.mysql.com Sent: Wednesday, December 14,

check a table column

2005-12-14 Thread wangxu
I create a table using the follow statement: CREATE TABLE test_check(NO_W_ID int ,NO_D_ID int,MM int,CT int,CHECK(MM 3)); But server allow a insert statement as follow,why? insert into test_check values(1,1,1,1);

Transactions (not rolling back on error)

2005-12-14 Thread Cory @ SkyVantage
I have a transaction that is very simple, I need to create records in multiple tables that are related. If any one insert statement fails or throws an error I want to rollback the ENTIRE transaction. I thought that this was the default functionality, but apparently that's not the case here.

Re: ~mysql query log~

2005-12-14 Thread abdulazeem
Hi Gleb, Thanks a lot. On Mon, 2005-12-12 at 23:44, Gleb Paharenko wrote: Hello. Have a look here: http://dev.mysql.com/doc/refman/5.0/en/log-file-maintenance.html abdulazeem wrote: Hi, Iam running a mysql server version 5.0.15. My mysql query log is occupying nearly 21 GB

Mysqldump INSERT statements (Was Mysqldump line endings)

2005-12-14 Thread Adam Lipscombe
(--result-file) option to save your output but use the output redirector to map the output of mysqldump to a file you specify, you will get the CRLF line endings you seek. Many thanks. One more thing: by default mysqldump uses --extended-insert=TRUE. This results in all the VALUES data

global search

2005-12-14 Thread mel list_php
Hi, I was wondering if there is any way to do a global search through all the tables in mysql? (not taking into account the performance issue) If for example I want to search ABC in all the columns of one table: select * from table where [whatever the column] like '%ABC%' or globally select *

Re: change a variables value

2005-12-14 Thread Gleb Paharenko
Hello. You can use default_character_set=utf8 (be aware that it sets to utf8 character_set_results and characters_set_connections, but usually they're should be the same). How can i set character_set_client to utf8 in my.ini?Maybe there are not the variable.thanks! wangxu wrote: --

Re: global search

2005-12-14 Thread Gleb Paharenko
Hello. It's probably possible to do a small script describing all the columns then building a query to search in, but I was wondering if there was an already existing mechanism. Another approach is not to use external scripts, but rather stored routines and INFORMATION_SCHEMA databases

Re: use deterministic within procedure

2005-12-14 Thread Gleb Paharenko
Hello. This not a complete answer for your questions, but you can find a lot of useful information from it (I hope). This procedure should produce different results on master and slave if master has server_id=1 and slave has server_id=2: mysql delimiter // mysql CREATE PROCEDURE

how to create binary logging for a database

2005-12-14 Thread prathima rao
hello, how can i create a binary log in a new database - Original Message - From: Adam Lipscombe [EMAIL PROTECTED] To: mysql@lists.mysql.com Sent: 14/12/2005 3:50 PM Subject: Mysqldump INSERT statements (Was Mysqldump line endings) (--result-file) option to save your output but use

Replication slave halts on SQL error - how to fix

2005-12-14 Thread Martijn van den Burg
Hi, Apologies for not posting this in the 'replication' list, but that seems not very active... I have setup replication between two 4.1.10 databases, and I noticed that the SLAVE THREAD had stopped because of an SQL error. The errorlog says: Fix the problem and restart the slave SQL thread.

Is select ... insert working with 3.23(58) ??

2005-12-14 Thread RAPPAZ Francois
Hi I'm stuck with a sequence of sql commands to duplicate a record whithin the same table (server is 3.23.58): I have table t1 with data : char and id: auto_increment, int, unsigned, primary key. I would like to do the following SET @template = 104; DROP table IF EXISTS tmp; CREATE TABLE

Store Procedures

2005-12-14 Thread ElkinFernando Ortiz
Please, I'm working with MySql 5. I need examples for store procedures for evaluate Syntax. Por favor, Trabajo con MySql5. Para atender unos requerimientos de programacion, estoy estudiando procedimientos almacenados y quisiera que alguno de ustedes me facilitaran ejemplos de estos, si los pueden

RE: how to create binary logging for a database

2005-12-14 Thread Jimmy Guerrero
Hello, The reference manual is great place to start for this type of information. http://dev.mysql.com/doc/refman/5.0/en/binary-log.html --log-bin[=file_name] is the mysqld startup command. Thanks, Jimmy Guerrero, Senior Product Manager MySQL Inc, www.mysql.com Houston, TX USA Phone:

RE: Store Procedures

2005-12-14 Thread Jimmy Guerrero
Hola, Una introducción basica y ejemplos se pueden encontrar aquí: http://www.quest-pipelines.com/newsletter-v6/0105_D.htm http://www.quest-pipelines.com/newsletter-v6/0205_D.htm Tambien aqui: http://www.databasejournal.com/features/mysql/article.php/3525581 Jimmy Guerrero, Senior Product

Re: global search

2005-12-14 Thread mel list_php
Hi Gleb,all, Thanks for the reply, but unfortunatly we are still under 4.0 and I have absolutely no control on that.(and I tried!!) So basically except the external script no option? Anything for the wildchars? :-( Last: I prefixed my tables by the step of the project they refer to, for

Re: global search

2005-12-14 Thread SGreen
I have an idea from outside the box, sort of This won't help you to find specific rows and it won't help you find data in InnoDB tables (unless you are running with --file-per-tablespace) but it may help you narrow your search to specific tables so you don't waste your time doing searches

YAQQ (Yet Another Query Question)

2005-12-14 Thread Mark Phillips
I am using MySQL 4.0.x on a Linux machine with a JSP/Servlet front-end to display the data. I have a table with experimental data for each flight of a rocket. Conceptually, it looks like (with many more columns): Flights +---+--+--+ | flight_id | data1_id | data2_id |

MySQL5

2005-12-14 Thread Brian E Boothe
I've Installed - uninstalled - reinstalled Mysql-5 Three Times on a extra machine I had laying around , and I have a few questions because of trouble's I've had and here they are I had trouble with phpmyadmin,(just wont Login or work at all) it's says to upgrade my Client's Were are the

Re: YAQQ (Yet Another Query Question)

2005-12-14 Thread nigel wood
Mark Phillips wrote: Flights +---+--+--+ | flight_id | data1_id | data2_id | +---+--+--+ | 1 |1 |1 | | 2 |1 |3 | | 3 |1 |1 | | 4 |2 |2 | | 5 |

RE: MySQL5

2005-12-14 Thread Jimmy Guerrero
Hello, 1. The MySQL 5.0 client programs can be downloaded from the below link...(not sure what platform your on): http://dev.mysql.com/downloads/mysql/5.0.html 2. The mysqladmin client ships with 5.0, so you should be able to invoke it from the command line. shell mysqladmin [options] command

Re: YAQQ (Yet Another Query Question)

2005-12-14 Thread nigel wood
Mark Phillips wrote: 2. Generally, what is the most efficient way to do this? Is is better to issue more queries that gather the calculated data or better to issue one query for the raw data and then do the calculations in Java? I am sure there are many factors that effect the answer to

Re: YAQQ (Yet Another Query Question)

2005-12-14 Thread SGreen
Mark Phillips [EMAIL PROTECTED] wrote on 12/14/2005 11:31:03 AM: I am using MySQL 4.0.x on a Linux machine with a JSP/Servlet front-end to display the data. I have a table with experimental data for each flight of a rocket. Conceptually, it looks like (with many more columns):

Re: MySQL5

2005-12-14 Thread Stephen Moretti
Brian E Boothe wrote: I've Installed - uninstalled - reinstalled Mysql-5 Three Times on a extra machine I had laying around , and I have a few questions because of trouble's I've had and here they are I had trouble with phpmyadmin,(just wont Login or work at all) it's says to upgrade my

RE: YAQQ (Yet Another Query Question)

2005-12-14 Thread Peter Lauri
Have you tried the GROUP BY? Make something like (not sure of exact syntax, check the manual for that): SELECT COUNT(*) AS cnt, data1_id FROM data1_id GROUP BY data1_iD; /Peter -Original Message- From: Mark Phillips [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 14, 2005 11:31

Re: YAQQ (Yet Another Query Question)

2005-12-14 Thread Mark Phillips
Nigel, Thanks! Mark On Wednesday 14 December 2005 09:42 am, nigel wood wrote: Mark Phillips wrote: Flights +---+--+--+ | flight_id | data1_id | data2_id | +---+--+--+ | 1 |1 |1 | | 2 |1 |

Re: YAQQ (Yet Another Query Question)

2005-12-14 Thread Mark Phillips
Nigel, Again, thanks - that is the rule of thumb I was looking for! Mark On Wednesday 14 December 2005 09:57 am, nigel wood wrote: Mark Phillips wrote: 2. Generally, what is the most efficient way to do this? Is is better to issue more queries that gather the calculated data or better to

Re: Dropped table. . . Help Please

2005-12-14 Thread Johannes Franken
* Rick Dwyer [EMAIL PROTECTED] [2005-12-13 18:21 +0100]: I made a major mistake with MySQL 4.1.x. While using Navicatt I dropped my database when I meant to drop a table. Other than backups which are not that up to date, is there an undo? If your mysqld writes binlogs (see

INSERTS slower after upgrade from 4.0 to 5.0?

2005-12-14 Thread PgmHelmi
So no answer is an answer too! As nobody wants to answer me, I have to suppose that INSERTS are slower now, but no one dares to confess it. It is not my intention to talk bad about MySql, I only want to know the truth and the reason for it and perhaps a hope that it will get faster again in

INSERTS slower after upgrade from 4.0 to 5.0?

2005-12-14 Thread PgmHelmi
So no answer is an answer too! As nobody wants to answer me, I have to suppose that INSERTS are slower now, but no one dares to confess it. It is not my intention to talk bad about MySql, I only want to know the truth and the reason for it and perhaps a hope that it will get faster again in

Re: INSERTS slower after upgrade from 4.0 to 5.0?

2005-12-14 Thread SGreen
PgmHelmi [EMAIL PROTECTED] wrote on 12/14/2005 01:15:37 PM: So no answer is an answer too! As nobody wants to answer me, I have to suppose that INSERTS are slower now, but no one dares to confess it. It is not my intention to talk bad about MySql, I only want to know the truth and the

SQL Statement Help

2005-12-14 Thread Jesse
Hello, I need help building a SQL Statement. I'm currently using MySQL 5.something. This one is kind of strange, and I can't seem to figure out how to do it. I have a table named Participants. Each Participant is allowed to bring up to 5 Guests. Instead of putting the names in a separate

Re: SQL Statement Help

2005-12-14 Thread Martijn Tonies
Hello, I need help building a SQL Statement. I'm currently using MySQL 5.something. This one is kind of strange, and I can't seem to figure out how to do it. I have a table named Participants. Each Participant is allowed to bring up to 5 Guests. Instead of putting the names in a

Re: SQL Statement Help

2005-12-14 Thread SGreen
Jesse [EMAIL PROTECTED] wrote on 12/14/2005 02:03:22 PM: Hello, I need help building a SQL Statement. I'm currently using MySQL 5.something. This one is kind of strange, and I can't seem to figure out how to do it. I have a table named Participants. Each Participant is allowed to

Re: Replication slave halts on SQL error - how to fix

2005-12-14 Thread Gleb Paharenko
Hello. May be it is easier just to setup replication again, without importing to the slave parts of the master's binary log. But, certainly, you should find out the statement which produced the error, to prevent similar problems in future. Martijn van den Burg wrote: Hi,

Re: innobase_query_caching_of_table_permitted error?

2005-12-14 Thread Heikki Tuuri
Mike, thank you for the bug report. I have now opened: http://bugs.mysql.com/bug.php?id=15758 Please add your comments there when you are able to determine the query that is causing the error print. Maybe enabling the MySQL General Query log would help? Best regards, Heikki Oracle

ibdata1 and *.ibd. Do I need both?

2005-12-14 Thread Nathan Gross
Hi; A while ago, I changed most of my myisam based tables over to innodb. Fine. A while later, I noticed and implemented the option to keep the files separate. Now, weeks later, I still have a huge, 7 gig ibdata1, plus many *.ibd files. Can I delete ibdata1? What worries me is that when I have new

Re: YAQQ (Yet Another Query Question)

2005-12-14 Thread Mark Phillips
Thanks to everyone for their help. Using Nigel's suggestion, I was able to gather all the summary data in one query. Those nested if()'s are really useful! FWIW, you can see the summary stats at http://rockets.phillipsoasis.com Just click on Hopi Rockets and scroll to the bottom of the page. My

Re: ibdata1 and *.ibd. Do I need both?

2005-12-14 Thread Paul DuBois
At 15:12 -0500 12/14/05, Nathan Gross wrote: Hi; A while ago, I changed most of my myisam based tables over to innodb. Fine. A while later, I noticed and implemented the option to keep the files separate. Now, weeks later, I still have a huge, 7 gig ibdata1, plus many *.ibd files. Can I delete

Re: Is select ... insert working with 3.23(58) ??

2005-12-14 Thread Kristen G. Thorson
RAPPAZ Francois wrote: Hi I'm stuck with a sequence of sql commands to duplicate a record whithin the same table (server is 3.23.58): I have table t1 with data : char and id: auto_increment, int, unsigned, primary key. I would like to do the following SET @template = 104; DROP table IF