Re: Excluding MySQL database tables from mysqldump

2014-04-08 Thread hsv
 2014/04/07 08:02 -0800, Tim Johnson 
  2)mysqldump forces all database names to lower case in the CREATE
  DATABASE statement. I know, one shouldn't use upper case in
  database names, but :) tell that to my clients. 

Why not? That is not mentioned in the section devoted to mapping such names to 
the file-system.


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



Re: Excluding MySQL database tables from mysqldump

2014-04-08 Thread Tim Johnson
* h...@tbbs.net h...@tbbs.net [140407 23:09]:
  2014/04/07 08:02 -0800, Tim Johnson 
   2)mysqldump forces all database names to lower case in the CREATE
   DATABASE statement. I know, one shouldn't use upper case in
   database names, but :) tell that to my clients. 
 
 Why not? That is not mentioned in the section devoted to mapping such names 
 to the file-system.
  I found 'official' documentation here regarding Mac OS X:
  https://dev.mysql.com/doc/refman/5.0/en/identifier-case-sensitivity.html

  I had also found some reference to this having been a side effect
  of migrating files from older macs (of which I am not familiar)
  filesystems. 

  I don't find any reference in the mysqldump documentation at
  https://dev.mysql.com/doc/refman/5.1/en/mysqldump.html to any
  mechanism for overriding this.

  The incompatibility kicks in when trying to restore the databases
  on linux - and I presume FreeBSD, sun OS and other posix systems
  would show the same problem.

  Live and learn ...
-- 
Tim 
tim at tee jay forty nine dot com or akwebsoft dot com
http://www.akwebsoft.com, http://www.tj49.com

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



Calling function, that operates on another database

2014-04-08 Thread bars0.bars0.bars0

Hi all.

I have standard select statement and on one column I want to run 
function, that will connect to another database (same server).

Is this possible?

High level example:

SELECT db1.clients.client_id, getTurnover(db1.clients.client_id) FROM 
db1.clients;


AND getTurnover($id) body would be something like:

SELECT SUM(db2.turnover.amount) FROM db2.turnover WHERE 
db2.turnover.client_id = $id;



So for some data, I need to make lookup to another database table.
Is this even possible?


Cheers, Chris.

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



RE: Calling function, that operates on another database

2014-04-08 Thread David Lerer
Chris, take a look at Federated tables 
https://dev.mysql.com/doc/refman/5.5/en/federated-storage-engine.html
No, it is not as easy as Oracle's dblinks.
David.


David Lerer | Director, Database Administration | Interactive | 605 Third 
Avenue, 12th Floor, New York, NY 10158
Direct: (646) 487-6522 | Fax: (646) 487-1569 | dle...@univision.net | 
www.univision.net

-Original Message-
From: bars0.bars0.bars0 [mailto:bars0.bars0.ba...@gmail.com]
Sent: Tuesday, April 08, 2014 4:16 PM
To: mysql@lists.mysql.com
Subject: Calling function, that operates on another database

Hi all.

I have standard select statement and on one column I want to run
function, that will connect to another database (same server).
Is this possible?

High level example:

SELECT db1.clients.client_id, getTurnover(db1.clients.client_id) FROM
db1.clients;

AND getTurnover($id) body would be something like:

SELECT SUM(db2.turnover.amount) FROM db2.turnover WHERE
db2.turnover.client_id = $id;


So for some data, I need to make lookup to another database table.
Is this even possible?


Cheers, Chris.

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

The information contained in this e-mail and any attached 

documents may be privileged, confidential and protected from 

disclosure. If you are not the intended recipient you may not 

read, copy, distribute or use this information. If you have 

received this communication in error, please notify the sender 

immediately by replying to this message and then delete it 

from your system.


Re: Calling function, that operates on another database

2014-04-08 Thread Larry Martell
On Tue, Apr 8, 2014 at 4:15 PM, bars0.bars0.bars0
bars0.bars0.ba...@gmail.com wrote:
 Hi all.

 I have standard select statement and on one column I want to run function,
 that will connect to another database (same server).
 Is this possible?

 High level example:

 SELECT db1.clients.client_id, getTurnover(db1.clients.client_id) FROM
 db1.clients;

 AND getTurnover($id) body would be something like:

 SELECT SUM(db2.turnover.amount) FROM db2.turnover WHERE
 db2.turnover.client_id = $id;


 So for some data, I need to make lookup to another database table.
 Is this even possible?

Yes, using just the syntax you have: db.table

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