Client Side Query cache

2005-04-14 Thread Mister Jack
Hi,

I was wondering if there is any query cache code/lib somewhere to
cache certains queries ?
I'm always doing the same queries, (and the result never change, so I
could spare the round-trip to the server), but caching each tine the
data for it is a bit of work.
Thanks, for your suggestions

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Warnings level

2005-04-08 Thread Mister Jack
Hi,

I got back warnings, event when started with mysql -v -v, I don't have
the Warnings appearing on the console... Do I really have to insert
SHOW WARNINGS; in the dump file after each statements ???

On Apr 7, 2005 6:10 PM, Mister Jack [EMAIL PROTECTED] wrote:
 Hi !
 
 Thanks, for your answer.
 Indeed, I didn't think about the verbose option. I tried it and used
 tee to log data.
 Well so far I haven't got anymore Warnings (strange though...) :-)
 
 On Apr 5, 2005 9:50 PM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
 
 
  Mister Jack [EMAIL PROTECTED] wrote on 04/05/2005 01:38:00 PM:
 
 
Hi,
   
I've got a dump file from my main DB (MySQL 4.1.10a), when I load it
with source backup.sql I can see some warnings around. Is there any
way to log those warnings, or to stop on warnings ? (show warnings
only show warnings for the _last_ query if there is any).
Thanks for your help
   
 
  You can see more details if you launch your client with one of the
  verbosity options. Use a -v, -v -v, or -v -v -v to increase the verbosity
  of your client.
 
  For more client options (at a shell prompt):
 
  mysql --help
 
  Shawn Green
   Database Administrator
   Unimin Corporation - Spruce Pine


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Warnings level

2005-04-08 Thread Mister Jack
Hi,

sorry for the noise, it may be useful for someone else :
cat backup20050408.sql | sed 's/INSERT/SHOW WARNINGS;INSERT/' | sed
's/CREATE/SHOW WARNINGS;CREATE/' | sed 's/DROP/SHOW WARNINGS;DROP/' 
backup.sql

then use the backup.sql thus created.

So I got :Invalid TIMESTAMP value in column 'timestamp' at row 5407;

(I still have to figure this out :)

On Apr 8, 2005 6:08 PM, Mister Jack [EMAIL PROTECTED] wrote:
 Hi,
 
 I got back warnings, event when started with mysql -v -v, I don't have
 the Warnings appearing on the console... Do I really have to insert
 SHOW WARNINGS; in the dump file after each statements ???
 
 On Apr 7, 2005 6:10 PM, Mister Jack [EMAIL PROTECTED] wrote:
  Hi !
 
  Thanks, for your answer.
  Indeed, I didn't think about the verbose option. I tried it and used
  tee to log data.
  Well so far I haven't got anymore Warnings (strange though...) :-)
 
  On Apr 5, 2005 9:50 PM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
  
  
   Mister Jack [EMAIL PROTECTED] wrote on 04/05/2005 01:38:00 PM:
  
  
 Hi,

 I've got a dump file from my main DB (MySQL 4.1.10a), when I load it
 with source backup.sql I can see some warnings around. Is there any
 way to log those warnings, or to stop on warnings ? (show warnings
 only show warnings for the _last_ query if there is any).
 Thanks for your help

  
   You can see more details if you launch your client with one of the
   verbosity options. Use a -v, -v -v, or -v -v -v to increase the 
   verbosity
   of your client.
  
   For more client options (at a shell prompt):
  
   mysql --help
  
   Shawn Green
Database Administrator
Unimin Corporation - Spruce Pine
 


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Warnings level

2005-04-07 Thread Mister Jack
Hi !

Thanks, for your answer.
Indeed, I didn't think about the verbose option. I tried it and used
tee to log data.
Well so far I haven't got anymore Warnings (strange though...) :-)

On Apr 5, 2005 9:50 PM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
  
  
 Mister Jack [EMAIL PROTECTED] wrote on 04/05/2005 01:38:00 PM:
 
  
   Hi,
   
   I've got a dump file from my main DB (MySQL 4.1.10a), when I load it
   with source backup.sql I can see some warnings around. Is there any
   way to log those warnings, or to stop on warnings ? (show warnings
   only show warnings for the _last_ query if there is any).
   Thanks for your help
   
  
 You can see more details if you launch your client with one of the
 verbosity options. Use a -v, -v -v, or -v -v -v to increase the verbosity
 of your client. 
  
 For more client options (at a shell prompt): 
  
 mysql --help 
  
 Shawn Green
  Database Administrator
  Unimin Corporation - Spruce Pine

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Warnings level

2005-04-05 Thread Mister Jack
Hi,

I've got a dump file from my main DB (MySQL 4.1.10a), when I load it
with source backup.sql I can see some warnings around. Is there any
way to log those warnings, or to stop on warnings ? (show warnings
only show warnings for the _last_ query if there is any).
Thanks for your help

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: I am stupid

2005-04-03 Thread Mister Jack
I would suggest to take a look at the documentation

http://dev.mysql.com/doc/mysql/en/index.html

1. create a DB :
http://dev.mysql.com/doc/mysql/en/index.html
2. using a SQL file to create those table.
on the mysql commqnd line :
source db.sql;

So as a whole, you'll do something like :

create database db;
usedb;
source db.sql;

himh


On Apr 2, 2005 7:20 PM, Niki Lampropoulou [EMAIL PROTECTED] wrote:
 I dont know how to do this very basuc, just atrated
 working with MySQL and not sure about what I am
 supposed to do.. Please help!!
 
 2. Create a database for the program to use in MySQL.
 
 3. Create the tables in the new database using db.sql
 which is in the sql directory.
 
 niki
 
 Send instant messages to your online friends http://uk.messenger.yahoo.com
 
 --
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
 


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



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 Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



select timestamp + 0

2005-03-16 Thread Mister Jack
Hi,

i'm using the 4.1.10 version of mysql.
If I do :

select max(timestamp + 0 ) as timestamp from news;
++
| timestamp  |
++
| 20050314194920 |
++

so i got the full timestamp(14), but if I do :
select max(timestamp) + 0 as timestamp from news;
+---+
| timestamp |
+---+
|  2005 |
+---+

Did i miss something in the documentation  ?
or is it normal ?
thanks

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: select timestamp + 0

2005-03-16 Thread Mister Jack
It returns :

select max(timestamp) as timestamp from news;
+-+
| timestamp   |
+-+
| 2005-03-14 19:49:20 |
+-+

and also :

select timestamp as timestamp from news limit 1;
+-+
| timestamp   |
+-+
| 2002-03-25 19:45:32 |
+-+

so If I do :

select timestamp + 0 as timestamp from news limit 1;
++
| timestamp  |
++
| 20020325194532 |
++

So i would expect a max(timestamp) + 0 to work the same than without the max.

is this a bug ?

(the code rely heavily on a result as a timestamp(14), like
MMDDHHmmss,  so getting this work helps migrating from 4.0 to 4.1)
thanks for your help




On Wed, 16 Mar 2005 14:36:42 -0600, gerald_clark
[EMAIL PROTECTED] wrote:
 Mister Jack wrote:
 
 Hi,
 
 i'm using the 4.1.10 version of mysql.
 If I do :
 
 select max(timestamp + 0 ) as timestamp from news;
 ++
 | timestamp  |
 ++
 | 20050314194920 |
 ++
 
 so i got the full timestamp(14), but if I do :
 select max(timestamp) + 0 as timestamp from news;
 +---+
 | timestamp |
 +---+
 |  2005 |
 +---+
 
 Did i miss something in the documentation  ?
 or is it normal ?
 thanks
 
 
 
 What does
 select max(timestamp) as timestamp from news;
 return?
 What would you get if that string was converted to a number?
 


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: How to add String to existing value of String

2005-03-16 Thread Mister Jack
Look for concat :
http://dev.mysql.com/doc/mysql/en/string-functions.html

On Wed, 16 Mar 2005 15:51:34 -0500, David DeSana
[EMAIL PROTECTED] wrote:
 I need to modify the value of file names in a table.  The strings represent
 an image file path and are stored in a char column in the table.  Here is a
 sample of the values:
 
 \products\1_TH.JPG
 \products\2_TH.JPG
 
 I would like to perform the following
 
 UPDATE test.Items SET Desc='New'+Desc
 
 I've been able to get the update to work on numeric values based on the
 MySQL docs but cannot figure out how to perform the update on strings.
 
 --
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
 


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: select timestamp + 0

2005-03-16 Thread Mister Jack
From the manual :

 MIN() and MAX() may take a string argument; in such cases they return
the minimum or maximum string value.

so I understand that for a timestamp column, values are converted and
then compared as strings, then the function return a string, so adding
+ 0 convert it to a number (which is different from adding 0 to a
timestamp). MIN/MAX operating on timestamp would have been more
straightforward, no ?
Or is there anything to coerce a string into a timestamp ? (appart a format )



On Wed, 16 Mar 2005 15:40:26 -0600, gerald_clark
[EMAIL PROTECTED] wrote:
 Mister Jack wrote:
 
 It returns :
 
 select max(timestamp) as timestamp from news;
 +-+
 | timestamp   |
 +-+
 | 2005-03-14 19:49:20 |
 +-+
 
 
 The string shown above converted into a number is 2005.
 ( Unless you think ist should be 1988 )
 Add 0, and it is still 2005.
 
 and also :
 
 select timestamp as timestamp from news limit 1;
 +-+
 | timestamp   |
 +-+
 | 2002-03-25 19:45:32 |
 +-+
 
 so If I do :
 
 select timestamp + 0 as timestamp from news limit 1;
 ++
 | timestamp  |
 ++
 | 20020325194532 |
 ++
 
 So i would expect a max(timestamp) + 0 to work the same than without the 
 max.
 
 is this a bug ?
 
 (the code rely heavily on a result as a timestamp(14), like
 MMDDHHmmss,  so getting this work helps migrating from 4.0 to 4.1)
 thanks for your help
 
 
 
 
 


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]