RE: Command Line Editing Mode

2002-01-04 Thread Fulko Hew

Quentin Bennett [EMAIL PROTECTED] wrote:

 Using the mysql CLI, I have discovered that 
 
 ESC-Return Return
 
 will put the CLI editor in to 'vi' mode, and allow me to use my 'normal' ksh
 editing keys, available in ksh after set -o vi.

Cool... Thanks...  I didn't know that.
Now I can use it without getting frustrated.  :-))

---
Fulko Hew,   Voice:  905-681-5570
Senior Engineering Designer, Fax:905-681-5556
SITA (Burlington)Email:  [EMAIL PROTECTED]
777 Walkers Line,
Burlington, Ontario, Canada, L7N 2G1

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




RE: getting id or record just inserted

2001-11-29 Thread Fulko Hew

Matt Graham [EMAIL PROTECTED] asked

 Can anyone tell me how to get the id of a row just inserted?  In MS-SQL I
 recall something about @@Identity.  Does MySQL have something similar?  I
 know I can always just query Max(ID), but that's not always the safest bet.
 
 reply to [EMAIL PROTECTED] as I have not subscribed to the mailing
 list...yet.

Check out: last_insert_id()

---
Fulko Hew,   Voice:  905-681-5570
Senior Engineering Designer, Fax:905-681-5556
SITA (Burlington)Email:  [EMAIL PROTECTED]
777 Walkers Line,
Burlington, Ontario, Canada, L7N 2G1

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Unique and case-insensitivity with indexes

2001-11-12 Thread Fulko Hew


I am using mySQL 3.22.4a-beta
yes, I know its old :-(

I have just stumbled across a problem with how it
treats 'uniqueness' in table contents.

I have a table with a column defined as:

  create table test (name varchar(80) not null);
  alter table test ADD UNIQUE (name), ADD INDEX (name);

When I now add entries that are case sensitive, I get duplicate entry errors:

mysql insert into test (name) values ('a');
Query OK, 1 row affected (0.04 sec)

mysql insert into test (name) values ('A');
ERROR 1062: Duplicate entry 'A' for key 1


I always considered the value of 'a' and 'A' to be unique,
but this version of mySQL doesn't appear to, at least with
indexes.

Can anyone either point out what I am doing wrong, or a workaround?

TIA
Fulko


---
Fulko Hew,   Voice:  905-681-5570
Senior Engineering Designer, Fax:905-681-5556
SITA (Burlington)Email:  [EMAIL PROTECTED]
777 Walkers Line,
Burlington, Ontario, Canada, L7N 2G1

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Unique and case-insensitivity with indexes

2001-11-12 Thread Fulko Hew

Bill Adams [EMAIL PROTECTED] replied:

 Fulko Hew wrote:
 
  I am using mySQL 3.22.4a-beta
  yes, I know its old :-(
 
  I have just stumbled across a problem with how it
  treats 'uniqueness' in table contents.
 
  I have a table with a column defined as:
 
create table test (name varchar(80) not null);
alter table test ADD UNIQUE (name), ADD INDEX (name);



 If you want this to be case sensitive you need to add BINARY to any '*char'
 columns:
 
   create table test (name varchar(80) BINARY not null);
   alter table test ADD UNIQUE (name), ADD INDEX (name);


Of course you are right, and despite the fact I've just spent an hour
searching the manual for this and _not_ seeing it.
I do another search, and yes, there it is staring me in the face.
(duh, sound of hand slapping on forehead)
---
Fulko Hew,   Voice:  905-681-5570
Senior Engineering Designer, Fax:905-681-5556
SITA (Burlington)Email:  [EMAIL PROTECTED]
777 Walkers Line,
Burlington, Ontario, Canada, L7N 2G1

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Unique and case-insensitivity with indexes

2001-11-12 Thread Fulko Hew

Giuseppe Maxia [EMAIL PROTECTED] responded:


 The workaround is to use the attribute BINARY for your field
 create table test (myfield varchar(80) BINARY not null, UNIQUE KEY myfield);
 This way, the index is case sensitive.
 
 Unfortunately, this feature was introduced in MySQL 3.23, so your current server
 is not able to deal with it.

Actually it _is_ documented in my 3.22.x book, so its older than that.
It appears to have been added at 3.21.0

---
Fulko Hew,   Voice:  905-681-5570
Senior Engineering Designer, Fax:905-681-5556
SITA (Burlington)Email:  [EMAIL PROTECTED]
777 Walkers Line,
Burlington, Ontario, Canada, L7N 2G1

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Mysql vs ....

2001-03-26 Thread Fulko Hew


[EMAIL PROTECTED] wrote:

 The biggest reason to avoid Microsoft products when I choose platforms
 and tools for projects is missing freedom. I never know why but maybe I
 really like MSSQL but I have some reason to drop NT - I can't do this.
 MSSQL runs only on 
 NT. In own projects I always try to keep myself free from any limits to
 be ready to migrate in case of emergency. 

Let me play devils advocate here.  (Remember this is _not my_ opinion!)

If I were to say something like that at my work,
I'd get the following response:

"Why would we EVER consider dropping something like NT.
 Yeah, I know you like UNIX systems,
 Yeah, I know they are more reliable,
 Yeah, I know they are faster, non-bloated, etc.
 Yeah, I know its more expensive to maintain,
 But I don't want to sell a UNIX solution to our customers."

Unfortunately, this is a widly held attitude.
My rebuttal always is:

"We are not in the OS business, we don't sell operating systems...
 we sell solutions... vertical solutions.
 'No user serviceable parts inside.'
 Our customers never even see the OS, when they use the product."

"Oson, Chris M." [EMAIL PROTECTED] wrote:

 Not only that, but mySQL "forces" you to learn SQL.  Not by wizards that
 build the SQL statement for you.

Again, the MS proponents (and my people) would say that:
"'wizards' are a good thing... A _great_ thing, and any software that
doesn't have wizards, is a backwards, antiquated software that isn't
user friendly..."

Sorry, If I sound cynical here, but I go through these arguments
every day.

But having said all that, I still only develop non-MS solutions, using
open-source (and as license free as possible). Much to the envy of my
cohorts, who are _forced_ to develop on MS platforms with MS tools,
who patiently tolerate those un-friendly tools, anomolous behaviour,
and fairly slow development cycles.

-------
Fulko Hew,   Voice:  905-333-6000  x 6010
Senior Engineering Designer, Direct: 905-333-6010
Northrop Grumman-Canada, Ltd.Fax:905-333-6050
777 Walkers Line,Email   [EMAIL PROTECTED]
Burlington, Ontario, Canada, L7N 2G1

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




mysql-3.22.4a-beta and RedHat 7.0 (compile problems)

2001-02-13 Thread Fulko Hew


I know I'm using a really old version of mysql  (3.22.4a-beta)
but upgrading means changing my application, and I'd rather
avoid that right now.

I'm trying to get it to build on RedHat 7.0

I have updated gcc to 2.96-69

When compiling sql/sql_yacc.cc

The compiler appears to hang in pass 1.
After 10-15 minutes of compile I give up.

Does this toggle any memories for anyone?

---
Fulko Hew,   Voice:  905-333-6000  x 6010
Senior Engineering Designer, Direct: 905-333-6010
Northrop Grumman-Canada, Ltd.Fax:905-333-6050
777 Walkers Line,Email   [EMAIL PROTECTED]
Burlington, Ontario, Canada, L7N 2G1

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php