Re: Newbie: MYSQL nested query question

2005-03-31 Thread Philip M. Gollucci
Graham Anderson wrote: What is the proper way to say this ? SELECT C.City, N.Distance FROM Cities C JOIN Nearbycities N ON C.CityId =ci N.PrimaryCityId WHERE N.CityId = (SELECT Cities.CityId FROM Cities WHERE Cities.city = 'Los Angeles') AND N.distance < 20 I am trying to enter in a city and get a

Re: Making Slave a Master

2005-03-31 Thread Renato Golin
Hi Jalil, I had the same problem more than once. I solved it with a (not-so) simple perl script but the idea is very simple: swap the machines! scenario #1: master and slave running - master is used for writes, slave for reads, replication goes well. you have a DNS entry for MASTERDB.domain an

Newbie: MYSQL nested query question

2005-03-31 Thread Graham Anderson
What is the proper way to say this ? SELECT C.City, N.Distance FROM Cities C JOIN Nearbycities N ON C.CityId = N.PrimaryCityId WHERE N.CityId = (SELECT Cities.CityId FROM Cities WHERE Cities.city = 'Los Angeles') AND N.distance < 20 I am trying to enter in a city and get all the nearby cites with

Re: Making Slave a Master

2005-03-31 Thread Gary Richardson
I haven't done it in a nice way and I haven't done it in a long time, but you can do this. In the past, I've done the following: On the slave: 1) stop the server 2) comment out all the lines in my.cnf that refer to the machine as being a slave -- you still need your binary log directives though.

Re: How does a multi-row INSERT work?

2005-03-31 Thread Rhino
There are two forms of multi-row insert. Here is a script that illustrates both: use tmp; drop table if exists target; create table if not exists target (id smallint not null, name char(10) not null, primar

RE: needs some info about MySql

2005-03-31 Thread Bartis, Robert M (Bob)
I am certainly no expert, not even a DB admin:-\ My non scientific algorithm when selection of a DB was a question for a small team was as follows: 1) Go to local book store 2) Find section on DB, browse 3) Look for performance tuning of Oracle 4) Find chair quick

Making Slave a Master

2005-03-31 Thread jalil
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 when the master is up, which includes updating the master c

UDF request?

2005-03-31 Thread Dan Bolser
Hi, I have a request for a UDF that I would find really useful. I am duplicating this question on the community list as well as the MySQL list, because I am not sure where best to make this kind of request (see the previous post http://lists.mysql.com/community/97). I think the following syntax

Re: How does a multi-row INSERT work?

2005-03-31 Thread beacker
Chris W. Parker writes: >I searched the archives, looked through the manual, and searched google >for info on how to actually perform a multi-row INSERT but didn't find >an answer. The basic syntax is to separate the (...) with commas (,) ala: create table table1 (sku int, title varchar (20)); in

needs some info about MySql

2005-03-31 Thread Joan Hsieh
Hi, I'd like to know with a very extensive oracle dba experience, how's the learnig curve for a new MySql server, I don't have any mysql experience or knowledge at all. We have one existing mysql server want us to take over for adminsitrative and maintances. How often mysql needs to be patching

Re: Writing a custom storage engine

2005-03-31 Thread Sergei Golubchik
Hi! On Mar 31, Homam S.A. wrote: > I've been contemplating writing my own custom storage > engine for MySQL. > > I haven't found much documentation on the subject > besides these articles: > > http://netmirror.org/mirror/mysql.com/tech-resources/articles/creating-new-storage-engine.html > > htt

Re: How does a multi-row INSERT work?

2005-03-31 Thread SGreen
Dan Nelson <[EMAIL PROTECTED]> wrote on 03/31/2005 03:01:45 PM: > In the last episode (Mar 31), Chris W. Parker said: > > I searched the archives, looked through the manual, and searched > > google for info on how to actually perform a multi-row INSERT but > > didn't find an answer. > > > > Would

RE: How does a multi-row INSERT work?

2005-03-31 Thread Chris W. Parker
John McCaskey on Thursday, March 31, 2005 12:04 PM said: > This is documented on the INSERT Syntax page of the manual, but it may > be kind of hard to read for a beginner as it just says VALUES({expr | > DEFAULT},...),(...),... Oooh... In fact I did look through tho

Re: How does a multi-row INSERT work?

2005-03-31 Thread John McCaskey
INSERT INTO table (field1, field2) VALUES (1, 2), (3, 4), (5, 6), (7, 8); That would insert 4 rows first row with field1=1, field2=2, second field1=3, field2=4, etc. This is documented on the INSERT Syntax page of the manual, but it may be kind of hard to read for a beginner as it just says VALUE

Re: How does a multi-row INSERT work?

2005-03-31 Thread Dan Nelson
In the last episode (Mar 31), Chris W. Parker said: > I searched the archives, looked through the manual, and searched > google for info on how to actually perform a multi-row INSERT but > didn't find an answer. > > Would someone please show me the syntax for this please? > > I could just do a lo

Re: How does a multi-row INSERT work?

2005-03-31 Thread Jonathan Wright
Chris W. Parker wrote: Hello, I searched the archives, looked through the manual, and searched google for info on how to actually perform a multi-row INSERT but didn't find an answer. Would someone please show me the syntax for this please? I could just do a loop and INSERT the data that way but ac

How does a multi-row INSERT work?

2005-03-31 Thread Chris W. Parker
Hello, I searched the archives, looked through the manual, and searched google for info on how to actually perform a multi-row INSERT but didn't find an answer. Would someone please show me the syntax for this please? I could just do a loop and INSERT the data that way but according to the manua

Re: Non-destructive Expanding & Retracting sets

2005-03-31 Thread Andy Pieters
On Thursday 31 March 2005 17:27, Jason Martin wrote: > From a Normal Form perspective, this is supposed to be > implented as > Page 1category 1 > Page 1category 2 > Page 2category 3 > Page 3category 2 > Page 3category 4 > > at which point adding / removing ca

Re: Non-destructive Expanding & Retracting sets

2005-03-31 Thread Jason Martin
On Thu, Mar 31, 2005 at 05:21:00PM +0200, Andy Pieters wrote: > In a record there is a field category. > Categories can be added/changed/removed > Example data > > idtype > Page 1category1,category2 > Page 2category3 > Page 3

Non-destructive Expanding & Retracting sets

2005-03-31 Thread Andy Pieters
Hi all Facing the following problem In a record there is a field category. Categories can be added/changed/removed If I would use a fieldtype of set if would have been destructive in case a category got removed. So I implemented by using a text type field and some extra validation routines.

Re: license question

2005-03-31 Thread Michael Satterwhite
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 [EMAIL PROTECTED] wrote: | MySql loses money from many vendors on this very point. Of which they do | not budge. | | We have a Point of Sale software company who can distribute Oracle cheaper. | They only require a percentage of the final product price

I couldn't find cp932 and eucjpms

2005-03-31 Thread Hirofumi Fujiwara
Hi, > > A new version of MySQL Community Edition 5.0.3-beta Open Source database > management system has been released. This version now includes support for > Stored Procedures, Triggers, Views and many other features. It is now > available in source and binary form for a number of platforms fr

Re: Mysql installation

2005-03-31 Thread Andy Pieters
Hi Suryya I don't want to offend you but this information can be found on the MySql website. Choosing wich version to install: http://dev.mysql.com/doc/mysql/en/choosing-version.html Choosing a distribution format http://dev.mysql.com/doc/mysql/en/choosing-distribution-format.html Download pag

Re: InnoDB problems ...

2005-03-31 Thread Ware Adams
On Mar 31, 2005, at 1:13 AM, Rafal Kedziorski wrote: I'm working with JBoss and MySQL 4.0.22 (and 4.0.18 on Testsystem). But under the load, I get sometimes Exceptions like this: java.sql.SQLException: Deadlock found when trying to get lock; Try restarting transaction message from server: "Lock

Re: license question

2005-03-31 Thread Mark Matthews
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Daevid Vincent wrote: > As my company and I understand it, if you intend on distributing mySQL on > this appliance and the appliance is a sealed box with your own proprietary > code (like PHP or C or Java or whatever) that interfaces to the > STOCK/Unt

Mysql installation

2005-03-31 Thread Suryya Ghosh
Hi, We have server with the following hardware specification: Server: Dual Xeon 2.8 GHz Primary HDD: 73 GB SCSI RAM: ECC Registered 1024MB RAM Bandwidth: 2000 GB Bandwidth Uplink Port Speed: 100 Mbps Uplink Operating System: Red Hat Enterprise Linux, Versio

Links exchange with http://wwweth.cern.ch.

2005-03-31 Thread Ann Clark
Hello, We would like to exchange links between your site http://wwweth.cern.ch and our new exciting casino web site. Our site do NOT offer online gambling, it have information about different aspects of gambling and so it's very good and informative from our point of view. We require that o

Writing a custom storage engine

2005-03-31 Thread Homam S.A.
I've been contemplating writing my own custom storage engine for MySQL. I haven't found much documentation on the subject besides these articles: http://netmirror.org/mirror/mysql.com/tech-resources/articles/creating-new-storage-engine.html http://dev.mysql.com/tech-resources/articles/storage-en

Re: Index on boolean column

2005-03-31 Thread Martijn Tonies
> > I have to keep all transactions in one table for our reporting and futher > > analysing and if some other customers need exports I just can create batch > > sripts which will export their data for their own processing. > > > > Thank you for your help and time and also thanks others which respo

Re: Index on boolean column

2005-03-31 Thread Martijn Tonies
> >> > > >maybe this is a silly question but how useful it is to create > >> > > >indexes > >> on > >> > >>columns containing only values 0 and 1 (true and false)? > >> > > > >> > > Perhaps, instead of the index, you might revise your schema a bit. > >> > > > >> > > Why do you have this boolean co

Re: Index on boolean column

2005-03-31 Thread DuĊĦan Pavlica
Martijn, - Original Message - From: "Martijn Tonies" <[EMAIL PROTECTED]> To: Sent: Thursday, March 31, 2005 10:46 AM Subject: Re: Index on boolean column > > >maybe this is a silly question but how useful it is to create > > >indexes on > >>columns containing only values 0 and 1 (true

Re: lock tables and sql cache

2005-03-31 Thread Gleb Paharenko
Hello. I think it is a weird behavior. I've reported a bug: http://bugs.mysql.com/bug.php?id=9511 Bob O'Neill <[EMAIL PROTECTED]> wrote: > If I try to read table 'b' after locking table 'a', I expect to get > the error message "Table 'b' was not locked with LOCK TABLES". > Ho

Re: General Table Locking Question

2005-03-31 Thread Gleb Paharenko
Hello. Every thing depends on logic of your application. But I don't see a big gain of using table-level locks on InnoDB. Among others this might be helpful: http://dev.mysql.com/doc/mysql/en/internal-locking.html Scott Klarenbach <[EMAIL PROTECTED]> wrote: > I've got a good

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-03-31 Thread Gleb Paharenko
Hello. I strongly recommend you to upgrade to the latest release. Do you use official binaries? See: http://dev.mysql.com/doc/mysql/en/crashing.html "Andrew Braithwaite" <[EMAIL PROTECTED]> wrote: > Hi, > > I'm getting this strange error when there are more than 1100 mysql

Re: license question

2005-03-31 Thread Gleb Paharenko
Hello. The complete answer could only be obtained from [EMAIL PROTECTED] Pat Ballard <[EMAIL PROTECTED]> wrote: > Suppose i distribute MySQL-4.1 with an appliance, > which is a sealed x86 machine running a Linux > distribution made by another entity (ok, it's Red > Hat). I don't write

Re: Changed Logging Table from InnoDB to MyIsam, what memory buffers to tune?

2005-03-31 Thread Gleb Paharenko
Hello. SHOW STATUS usually helps others to give you a good advice. I think you should send the output of this statement to the list. Why have you changed the type of engine? Did it gave you a great performance hit? "Thomas Lekai" <[EMAIL PROTECTED]> wrote: > We finally split our huge

Re: Index on boolean column

2005-03-31 Thread Martijn Tonies
> > > >maybe this is a silly question but how useful it is to create indexes > on > > >>columns containing only values 0 and 1 (true and false)? > > > > > > Perhaps, instead of the index, you might revise your schema a bit. > > > > > > Why do you have this boolean column? What are you trying to >

Re: Index on boolean column

2005-03-31 Thread Martijn Tonies
> > >maybe this is a silly question but how useful it is to create indexes on > >>columns containing only values 0 and 1 (true and false)? > > > > Perhaps, instead of the index, you might revise your schema a bit. > > > > Why do you have this boolean column? What are you trying to > > achieve? > >