RE: View hidden temporary files

2006-09-08 Thread informatica
Thanks. That works for me.

-Mensaje original-
De: Dan Nelson [mailto:[EMAIL PROTECTED] 
Enviado el: jueves, 07 de septiembre de 2006 19:05
Para: [EMAIL PROTECTED]
CC: MySql Mail List
Asunto: Re: View hidden temporary files

In the last episode (Sep 07), [EMAIL PROTECTED] said:
> In http://dev.mysql.com/doc/refman/4.1/en/temporary-files.html says 
> 
> "MySQL creates all temporary files as hidden files. This ensures that
> the temporary files are removed if mysqld is terminated. The
> disadvantage of using hidden files is that you do not see a big
> temporary file that fills up the filesystem in which the temporary
> file directory is located."
> 
> Is there any form of see the length of the temporary files created by
> MySQL?

If you install the lsof program, you can ask it to print all
filehandles opened by mysql with a link count less than one (i.e.
deleted but still-open files):

$ lsof -c mysqld -a +L1

mysqld  70195 mysql   45u  VREG  0,120 463317867 0 12500 /usr
(/dev/da0s1f)
mysqld  70195 mysql   46u  VREG  0,120 132005329 0 12520 /usr
(/dev/da0s1f)

-- 
Dan Nelson
[EMAIL PROTECTED]

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



RV: View hidden temporary files

2006-09-08 Thread iagosineiro

Thanks. That works for me.

-Mensaje original-
De: Dan Nelson [mailto:[EMAIL PROTECTED] 
Enviado el: jueves, 07 de septiembre de 2006 19:05
Para: [EMAIL PROTECTED]
CC: MySql Mail List
Asunto: Re: View hidden temporary files

In the last episode (Sep 07), [EMAIL PROTECTED] said:
> In http://dev.mysql.com/doc/refman/4.1/en/temporary-files.html says 
> 
> "MySQL creates all temporary files as hidden files. This ensures that
> the temporary files are removed if mysqld is terminated. The
> disadvantage of using hidden files is that you do not see a big
> temporary file that fills up the filesystem in which the temporary
> file directory is located."
> 
> Is there any form of see the length of the temporary files created by
> MySQL?

If you install the lsof program, you can ask it to print all
filehandles opened by mysql with a link count less than one (i.e.
deleted but still-open files):

$ lsof -c mysqld -a +L1

mysqld  70195 mysql   45u  VREG  0,120 463317867 0 12500 /usr
(/dev/da0s1f)
mysqld  70195 mysql   46u  VREG  0,120 132005329 0 12520 /usr
(/dev/da0s1f)

-- 
Dan Nelson
[EMAIL PROTECTED]

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



__ 
LLama Gratis a cualquier PC del Mundo. 
Llamadas a fijos y móviles desde 1 céntimo por minuto. 
http://es.voice.yahoo.com


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



MySQL C API: dedicated per-connections in the mutlithreading program

2006-09-08 Thread Andrew W. Nosenko

Sorry, but documentation on the MySQL C API say nothing about many
interesting questions.

The one of them: is it safe (or unsafe) to use non-MT client library
(libmysqlclient.*, as opposite to the MT-aware libmysqlclient_r.*) for
the multithreading programs in case when every parallel mysql
connection (MYSQL*) lives in the own thread, is not shared between
threads and doesn't migrates between threads.  Just born in the own
thread, lives in the same own thread and dies in the own thread?  Of
course, queries (select/insert/delete/..., both using "plain old"
mysql_real_query() and prepared prepared statements, using
transactions and not) may be executed in the one and the same time in
the different threads.

Second question: the same as first but for case when connections may
migrate between threads -- born in the one thread, used in the second,
dies in third... but anyway at the one time the one connection is used
by the only one thread.  At the next time it may be another but,
again, only one thread.

--
Andrew W. Nosenko <[EMAIL PROTECTED]>

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



Re: MySQL C API: dedicated per-connections in the mutlithreading program

2006-09-08 Thread Philippe Poelvoorde

2006/9/8, Andrew W. Nosenko <[EMAIL PROTECTED]>:

Sorry, but documentation on the MySQL C API say nothing about many
interesting questions.

The one of them: is it safe (or unsafe) to use non-MT client library
(libmysqlclient.*, as opposite to the MT-aware libmysqlclient_r.*) for
the multithreading programs in case when every parallel mysql
connection (MYSQL*) lives in the own thread, is not shared between
threads and doesn't migrates between threads.  Just born in the own
thread, lives in the same own thread and dies in the own thread?  Of
course, queries (select/insert/delete/..., both using "plain old"
mysql_real_query() and prepared prepared statements, using
transactions and not) may be executed in the one and the same time in
the different threads.

Second question: the same as first but for case when connections may
migrate between threads -- born in the one thread, used in the second,
dies in third... but anyway at the one time the one connection is used
by the only one thread.  At the next time it may be another but,
again, only one thread.


Well the only precaution you need for MT program regarding mysql
client lib, is to do a mysql_thread_init() and mysql_thread_end(); and
yes you should do it for every thread.
do you have a special requirement to use libmysql instead of
libmysql_r ? I would guess there is some global variables or system
calls that might fails with the non-MT version.

--
http://www.myspace.com/sakuradrop : credit runs faster
http://www.w-fenec.org/  Rock Webzine

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



Re: MySQL C API: dedicated per-connections in the mutlithreading program

2006-09-08 Thread Andrew W. Nosenko

On 9/8/06, Philippe Poelvoorde <[EMAIL PROTECTED]> wrote:

2006/9/8, Andrew W. Nosenko <[EMAIL PROTECTED]>:
> Sorry, but documentation on the MySQL C API say nothing about many
> interesting questions.
>
> The one of them: is it safe (or unsafe) to use non-MT client library
> (libmysqlclient.*, as opposite to the MT-aware libmysqlclient_r.*) for
> the multithreading programs in case when every parallel mysql
> connection (MYSQL*) lives in the own thread, is not shared between
> threads and doesn't migrates between threads.  Just born in the own
> thread, lives in the same own thread and dies in the own thread?  Of
> course, queries (select/insert/delete/..., both using "plain old"
> mysql_real_query() and prepared prepared statements, using
> transactions and not) may be executed in the one and the same time in
> the different threads.
>
> Second question: the same as first but for case when connections may
> migrate between threads -- born in the one thread, used in the second,
> dies in third... but anyway at the one time the one connection is used
> by the only one thread.  At the next time it may be another but,
> again, only one thread.

Well the only precaution you need for MT program regarding mysql
client lib, is to do a mysql_thread_init() and mysql_thread_end(); and
yes you should do it for every thread.
do you have a special requirement to use libmysql instead of
libmysql_r ?


The necessity to call these functions is very inconvenient if creating
and/or shutdown of threads is out of your control.

Call mysql_thread_begin() at the start of every function and
mysql_thread_end() before return?...  Yes, I can, but it efficiently
just removes the sense of the thread-private variables and slows down
the process.  Moreover, first that does mysql_thread_init() on the
POSIX systems is locking of the global mutex.  For what?  Why do not
do it _after_ pthread_getspecific() (on the POSIX systems, of course)?

Therefore I expect increasing of the speed and decreasing of the
complexity by declining the use of libmysqlclient_r.


I would guess there is some global variables or system
calls that might fails with the non-MT version.


I guess something like that also.  And this guess is the reason of the
my question.  I don't want to guess...  I want to know :-)

--
Andrew W. Nosenko <[EMAIL PROTECTED]>

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



RE: where are the .MYI and .MYD files?

2006-09-08 Thread Fred Ballard

> > I've copied the data files in a flash memory and tried to 
> see the tables

> [EMAIL PROTECTED] and then [EMAIL PROTECTED] wrote:

> > fields in another computer with the same server version and 
> platform and
> > get the "db_name.tb_name table doesn't exist" error 
> message. However when
> > I run the show tables command, the command line shows me 
> the list of the
> > tables...
> 
> I believe SHOW TABLES only needs to see a .frm file to believe that a 
> table exists.

Having experienced these problems, and more, related to copying InnoDB files 
around I'd like to add a few other things.

At a minimum, for an InnoDB database you also need to copy the ibdata1 file 
from the parent directory of where your .frm files are
located.

Also, the .frm files and ibdata1 files for the InnoDB should be from the same 
CREATE.  I believe the ibdata1 file as well as the
.frm files contain -- ironically, since the whole point of databases is  to 
avoid redundant data -- redundant schema-related
information.  If they are not in sync the mapping between the .frm and ibdata1 
information will probably thoroughly mess up your
access to the underlying stored database data.

Fred


> -Original Message-
> From: Paul DuBois [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, September 07, 2006 5:49 PM
> To: [EMAIL PROTECTED]
> Cc: mysql@lists.mysql.com
> Subject: Re: where are the .MYI and .MYD files?
> 
> [EMAIL PROTECTED] wrote:
> > I've installed MySQL, created a database and tables and 
> then loaded fields
> > into them. I use the command line client and can see the 
> fields, use the
> > select command and every thing is OK, but when I look for 
> the table files
> > in the data directory, only the .frm ones appear, not the 
> .MYI or MYD.
> > Where could they be?.
> 
> If you see the .frm files but no .MYI/.MYD files, that suggests that 
> your tables are not MyISAM tables. Try "SHOW CREATE TABLE 
> tbl_name" for 
> some value of tbl_name. Look for the ENGINE = option near the 
> end of the 
> statement.  Perhaps when you installed MySQL, you selected 
> InnoDB as the 
> default table type.
> 
> 
> 
> -- 
> 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]



INNODB my.cnf

2006-09-08 Thread prasad.ramisetti

Hi All,

I need some inputs regarding my.cnf  :

We are using INNODB in our application.We have around 10 million records
in the database. This will size up to around 10GB of data.

Could you please suggest a sample my.cnf for this configuration.

Machine used :

Sun netra 240 , dual processor machine with 2 GB ram

Mysql version :

5.1.11

Regards
Prasad



The information contained in this electronic message and any attachments to 
this message are intended for the exclusive use of the addressee(s) and may 
contain proprietary, confidential or privileged information. If you are not the 
intended recipient, you should not disseminate, distribute or copy this e-mail. 
Please notify the sender immediately and destroy all copies of this message and 
any attachments.

WARNING: Computer viruses can be transmitted via email. The recipient should 
check this email and any attachments for the presence of viruses. The company 
accepts no liability for any damage caused by any virus transmitted by this 
email.

www.wipro.com

RE: Decimal versus Float Point Type

2006-09-08 Thread Jerry Schwartz
Two famous (if apocryphal) stories and a more serious contribution:

A bank decided that it would truncate, rather than round, when doing
interest calculations. They decided that no one would ever miss the average
half-cent. They reckoned without all of the people who had certificates that
paid exactly $100 dollars a month, and who screamed bloody murder when the
got $99.99 instead.

Second story:

An employee of a financial institution realized a similar vulnerability in
their systems. It was common to calculate batch totals, which were cross
checked to make sure that no transactions went astray, but he realized that
so long as the batch totals came out right you could move money from one
transaction to another. He programmed in a fraction-shaving scheme like the
one above, only he shifted the missing fraction of a cent into his own
account.

On a more serious note, there are other ways to deal with these issues. One
is to maintain all amounts in cents, rather than in dollars. This avoids the
rounding problem, so long as you use a floating point type with enough
precision; but it doesn't work well if you are exchanging currencies. Even
if you are using decimal data types, you have to be very careful about your
precision if you will be using the same field to hold different currencies.
A field designed with euros in mind might not hold the equivalent amount in
yen.

Holding currency amounts in double- or extended-precision floating point
values avoids the overflow problem for any reasonable amount, but now you're
back to the rounding issue caused by the fact that .01 is not exactly
representable as a binary fraction.


Regards,

Jerry Schwartz
Global Information Incorporated
195 Farmington Ave.
Farmington, CT 06032

860.674.8796 / FAX: 860.674.8341

-Original Message-
From: Renato Golin [mailto:[EMAIL PROTECTED]
Sent: Thursday, September 07, 2006 6:40 PM
To: Gerald L. Clark
Cc: mysql@lists.mysql.com
Subject: Re: Decimal versus Float Point Type


> How do you expect to split a dollar 3 ways?

Sorry, I should have added more smiles, it was supposed to be a joke about
the dollars... ;)

But still, I could win a lot of money by distributing people's money to
their three kids and getting 1 cent out of every operation. :D




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



Re: Decimal versus Float Point Type

2006-09-08 Thread Renato Golin

Jerry Schwartz wrote:

An employee of a financial institution realized a similar vulnerability in
their systems. It was common to calculate batch totals, which were cross
checked to make sure that no transactions went astray, but he realized that
so long as the batch totals came out right you could move money from one
transaction to another. He programmed in a fraction-shaving scheme like the
one above, only he shifted the missing fraction of a cent into his own
account.


This is famous. I was never sure if this was a very good hoax or a true 
story but indeed it was quite possible sometime ago. I have a great one 
that has nothing to do with rounding numbers but is equally good:


Long before computers were used all over the globe one guy figured out 
that the transaction list was shared between two branches via one person 
taking the list in a paper. The guy then made a load of $1mi, deposited 
in his account, waited a few days and went to the first branch to 
withdraw the money, he got his balance and there was $1mi on his 
account. After he get his money (cash) he run to the second branch 
before the paper guy and got another balance, which was still showing 
the $1mi.


The bank was never able to prove him guilty of taking $2mi from his 
account while he had only $1mi.




Holding currency amounts in double- or extended-precision floating point
values avoids the overflow problem for any reasonable amount, but now you're
back to the rounding issue caused by the fact that .01 is not exactly
representable as a binary fraction.


I had problems with super-mega-huge-double precision fields and money 
manipulation. I always use integers for money no matter what the vendor 
say to me about they're precision. And I always use at least three 
decimal places and round them at the end because integers truncate 
instead of round.


If I'd need to convert currencies I would go for 4 or more decimal 
places, depending on which currencies I needed.



cheers,
--renato

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



Restarting MySQL on Solaris 8?

2006-09-08 Thread Jay Paulson
A couple questions since I'm not a Solaris person I really don't know how to
do the following and was hoping that someone could help me out (Google isn't
much help on this).

How does one start the MySQL daemon on Solaris 8? (it's running MySQL
3.23.49)

How does one tell Solaris 8 to start the MySQL daemon on boot?

Lastly, tried running /usr/local/bin/safe_mysqld but got the following
error:

 mysqld ended

Thanks for any help!

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



make mysqldump to sort columns alphabetically

2006-09-08 Thread Nikita Tovstoles

Hi,

I'm diffing two versions of a schema produced using mysqldump and would 
like to know if there's a way to make mysqldump sort entries inside 
CREATE statements (say alphabetically or in some other way)? Currently 
some of the column declarations are juxtaposed between the versions and 
thus produce "false" diffs.


Mysql 5.0, InnoDB

thanks a lot
-nikita


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



Re: make mysqldump to sort columns alphabetically

2006-09-08 Thread Douglas Sims
One way you could solve this is to conform the column orders between  
the two versions.


For example, if one table, t6, has columns id, name, and address and  
the same table in the second database is id, address, name, you could  
just ALTER the second database t6 table to be id, name, address:


mysql> describe t6;
+-+-+--+-+-+---+
| Field   | Type| Null | Key | Default | Extra |
+-+-+--+-+-+---+
| id  | int(9)  | NO   | PRI | 0   |   |
| address | varchar(32) | YES  | | |   |
| name| varchar(32) | YES  | MUL | |   |
+-+-+--+-+-+---+
3 rows in set (0.00 sec)

mysql> alter table t6 change column address address varchar(32) after  
name;

Query OK, 0 rows affected (0.02 sec)
Records: 0  Duplicates: 0  Warnings: 0

mysql> describe t6;
+-+-+--+-+-+---+
| Field   | Type| Null | Key | Default | Extra |
+-+-+--+-+-+---+
| id  | int(9)  | NO   | PRI | 0   |   |
| name| varchar(32) | YES  | MUL | |   |
| address | varchar(32) | YES  | | |   |
+-+-+--+-+-+---+
3 rows in set (0.00 sec)

Here is the mysql documentation on ALTER TABLE: http://dev.mysql.com/ 
doc/refman/5.0/en/alter-table.html




Douglas Sims
[EMAIL PROTECTED]



On Sep 8, 2006, at 12:27 PM, Nikita Tovstoles wrote:


Hi,

I'm diffing two versions of a schema produced using mysqldump and  
would like to know if there's a way to make mysqldump sort entries  
inside CREATE statements (say alphabetically or in some other way)?  
Currently some of the column declarations are juxtaposed between  
the versions and thus produce "false" diffs.


Mysql 5.0, InnoDB

thanks a lot
-nikita


--
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: make mysqldump to sort columns alphabetically

2006-09-08 Thread Nikita Tovstoles

Thanks, Douglas!

That seems OK, but I'd prefer to avoid altering the schemas in any way. 
In particular altering order of constraints seems error-prone, given 
that one is essentially re-defining these, not simply rearranging the 
order. Am I asking for impossible? ;-


-nikita

Douglas Sims wrote:
One way you could solve this is to conform the column orders between 
the two versions.


For example, if one table, t6, has columns id, name, and address and 
the same table in the second database is id, address, name, you could 
just ALTER the second database t6 table to be id, name, address:


mysql> describe t6;
+-+-+--+-+-+---+
| Field   | Type| Null | Key | Default | Extra |
+-+-+--+-+-+---+
| id  | int(9)  | NO   | PRI | 0   |   |
| address | varchar(32) | YES  | | |   |
| name| varchar(32) | YES  | MUL | |   |
+-+-+--+-+-+---+
3 rows in set (0.00 sec)

mysql> alter table t6 change column address address varchar(32) after 
name;

Query OK, 0 rows affected (0.02 sec)
Records: 0  Duplicates: 0  Warnings: 0

mysql> describe t6;
+-+-+--+-+-+---+
| Field   | Type| Null | Key | Default | Extra |
+-+-+--+-+-+---+
| id  | int(9)  | NO   | PRI | 0   |   |
| name| varchar(32) | YES  | MUL | |   |
| address | varchar(32) | YES  | | |   |
+-+-+--+-+-+---+
3 rows in set (0.00 sec)

Here is the mysql documentation on ALTER TABLE: 
http://dev.mysql.com/doc/refman/5.0/en/alter-table.html




Douglas Sims
[EMAIL PROTECTED]



On Sep 8, 2006, at 12:27 PM, Nikita Tovstoles wrote:


Hi,

I'm diffing two versions of a schema produced using mysqldump and 
would like to know if there's a way to make mysqldump sort entries 
inside CREATE statements (say alphabetically or in some other way)? 
Currently some of the column declarations are juxtaposed between the 
versions and thus produce "false" diffs.


Mysql 5.0, InnoDB

thanks a lot
-nikita


--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]





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



Shell

2006-09-08 Thread Pastor Steve
Greetings,

Does anyone know how I can set up my shell so that the mysql command works
without navigating to the directory? I am using Mac OS 10.2.8 and 10.4

shell> mysql ­u name ­p

??

Thanks,

--
Steve Marquez


RE: Adding and Removing tables from MERGE tables dynamically

2006-09-08 Thread Jacob, Raymond A Jr
 Thanks for the information.
I want to make sure that I understand: Do you run ALTER TABLE command
 on a live database(table) that is doing inserts;
Or, do you stop accepting Remote connections, flush the tables, run the
ALTER TABLE command,
 start accepting connections?

Thank you,
Raymond

-Original Message-
From: Brent Baisley [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, September 06, 2006 10:24
To: Jacob, Raymond A Jr; mysql@lists.mysql.com
Subject: Re: Adding and Removing tables from MERGE tables dynamically

I've got a similar setup, total records across about 8 tables hoovers
around 200 million.

To change a merge table just issue an alter table with a new union.
ALTER TABLE mergetable UNION=(table1, table2, table3,...);


- Original Message -
From: "Jacob, Raymond A Jr" <[EMAIL PROTECTED]>
To: 
Sent: Tuesday, September 05, 2006 5:29 PM
Subject: Adding and Removing tables from MERGE tables dynamically


Problem: I use two applications one called snort, the client that
inserts data into eleven(11) tables.
The other application BASE joins the tables into one table. When the
tables become 4GB in size,
  deleting records for one month becomes unbearably slow(20-30days). The
search(Select ) is slow too but that
 is a problem with  the BASE application. 
I thought that using MERGE tables would allow an administrator to create
a monthly table, using the original table names, composed of daily or
weekly
 tables, by appending the date of creation to the table i.e.
data_table1_-MM-DD and join_table_-MM-DD. From the
documentation:
 creating the table with INSERT_METHOD = FIRST results in INSERTs being
done to first table in the MERGE UNION statement.
 I will assume that the first table is the latest table.

So one of the first tables should look like:
CREATE TABLE  original_table
 {
...
  } TYPE = MERGE UNION = (data_table1_2006-09-12
,data_table1_2006-09-05)

Using cron and depending on the interval chosen daily, weekly,
bi-weekly, monthly, quarterly, or yearly at the start
 of a new interval,  a new table would be created with current date in
the -MM-DD format. 
For example: if the start of new interval begins a week from today on
2006-09-12. At 12:00am on 
2006-09-12, a script would create new tables that would look like:

CREATE TABLE  data_table1_2006-09-12
{
...
}

One the MERGE TABLES  should look like:

CREATE TABLE  original_table
 {
...
  } TYPE = MERGE UNION = (data_table1_2006-09-12
,data_table1_2006-09-05)

   
On every Tuesday(in this case) from now on, new tables are created
ending with date in the format -MM-DD
 and merged into the original table.

So that by  2006-09-30, one of the MERGE tables should look something
like
...
} TYPE = MERGE UNION = (data_table1_2006-09-26, data_table1_2006-09-19,
data_table1_2006-09-12, data_table1_2006-09-05)


On 2006-10-05 at 00:00hrs  the newest table data_table1_2006-10-05
should be created and merged into the original_table. The oldest table
in this case data_table1_2006-09-05 should be removed from one of the
MERGE tables in this case original_table. The resulting merge table
should look something like
...
} TYPE = MERGE UNION = (data_table1_2006-10-05,data_table1_2006-09-26,
data_table1_2006-09-19, data_table1_2006-09-12)


Question: How does one add data_table1_2006-09-12  to original_table
dynamically?

Question:  How does one remove data_table1_2006-09-05 from the
original_table dynamically?

Question:  In other words, can tables be added and removed dynamically
to/from a MERGE TABLE?

Benefit: I hope is to archive individual tables. When I need to review
old data I will use a copy of the BASE application, then
Merge the tables that I am interested in, in order to search smaller
tables without changing the BASE application.

Question: Is this possible. Do these question make sense?



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



RE: make mysqldump to sort columns alphabetically

2006-09-08 Thread Fan, Wellington
Nikita,

Try somehting like this:

mysql -hHOST -uUSER -pPASS -s -e'show tables' DATABASE | \
tail +1 | \
while read TABLE
do
echo == $TABLE ==
mysql -s -pwmihp -e"describe $TABLE" articles | sort
Done

I used the "tail +1" to trim out the header row -- tho I think there is
an option to make output less verbose.


 

> -Original Message-
> From: Nikita Tovstoles [mailto:[EMAIL PROTECTED] 
> Sent: Friday, September 08, 2006 2:00 PM
> To: mysql@lists.mysql.com
> Subject: Re: make mysqldump to sort columns alphabetically
> 
> Thanks, Douglas!
> 
> That seems OK, but I'd prefer to avoid altering the schemas 
> in any way. 
> In particular altering order of constraints seems 
> error-prone, given that one is essentially re-defining these, 
> not simply rearranging the order. Am I asking for impossible? ;-
> 
> -nikita
> 
> Douglas Sims wrote:
> > One way you could solve this is to conform the column 
> orders between 
> > the two versions.
> >
> > For example, if one table, t6, has columns id, name, and 
> address and 
> > the same table in the second database is id, address, name, 
> you could 
> > just ALTER the second database t6 table to be id, name, address:
> >
> > mysql> describe t6;
> > +-+-+--+-+-+---+
> > | Field   | Type| Null | Key | Default | Extra |
> > +-+-+--+-+-+---+
> > | id  | int(9)  | NO   | PRI | 0   |   |
> > | address | varchar(32) | YES  | | |   |
> > | name| varchar(32) | YES  | MUL | |   |
> > +-+-+--+-+-+---+
> > 3 rows in set (0.00 sec)
> >
> > mysql> alter table t6 change column address address 
> varchar(32) after
> > name;
> > Query OK, 0 rows affected (0.02 sec)
> > Records: 0  Duplicates: 0  Warnings: 0
> >
> > mysql> describe t6;
> > +-+-+--+-+-+---+
> > | Field   | Type| Null | Key | Default | Extra |
> > +-+-+--+-+-+---+
> > | id  | int(9)  | NO   | PRI | 0   |   |
> > | name| varchar(32) | YES  | MUL | |   |
> > | address | varchar(32) | YES  | | |   |
> > +-+-+--+-+-+---+
> > 3 rows in set (0.00 sec)
> >
> > Here is the mysql documentation on ALTER TABLE: 
> > http://dev.mysql.com/doc/refman/5.0/en/alter-table.html
> >
> >
> >
> > Douglas Sims
> > [EMAIL PROTECTED]
> >
> >
> >
> > On Sep 8, 2006, at 12:27 PM, Nikita Tovstoles wrote:
> >
> >> Hi,
> >>
> >> I'm diffing two versions of a schema produced using mysqldump and 
> >> would like to know if there's a way to make mysqldump sort entries 
> >> inside CREATE statements (say alphabetically or in some other way)?
> >> Currently some of the column declarations are juxtaposed 
> between the 
> >> versions and thus produce "false" diffs.
> >>
> >> Mysql 5.0, InnoDB
> >>
> >> thanks a lot
> >> -nikita
> >>
> >>
> >> --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]
> >
> 
> 
> --
> 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]



Attn: Brad Jahnke

2006-09-08 Thread Brian Fox
Hi Brad,
 
I don't expect that you will specifically remember me, but we have had "tech
help" emails back and forth in the past regarding my sites at Zettai.net.
I'm unable to locate a "zettai" email for you (not even sure if you are
still affiliated with Zettai) so have found this address from Google and am
hoping it will get to you.
 
I'm currently trying to resolve a situation with Mr. Donnelly...he is not
responding to any of my emails or voicemails. There is no one else I can
contact, so am hoping you may be able to advocate my case, which I am
prepared to fully and completely explain, either by email or phone call. 
 
Please appreciate that I am aware Mr. Donnelly will have his version of
events. I ask that, if you are in a position to influence a resolve, you
would entertain my side of the story prior to reaching a conclusion.
 
Mr. Donnelly has terminated three Plone websites that I operate...all in a
volunteer capacity (I receive absolutely no remuneration): two for police
organizations and one for my church. I am desperately trying to resolve the
situation in order to re-activate these sites. (stedwardsduncan.com,
vcpunion.com and bcfedpolice.com)
 
If you are able to offer any insight whatsoever, I would be most
appreciative. I'm grasping at straws right now. I sincerely want to resolve
this issue and continue being a Zettai customer but very reluctantly, don't
think this will be possible. Do you have a Plone hosting alternative if you
are no longer associated to Zettai.net? (and I draw  this conclusion because
George has remove the email link from your name on the "About" page)
 
Thanks in advance...I appreciate anything you can do or suggest.
 
Sincerely,
 
Brian Fox, MBA

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.405 / Virus Database: 268.12.2/441 - Release Date: 9/7/2006