Newbie :create table multi, index

2005-04-01 Thread Aji Andri
hi seniors, I'm trying to create a table, here my table properties, create table user ( UserID int primary, Password varchar (20), User_stats int multi ); i'm still confuse in User_stats properti's that is multi, what really use 'multi' is ? and what the conection between primary ke

Re[2]: How to group records by using regular expression?

2005-04-01 Thread ON.KG
Hi Everybody Thank you, Tom! I really trying to group the names But I think I found another way - I made PHP-script which groups results from database after selection And I suspect it will be a little complicated for MySQL to group all this data, 'cause variants in reg.exp. pattern is too large

RE: How to group records by using regular expression?

2005-04-01 Thread Tom Crimmins
On Saturday, April 02, 2005 01:51, ON.KG wrote: > Hi Everybody > > I need to group records by regular expression > > Example: > > Table has column - names (just example) > records are: > > idnames time > 1 John, Max 12:15 > 2 Max, Jeff 15:55 > 3 Ken 20

How to group records by using regular expression?

2005-04-01 Thread ON.KG
Hi Everybody I need to group records by regular expression Example: Table has column - names (just example) records are: idnames time 1 John, Max 12:15 2 Max, Jeff 15:55 3 Ken 20:45 I need to get grouped records by name "Max" in column "names" SELECT

Re: UNION ALL and GROUP BY

2005-04-01 Thread Chris
Tom Crimmins wrote: On Friday, April 01, 2005 19:27, Chris wrote: Hi all, I've got 3 or 4 queries UNIONed together in a single query. I want to GROUP the UNIONed result, by one field, and SUM() another field. Is that possible in one query, or will I need to use temporary table and group it from

RE: UNION ALL and GROUP BY

2005-04-01 Thread Tom Crimmins
On Friday, April 01, 2005 19:27, Chris wrote: > Hi all, > > I've got 3 or 4 queries UNIONed together in a single query. I want to > GROUP the UNIONed result, by one field, and SUM() another field. > > Is that possible in one query, or will I need to use temporary table > and group it from that?

UNION ALL and GROUP BY

2005-04-01 Thread Chris
Hi all, I've got 3 or 4 queries UNIONed together in a single query. I want to GROUP the UNIONed result, by one field, and SUM() another field. Is that possible in one query, or will I need to use temporary table and group it from that? Thanks, Chris -- MySQL General Mailing List For list archiv

RE: Hex data in VARBINARY fields -- Is it me, or MySQL?

2005-04-01 Thread Tom Crimmins
On Friday, April 01, 2005 17:57, Adam Wilson wrote: > OK so... > I'm having this problem where I'm trying to store (rather small > (36-byte)) hex values in MySQL, but some of them end up getting > truncated, therefore breaking my app... I'm using 4.1.10, with > --default-table-type=InnoDB...

Hex data in VARBINARY fields -- Is it me, or MySQL?

2005-04-01 Thread Adam Wilson
OK so... I'm having this problem where I'm trying to store (rather small (36-byte)) hex values in MySQL, but some of them end up getting truncated, therefore breaking my app... I'm using 4.1.10, with --default-table-type=InnoDB... Or what ever option that is anyway... point is, all of these

Re: Newbie: MYSQL nested query question

2005-04-01 Thread Graham Anderson
strangely, the query works intermittently :( SELECT ( SELECT City FROM Cities WHERE CityId = N.CityId ), N.Distance FROM Cities C JOIN Nbc N ON C.CityId = N.PrimaryCityId WHERE C.City = 'Los Angeles' AND N.Distance <20 sometimes it works...other times it gives the mysql query error: show keys from

Re: Need help coverting MDB > SQL

2005-04-01 Thread Bill MacAllister
I would recommend that you use perl. 1. Install perl on your Windows box. I use Active State's distribution. 2. Install DBI, DBD::ODBC, and DBD::mysql. The commands you use are: ppm install DBI ppm install DBD-ODBC ppm install DBD-mysql 3. Create a DSN for your Access

Re: Newbie: MYSQL nested query question

2005-04-01 Thread Graham Anderson
In the simple query... the city field showed the result 'Los Angeles' in every row the distance field showed incorrect results to :( City| Distance Los Angeles 18 Los Angeles 5 Los Angeles 7 ... On Apr 1, 2005, at 1:59 PM, Peter Brawle

Re: Newbie: MYSQL nested query question

2005-04-01 Thread Peter Brawley
What was wrong with Graham's simpler query? PB - Graham Anderson wrote: I upgraded my local mysql version to 4.1.10a and the below query finally works :) How can I now amend the query so it works on my remote server running mysql 3.23.58 ? From one headache to another ;) SELECT ( SELECT Cit

re: stored procedure slower than not using stored procedure?

2005-04-01 Thread James Black
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I am curious if this should be the norm, that the stored procedure took 879 ms when I called it 9 times, with slightly different values, and the non-stored procedure test took 512ms with also slightly different values. I am using jdk1.5 and mysql 5.0.

Re: Newbie: MYSQL nested query question

2005-04-01 Thread Graham Anderson
I upgraded my local mysql version to 4.1.10a and the below query finally works :) How can I now amend the query so it works on my remote server running mysql 3.23.58 ? From one headache to another ;) SELECT ( SELECT City FROM Cities WHERE CityID = N.CityID ), N.Distance FROM Cities C JOIN Nbc N

re: stored procedure calling another database

2005-04-01 Thread SGreen
James Black <[EMAIL PROTECTED]> wrote on 04/01/2005 04:11:49 PM: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Is it possible to have a stored procedure query another database? > > I have two databases where the second (B) uses information from (A) to > make decisions. > > It would be g

re: stored procedure calling another database

2005-04-01 Thread James Black
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Is it possible to have a stored procedure query another database? I have two databases where the second (B) uses information from (A) to make decisions. It would be great if the stored procedure on database B could query A, so that it can make decisi

newbie question create table

2005-04-01 Thread Aji Andri
hi seniors, I'm trying to create a table, here my table properties, create table user ( UserID int primary, Password varchar (20), User_stats int multi ); i'm still confuse in User_stats properti's that is multi, what really use 'multi' is ? Thx before the guide, Aji

Re: Making Slave a Master

2005-04-01 Thread Atle Veka
On Thu, 31 Mar 2005 [EMAIL PROTECTED] wrote: > > We have one master and one slave database and use the slave for reads. > If for some reason our master goes down, > we would like to make our slave the master and use it for both writes > and reads and then switch to the original configuration > whe

Re: Can't create a new thread (errno 11). If you are not out of available memory, you can consult the manual for a possible OS-dependent bug'

2005-04-01 Thread Jocelyn Fournier
Hi, For me it sounds like a glibc issue. BTW, currently the 4.1.10a build is compiled against glibc-2.2, does MySQL plan to build next releases against glibc-2.3 which seems to handle much better a high number of simultaneous connected threads ? Thanks ! Jocelyn Gleb Paharenko wrote: Hello. P

Re: Need help with Stored Procedures iin MySQL 5.0.3-beta

2005-04-01 Thread Peter Brawley
What I do is prepare the CREATE PROC script in a text editor template which starts with   DELIMITER | and ends with   |   DELIMITER ; PB - Anchan, Dinesh wrote: Yes it is the delimiter which was giving the errors.  I had tried putting those statements inside the script, whic

RE: Need help with Stored Procedures iin MySQL 5.0.3-beta

2005-04-01 Thread Anchan, Dinesh
Yes it is the delimiter which was giving the errors. I had tried putting those statements inside the script, which didn't work. But when i set it from the command line before executing the script to create the procedure it worked. I am still not clear on how to use delimiter without much pain bu

Re: Need help with Stored Procedures iin MySQL 5.0.3-beta

2005-04-01 Thread Peter Brawley
Dinesh, Do you have something like   DELIMITER | before the CREATE PROCEDURE call, and   |   DELIMITER ; after it? Peter Brawley http://www.artfulsoftware.com - Anchan, Dinesh wrote: Hi, I am looking to migrate an Informix database to MySQL and trying to write a simple stored proce

Need help with Stored Procedures iin MySQL 5.0.3-beta

2005-04-01 Thread Anchan, Dinesh
Hi, I am looking to migrate an Informix database to MySQL and trying to write a simple stored procedure in MySQL 5.0.3. I referred to few examples posted and used the statements from them but i get errors while creating this procedure. CREATE PROCEDURE sp_test ( IN user_idinteger,

deadlock with innodb

2005-04-01 Thread Philippe Poelvoorde
Hello, here is a snippet of my code : BEGIN SELECT ... FROM table1, table2 ... FOR UPDATE is_present = false if ( we have results ) { for ( all results ) { SELECT COUNT(*) FROM table1 ... FOR UPDATE if ( match all conditions ) is_prese

Re: can't drop innodb table

2005-04-01 Thread Philippe Poelvoorde
Gleb Paharenko wrote: Hello. I think that SET FOREIGN_KEY_CHECKS = 0; could help you. Thanks, I didn't think about it. I've I dumped the DB and recreate it instead. Philippe Poelvoorde <[EMAIL PROTECTED]> wrote: Hello, I've got an innodb that I try to drop: drop table markets; ERROR 1217 (23000)

Re: What's up with this syntax?

2005-04-01 Thread Rhino
- Original Message - From: "Daniel Kasak" <[EMAIL PROTECTED]> To: Sent: Wednesday, March 30, 2005 11:24 PM Subject: What's up with this syntax? > update > _cached_LinesNotTolling LNT inner join TelecomLinePosting TLP > on LNT.Line=TLP.Line > inner join TelecomAccountPos

Grants not entirely propagated to slaves?

2005-04-01 Thread Nico Sabbi
Hi, it seems my Grants are not entirely propagated from the master to the slave (some are active, some are not). The slave is configured to replicate all databases, and the replication client has all privileges on the master. What is necessary to propagate every single grant? Thanks, -- Nico Sabb

Re: Hide password when running mysqldump from a batch

2005-04-01 Thread rds
No solution for this? Thanks --- rds <[EMAIL PROTECTED]> wrote: > > --- > > What you really want to avoid is having the password on the commandline. > > File permissions won't matter at all if you end up running a command > > that puts yo

Re: error in installing

2005-04-01 Thread prathima rao
hello gleb, thanks for the suggestion i could solve the problem in installing mysql on win 2000 the solution is below for reference Error: Cannot create Windows service for MySql. Error: 0 This error is encountered when you re-install or upgrade MySQL without first stopping and removing the exi

Strange behavior

2005-04-01 Thread Rafal Kedziorski
Hi, after extending our MySQL 4.0.23a installation to master-slave configuration two specific queries sended from our JBoss are 25-30 times slower. In our J2EE application which runs under JBoss 3.2.2 we are generating own queries by using a connection from JBoss connection pool. This are prepa

Re: error in installing

2005-04-01 Thread Gleb Paharenko
Hello. Usually it is possible to install MySQL without sc.exe. See: http://dev.mysql.com/doc/mysql/en/windows-troubleshooting.html "prathima rao" <[EMAIL PROTECTED]> wrote: > hello, > > i have windows 2000 i was not able to finish the server configuration i read > in one of the si

Re: can't drop innodb table

2005-04-01 Thread Gleb Paharenko
Hello. I think that SET FOREIGN_KEY_CHECKS = 0; could help you. Philippe Poelvoorde <[EMAIL PROTECTED]> wrote: > Hello, > > I've got an innodb that I try to drop: > > drop table markets; > ERROR 1217 (23000): Cannot delete or update a parent row: a foreign key > constraint fails

Re: Can't create a new thread (errno 11). If you are not out of available memory, you can consult the manual for a possible OS-dependent bug'

2005-04-01 Thread Gleb Paharenko
Hello. Please switch to the mysql-debug-4.1.10a version and send the error log with resolved stack trace. Include the output of the following statement as well: SHOW VARIABLES; >I'm getting this strange error when there are more than 1100 mysql >connections connected to the same s

error in installing

2005-04-01 Thread prathima rao
hello, i have windows 2000 i was not able to finish the server configuration i read in one of the site that sc.exe should be present i searched but could not get the same can anyone help me regards p rao -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.296

RE: Mysql installation information

2005-04-01 Thread Kevin Cowley
If the Redhat Enterprise edition is anything like the SuSE Enterprise then you have Mysql installed already. It won't be 4.1.10a most likely 4.0.x. Just down load the 4.1.10a rpm and install it over the top of the existing version. Kevin Cowley Product Development Alchemetrics Ltd SMARTER DATA , F

Re: Mysql installation information

2005-04-01 Thread Digvijoy Chatterjee
download the source tar ball and try installing mysql from the source the configure script does it all you , u dont need to worry, for custom compilation use ./configure --help Regards Digvijoy Chatterjee Suryya Ghosh wrote: Hi, I have gone through the sites which you have recomended where it is

Mysql installation information

2005-04-01 Thread Suryya Ghosh
Hi, I have gone through the sites which you have recomended where it is suggested that the exact version depends on the requirement and the hardware. According to our hardware & software specification which is given below, I think we should use (Linux (x86, glibc-2.2, static, gcc),Standard

can't drop innodb table

2005-04-01 Thread Philippe Poelvoorde
Hello, I've got an innodb that I try to drop: drop table markets; ERROR 1217 (23000): Cannot delete or update a parent row: a foreign key constraint fails Ok, I check with show innodb status : 050401 11:13:41 Cannot drop table `dabase/markets` because it is referenced by `dabase/last` then : dro

MySQL inserts and disk full - how to handle gracefully?

2005-04-01 Thread Andrew Braithwaite
Hi All, When you do a insert into a MySQL database and the disk is full, the insert just hangs waiting for that table to become available. This is fine for applications that care about data integrity. In this case I care more about availability and speed and would prefer it if the inserts gracef

RE: Can't create a new thread (errno 11). If you are not out of available memory, you can consult the manual for a possible OS-dependent bug'

2005-04-01 Thread Andrew Braithwaite
Hi, Yes - am using the standard binaries and have even upgraded to mysql-standard-4.1.10a-pc-linux-gnu-i686. I'm still getting this error - does anyone have any ideas? Cheers, Andrew -Original Message- From: Gleb Paharenko [mailto:[EMAIL PROTECTED] Sent: Thu 31 March 2005 02:31 To: m

Re: How does a multi-row INSERT work?

2005-04-01 Thread Gabriel PREDA
Ok. I believe you got your answer... for the syntax... I just want to add that this is faster because... using this you only modify the index file once. Lets see for: INSERT INTO x VALUES (a,b); INSERT INTO x VALUES (c,d); The server does: open table INSERT INTO x VALUES (a,b);

BDB storage engine

2005-04-01 Thread Mister Jack
Hi, There is an extensive documentation for InnoDB, but I can't find any extensive for BDB (except http://dev.mysql.com/doc/mysql/en/bdb-storage-engine.html ). Can I change the isolation level in the same way than with InnoDB ? Can I also do SELECT FOR UPDATE ? thanks -- MySQL General Maili