Re: Understanding mysql NULL handling ...

2007-06-13 Thread ViSolve DB Team
Hi, Because "NULL is not a value". Operators [!=] must be suceeded by a value. These orphans must be selected in a correct way using "is" clause. Thanks ViSolve DB Team - Original Message - From: "Mufaddal Khumri" <[EMAIL PROTECTED]> To: Sent: Thursday, June 14, 2007 1:20 AM Subje

Re: Before I shoot myself in the foot...

2007-06-13 Thread Ananda Kumar
Hi All, Will the rename of table from y to x cause for all the stored procs, functions on this table to be come invalid? regards anandkl On 6/14/07, Brian Dunning <[EMAIL PROTECTED]> wrote: Many thanks to all who took the time to reply. :) :) -- MySQL General Mailing List For list archive

Design Help Needed

2007-06-13 Thread Sudheer Satyanarayana
Hi, I'm creating an application for my web site. I want help in designing database tables. Currently I'm starting with user management system. The web site would have these types of users 1. Customer account 1a. Individual account. This user would be an individual with username, password, bi

Re: Before I shoot myself in the foot...

2007-06-13 Thread Brian Dunning
Many thanks to all who took the time to reply. :) :) -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: Understanding mysql NULL handling ...

2007-06-13 Thread Jon Ribbens
On Wed, Jun 13, 2007 at 12:50:03PM -0700, Mufaddal Khumri wrote: > mysql> select * from t1 where sid != 2; > > As you can see, the rows that had sid = NULL did not get returned in > the results when i did "... where sid != ; " > > Question: Is this behaviour correct and is in accordance to the

Understanding mysql NULL handling ...

2007-06-13 Thread Mufaddal Khumri
Hello, I am using Ver 8.41 Distrib 5.0.27, for apple-darwin8.5.1 on i686 == My table definition: == mysql> show create table t1; +--- +--- --

Re: Before I shoot myself in the foot...

2007-06-13 Thread Brent Baisley
Yes, that will lock up the table while the change is being made. One technique you can use is to rename the table and create a new to catch the incoming data. RENAME TABLE x TO y;CREATE TABLE x LIKE y; By putting both commands on 1 line, it will execute almost immediately. Then you can alter t

Re: Before I shoot myself in the foot...

2007-06-13 Thread Baron Schwartz
Brent Baisley wrote: Yes, that will lock up the table while the change is being made. One technique you can use is to rename the table and create a new to catch the incoming data. RENAME TABLE x TO y;CREATE TABLE x LIKE y; By putting both commands on 1 line, it will execute almost immediately.

Re: building comma-separated list of strings from subquery

2007-06-13 Thread Brent Baisley
You probably want to look at the group_concat function. It doesn't work as a subselect, but it allows you to group a set of records and "rollup" the different values in the grouping. Christian Hansel wrote: I'ld like to accomplish something like: set @myvar=concat_ws(",",(SELECT column from t

Re: MySql Host through Heartbeat

2007-06-13 Thread Scott Tanner
There's a 'report-host' option that can be set in the conf file to mask the host name. Sounds like this may be set. If you want to get the server's actual host name from within mysql, how about running a system command: mysql> \! hostname; or mysql> \! cat /etc/hostnames; (debi

Re: [Q] event for client?

2007-06-13 Thread Michael Dykman
On 6/13/07, Ulrich Staudinger <[EMAIL PROTECTED]> wrote: Hi Andrey, > Andrey Kotrekhov wrote: >> SQL >> Hello! >> >> Is there any way to inform mysql client application about changing in >> the some table. There are triggers of course which could be used to track any specific DML event. Depend

Re: Before I shoot myself in the foot...

2007-06-13 Thread Baron Schwartz
Hi Brian, Brian Dunning wrote: ...if I add a column to a table with 40,000,000 records, will it cause that table to hang for any significant amount of time, and prevent other transactions? It's a MyISAM table and I was going to add a varchar(20) column, NULL. It's a very busy table, constant s

Before I shoot myself in the foot...

2007-06-13 Thread Brian Dunning
...if I add a column to a table with 40,000,000 records, will it cause that table to hang for any significant amount of time, and prevent other transactions? It's a MyISAM table and I was going to add a varchar(20) column, NULL. It's a very busy table, constant searches and inserts. -- My

RE: building comma-separated list of strings from subquery

2007-06-13 Thread Christian Hansel
>I'ld like to accomplish something like: > >set @myvar=concat_ws(",",(SELECT column from table1 order by column; >where ...)) > >or > >select concat_ws(",",(SELECT column from table1 order by column where ...)); > >for further usage in sql-scripts I forgot to mention: As I need it in a function, i

RE: partial string extraction with sql using regexp ?

2007-06-13 Thread Christian Hansel
>I'ld like to accomplish something like: > >set @myvar=concat_ws(",",(SELECT column from table1 order by column; >where ...)) > >or > >select concat_ws(",",(SELECT column from table1 order by column where ...)); > >for further usage in sql-scripts I forgot to mention: As I need it in a function

Re: MySql Host through Heartbeat

2007-06-13 Thread Ben Clewett
What I know is that: Heartbeat with MySQL uses two IP's. That of the server, and that of the resource MySql. The former is fixed, the latter moves with MySQL when it's moved to another server. The one I need is the hostname of the physical server, not the resource. I've installed 5.0.41 an

building comma-separated list of strings from subquery

2007-06-13 Thread Christian Hansel
Hi y'all, I'ld like to accomplish something like: set @myvar=concat_ws(",",(SELECT column from table1 order by column; where ...)) or select concat_ws(",",(SELECT column from table1 order by column where ...)); for further usage in sql-scripts -- MySQL General Mailing List For list archive

Re: Create Table Warning

2007-06-13 Thread dpgirago
> This is a create table statement output from mysqldump from a 4.0.24 > installation. > > Restoring on 5.0.22 gives a warning. > > Can anyone enlighten me? > > I guess I'm a little behind on my reading... > > David > > mysql> CREATE TABLE `container` ( > -> `carrier` varchar(128) NOT

Re: [Q] event for client?

2007-06-13 Thread Ulrich Staudinger
Hi Andrey, Andrey Kotrekhov wrote: SQL Hello! Is there any way to inform mysql client application about changing in the some table. One process puts periodically record into the table. Second process waits new records. It is very expensive way to do SELECT from this table each second. Is the

Re: [Q] event for client?

2007-06-13 Thread Baron Schwartz
Hi Andrey. Andrey Kotrekhov wrote: SQL Hello! Is there any way to inform mysql client application about changing in the some table. One process puts periodically record into the table. Second process waits new records. It is very expensive way to do SELECT from this table each second. Is the

RE: Create Table Warning

2007-06-13 Thread Rhys Campbell
Do a "SHOW WARNINGS" at the command line. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 13 June 2007 16:11 To: mysql@lists.mysql.com Subject: Create Table Warning This is a create table statement output from mysqldump from a 4.0.24 installation. Restoring

Re: Create Table Warning

2007-06-13 Thread Baron Schwartz
Hi , [EMAIL PROTECTED] wrote: This is a create table statement output from mysqldump from a 4.0.24 installation. Restoring on 5.0.22 gives a warning. Can anyone enlighten me? I guess I'm a little behind on my reading... David mysql> CREATE TABLE `container` ( -> `carrier` varchar(1

Create Table Warning

2007-06-13 Thread dpgirago
This is a create table statement output from mysqldump from a 4.0.24 installation. Restoring on 5.0.22 gives a warning. Can anyone enlighten me? I guess I'm a little behind on my reading... David mysql> CREATE TABLE `container` ( -> `carrier` varchar(128) NOT NULL default '', ->

[Q] event for client?

2007-06-13 Thread Andrey Kotrekhov
SQL Hello! Is there any way to inform mysql client application about changing in the some table. One process puts periodically record into the table. Second process waits new records. It is very expensive way to do SELECT from this table each second. Is there any other right way to inform seco

Re: zabbix mysql problem

2007-06-13 Thread sizo nsibande
You might need to backup a few chapters. Thanks a lot man atleast now I know what to look into. On 12/06/07, Gerald L. Clark <[EMAIL PROTECTED]> wrote: sizo nsibande wrote: > I am trying to install zabbix, and at the third step I get this error: > > > > [EMAIL PROT

Re: How can I do something like this "SELECT MAX(col1, col2, col3) FROM mytable ORDER BY MAX(col1, col2, col3);" ?

2007-06-13 Thread Ricardas S
ops again you probably needed just select greatest(col1,col2,col3) from t order by 1 - Original Message - From: "Ricardas S" <[EMAIL PROTECTED]> To: "KLEIN Stéphane" <[EMAIL PROTECTED]> Cc: Sent: Wednesday, June 13, 2007 11:02 Subject: Re: How can I do something like this "SELECT MAX(c

partial string extraction with sql using regexp ?

2007-06-13 Thread Christian Hansel
hi all, Here's a nut to crack: I would like to extract a part of a string stored in a varchar column in a mysql table. Since the part of string I want to extract is neither at a fixed position nor logically separated by a fixed character I was thinking using regexp would by a good idea Sample d

partial string extraction with sql using regexp ?

2007-06-13 Thread Christian Hansel
hi all, Here's a nut to crack: I would like to extract a part of a string stored in a varchar column in a mysql table. Since the part of string I want to extract is neither at a fixed position nor logically separated by a fixed character I was thinking using regexp would by a good idea Sample d

Re: How can I do something like this "SELECT MAX(col1, col2, col3) FROM mytable ORDER BY MAX(col1, col2, col3);" ?

2007-06-13 Thread Ricardas S
select greatest(col1,col2,col3) from (select max(col1) as col1 from t) a, (select max(col2) as col2 from t) b, (select max(col3) as col3 from t) c - Original Message - From: "KLEIN Stéphane" <[EMAIL PROTECTED]> To: "Ricardas S" <[EMAIL PROTECTED]> Cc: Sent: Wednesday, June 13, 2007 10:

Changing Table Collation Doesn't Take Effect

2007-06-13 Thread Jason J. W. Williams
Hello, I've got a table that originally was using UTF8 charset and collation. However, I upgraded one of my applications which is hardcoded to Latin1_General_CI collation in its queries. As a result, I altered the table and any specifically set columns to use Latin1 as the charset and Latin1_Gene

Re: How can I do something like this "SELECT MAX(col1, col2, col3) FROM mytable ORDER BY MAX(col1, col2, col3);" ?

2007-06-13 Thread KLEIN Stéphane
2007/6/13, Ricardas S <[EMAIL PROTECTED]>: Ops, small mistake, shoud be MAX((col1*(MAX_VALUE_OF_COL2+1)+col2)*(MAX_VALUE_OF_COL3+1)+col3) Sorry, my question is ashamed. Example, I've this row : Col1 | Col2 | Col3 1 | 5 | 8 6 | 2 | 4 12| 13 | 6 After my query,

Re: How can I do something like this "SELECT MAX(col1, col2, col3) FROM mytable ORDER BY MAX(col1, col2, col3);" ?

2007-06-13 Thread Ricardas S
Ops, small mistake, shoud be MAX((col1*(MAX_VALUE_OF_COL2+1)+col2)*(MAX_VALUE_OF_COL3+1)+col3) - Original Message - From: "Ricardas S" <[EMAIL PROTECTED]> To: Sent: Wednesday, June 13, 2007 09:36 Subject: Re: How can I do something like this "SELECT MAX(col1, col2, col3) FROM mytabl

Re: How can I do something like this "SELECT MAX(col1, col2, col3) FROM mytable ORDER BY MAX(col1, col2, col3);" ?

2007-06-13 Thread Ricardas S
Have you tried MAX((col1*(MAX_VALUE_OF_COL1+1)+col2)*(MAX_VALUE_OF_COL2+1)+col3) - Original Message - From: "KLEIN Stéphane" <[EMAIL PROTECTED]> To: Sent: Wednesday, June 13, 2007 09:30 Subject: How can I do something like this "SELECT MAX(col1, col2, col3) FROM mytable ORDER BY MAX(c

How can I do something like this "SELECT MAX(col1, col2, col3) FROM mytable ORDER BY MAX(col1, col2, col3);" ?

2007-06-13 Thread KLEIN Stéphane
Hi, I would like do something like : SELECT MAX(col1, col2, col3) FROM mytable ORDER BY MAX(col1, col2, col3); I know this syntax is wrong but I would like get a solution to this stuff. Thanks for your help. Stephane -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysq