Re: MySQL could not support bit storage?

2009-05-11 Thread Moon's Father
Thanks for your sincerely reply. On Mon, May 11, 2009 at 11:04 PM, Baron Schwartz wrote: > On Sun, May 10, 2009 at 10:12 PM, Moon's Father > wrote: > > Hi. > > MySQL only has one datatype called bit, but its smallest storage is one > > byte. > > How to save a bit on disk, but not a byte? > >

Re: mysql-bin maintenance

2009-05-11 Thread edberg
On Mon, May 11, 2009 6:41 pm, Rilawich Ango wrote: > Hi, > In the master database, there are plenty of mysql-bin.X. It > occupied almost all the disk space. As I know, the files should be removed > by issuing reset master. Below are my questions. -Do I need to stop > replication before issuing r

mysql-bin maintenance

2009-05-11 Thread Rilawich Ango
Hi, In the master database, there are plenty of mysql-bin.X. It occupied almost all the disk space. As I know, the files should be removed by issuing reset master. Below are my questions. -Do I need to stop replication before issuing reset master? If yes, do I need to rebuild the replication

RE: Merging Databases

2009-05-11 Thread Andrew Braithwaite
If you are merging table A and table B and say, table A's auto-increment id is up to 2000, just pick a nice round number like 3000 and add it to the auto-increment ID column of table B with something like this: UPDATE tableB SET id = id + 3000; Then do the same to all the fields in other tables t

Re: Merging Databases

2009-05-11 Thread Chris Clarke
On 11-May-09, at 2:09 PM, Johnny Withers wrote: We don't want to use a view because then this database will not be consistent with the others. We can't simply use a select from .. insert into because when we renumber table1's ID column, items in table2 and 3 and so on may link to the ID colu

Re: Merging Databases

2009-05-11 Thread Johnny Withers
We don't want to use a view because then this database will not be consistent with the others. We can't simply use a select from .. insert into because when we renumber table1's ID column, items in table2 and 3 and so on may link to the ID column in that table. So we need to update the ID column in

RE: Merging Databases

2009-05-11 Thread Weston, Craig (OFT)
-Original Message- From: Johnny Withers [mailto:joh...@pixelated.net] Sent: Monday, May 11, 2009 3:30 PM To: MySQL General List Subject: Merging Databases Hi, I have a lot of databases that have the exact same tables and each table has the exact same column structure. I'm looking at merg

Merging Databases

2009-05-11 Thread Johnny Withers
Hi, I have a lot of databases that have the exact same tables and each table has the exact same column structure. I'm looking at merging two of these databases together into a single database (Company A bought Company B and wants the data from A combined into B now). I've been tossing around the i

CLI custom prompt redraw history issue

2009-05-11 Thread cam
I use a custom prompt of: \n\U:mysql-\v[\l]\n\d>\_ on 5.1.32 Source distribution in the CLI. The problem I'm noticing is that when I have a multi-line prompt, my history provided with the up arrow can't compensate for the length of the prompt string and can't correctly redraw my previous history st

Re: MySQL could not support bit storage?

2009-05-11 Thread Baron Schwartz
On Sun, May 10, 2009 at 10:12 PM, Moon's Father wrote: >  Hi. >   MySQL only has one datatype called bit, but its smallest storage is one > byte. > How to save a bit on disk, but not a byte? In some cases, CHAR(0) NULL can actually use one bit on disk. You either store the empty string '', or yo

store paths and Filenames in MySql

2009-05-11 Thread Brian Boothe
is there a way i can traverse a directory on my server,in php and then have the paths Be Saved as \\server1\projects\ ... etc and actually store the filenames "NOT the files" and paths in mysql ? thanks for any help -- MySQL General Mailing List For list archives: http://lists.mysql.c

Re: Unix compress equivalent

2009-05-11 Thread Olaf Stein
Thanks This is exactly what I needed Olaf On 5/11/09 7:15 AM, "Janek Bogucki" wrote: > Hi Olaf, > > If you only need to compress the column *while* loading it from the csv file > then use load data infile with a user variable to do the compression at load > time,. > > mysql> create table t(u

Re: Unix compress equivalent

2009-05-11 Thread Janek Bogucki
Hi Olaf, If you only need to compress the column *while* loading it from the csv file then use load data infile with a user variable to do the compression at load time,. mysql> create table t(uncompressed varchar(4000), compressed varbinary(1000)); Query OK, 0 rows affected (0.07 sec) mysql> \