Security issues

2010-05-21 Thread Rob Wultsch
Given the rather serious recent bug fixes I have been thinking a good
bit about security. Does MySQL AB/Sun/Oracle maintain a page similar
to http://www.postgresql.org/support/security.html which lists
security issues and what releases they effected?

-- 
Rob Wultsch
wult...@gmail.com

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: Mysqltest Unknown system variable, failed: 1193

2010-05-21 Thread Meng-Ju, Hsieh

Thank for your reply.

I've also tried the configure option - '--enable-debug-sync',
but it cannot work with message - ' configure: WARNING: unrecognized 
options: --enable-debug-sync '.


I've also tried configure option - '--with-debug=full',
it can configure and no-warring message.
When i completed total install operation,
it still cannot support the system variable - DEBUG_SYNC.

I tried use the url - 
'http://forge.mysql.com/wiki/MySQL_Internals_Test_Synchronization#Debug_Sync_Implementation'

and tried other related webpage, but it still cannot work.

I not found the file - include/have_debug_sync.inc,
so i build it myself - reference older version.
It still cannot work.

I guess that mysql don't support the system variable - 'DEBUG_SYNC',
but i'm not sure that thinking is correct.


Thank you very much.



- Original Message - 
From: "Joerg Bruehe" 

To: "Meng-Ju, Hsieh" 
Cc: 
Sent: Saturday, May 22, 2010 12:35 AM
Subject: Re: Mysqltest Unknown system variable, failed: 1193


Hi!


Meng-Ju, Hsieh wrote:

Thank for your reply.

I've tried to use Version 5.1, but it cannot work.
Did you have used the system variable - 'DEBUG_SYNC' ?


I don't know what you are doing exactly, but I guess you are not using
the correct options in your call to "configure".

"DEBUG_SYNC" is a tool used for internal debugging, and according to
"configure.in" it requires the server to be configured for debugging
initially - see these lines from current 5.1 "configure.in":

1732 # Debug Sync Facility. NOTE: depends on 'with_debug'. Must be
behind it.
1733 AC_MSG_CHECKING(if Debug Sync Facility should be enabled.)
1734 AC_ARG_ENABLE(debug_sync,
1735   AS_HELP_STRING([--enable-debug-sync],
1736  [Build a version with Debug Sync
Facility]),
1737   [ enable_debug_sync=$enableval ],
1738   [ enable_debug_sync=$with_debug ])
1739
1740 if test "$enable_debug_sync" != "no"
1741 then
1742   AC_DEFINE([ENABLED_DEBUG_SYNC], [1],
1743 [If Debug Sync Facility should be enabled])
1744   AC_MSG_RESULT([yes])
1745 else
1746   AC_MSG_RESULT([no])
1747 fi

So you need to use
 configure ... --with-debug ... --enable-debug-sync ...
if you really want to do something using "DEBUG_SYNC".

I noticed that the text in the Wiki reads a bit different, I can't tell
which one is right. I myself don't need "DEBUG_SYNC" in my work.


Regards,
Jörg

--
Joerg Bruehe,  MySQL Build Team,  joerg.bru...@sun.com
Sun Microsystems GmbH,   Komturstrasse 18a,   D-12099 Berlin
Geschaeftsfuehrer: Juergen Kunz
Amtsgericht Muenchen: HRB161028


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=eric7...@gmail.com



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



MySQL Server 5.0.91 has been released

2010-05-21 Thread Joerg Bruehe
Dear MySQL users,

MySQL Community Server 5.0.91, a new version of the popular Open Source
Database Management System, has been released.
Please note that the active maintenance of 5.0 has ended,and these
community builds are only provided because of the fixes to security bugs
# 50974, 53237, and 53371 as described below.

The release is now available in source and binary form for a number of
platforms from our archive download page at

   http://downloads.mysql.com/archives.php?p=mysql-5.0&v=5.0.91

Mirror service for MySQL server 5.0 has ended.
Also, support for some platforms with very low demand has ended.

Please bear in mind that MySQL 5.0 now receives extended support only,
and that all active development is happening on MySQL 5.1, 5.5, and
beyond. You will find the MySQL Lifecycle policy here:

http://www.mysql.de/about/legal/lifecycle/

For your own best interest, we strongly recommend all current users of
MySQL 5.0 to upgrade to either MySQL 5.1 (current production release) or
MySQL 5.5 (pre-production release, adding new features in beta quality).

We welcome and appreciate your feedback, bug reports, bug fixes,
patches etc.:

http://forge.mysql.com/wiki/Contributing

This section documents all changes and bugfixes that have been
applied since the last MySQL Community Server release (5.0.90).

http://dev.mysql.com/doc/refman/5.0/en/news-5-0-91.html

If you would like to receive more fine-grained and personalized
update alerts about fixes that are relevant to the version and
features you use, please consider subscribing to MySQL Enterprise
(a commercial MySQL offering). For more details please see
http://www.mysql.com/products/enterprise/advisors.html.

Enjoy!

On behalf of the MySQL Build Team,
Jörg Brühe



Changes in MySQL 5.0.91 (05 May 2010)

Bugs fixed:

  * Security Fix: The server failed to check the table name
   argument of a COM_FIELD_LIST command packet for validity
   and compliance to acceptable table name standards. This
   could be exploited to bypass almost all forms of checks
   for privileges and table-level grants by providing a
   specially crafted table name argument to COM_FIELD_LIST.
   In MySQL 5.0 and above, this allowed an authenticated
   user with SELECT privileges on one table to obtain the
   field definitions of any table in all other databases and
   potentially of other MySQL instances accessible from the
   server's file system.
   Additionally, for MySQL version 5.1 and above, an
   authenticated user with DELETE or SELECT privileges on
   one table could delete or read content from any other
   table in all databases on this server, and potentially of
   other MySQL instances accessible from the server's file
   system.
   (Bug#53371: http://bugs.mysql.com/bug.php?id=53371,
   CVE-2010-1848
   (http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2010-1848))

 * Security Fix: The server was susceptible to a
   buffer-overflow attack due to a failure to perform bounds
   checking on the table name argument of a COM_FIELD_LIST
   command packet. By sending long data for the table name,
   a buffer is overflown, which could be exploited by an
   authenticated user to inject malicious code.
   (Bug#53237: http://bugs.mysql.com/bug.php?id=53237,
   CVE-2010-1850
   (http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2010-1850))

 * Security Fix: The server could be tricked into reading
   packets indefinitely if it received a packet larger than
   the maximum size of one packet.
   (Bug#50974: http://bugs.mysql.com/bug.php?id=50974,
   CVE-2010-1849
   (http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2010-1849))

 * The optimizer could attempt to evaluate the WHERE clause
   before any rows had been read, resulting in a server
   crash.
   (Bug#52177: http://bugs.mysql.com/bug.php?id=52177)

 * On Windows, LOAD_FILE() could cause a crash for some
   pathnames.
   (Bug#51893: http://bugs.mysql.com/bug.php?id=51893)

 * Use of HANDLER statements with tables that had spatial
   indexes caused a server crash.
   (Bug#51357: http://bugs.mysql.com/bug.php?id=51357)

 * With an XA transaction active, SET autocommit = 1 could
   cause side effects such as memory corruption or a server
   crash.
   (Bug#51342: http://bugs.mysql.com/bug.php?id=51342)

 * The SSL certificates in the test suite were about to
   expire. They have been updated with expiration dates in
   the year 2015.
   (Bug#50642: http://bugs.mysql.com/bug.php?id=50642)

 * For debug builds, an assertion was incorrectly raised in
   the optimizer when matching ORDER BY expressions.
   (Bug#50335: http://bugs.mysql.com/bug.php?id=50335)

 * The filesort sorting method applied to a CHAR(0) column
   could lead to a server crash.
   (Bug#49897: http://bugs.mysql.com/bug.php?id=49897)

 * sql_buffer_result had an effect on non-SELECT statements,
   contrary to the documentation.
   (Bug#49552: http://bugs.mysql.com/bug.php?id=49552)

 * EXPLAIN EXTENDED crashed trying to print column names for
   a subq

MySQL Community Server 5.1.47 has been released

2010-05-21 Thread Hery Ramilison

Dear MySQL users,

MySQL Community Server 5.1.47, a new version of the popular Open
Source Database Management System, has been released.  MySQL 5.1.47 is
recommended for use on production systems.

For an overview of what's new in MySQL 5.1, please see

http://dev.mysql.com/doc/refman/5.1/en/mysql-nutshell.html

For information on installing MySQL 5.1.47 on new servers or upgrading
to MySQL 5.1.47 from previous MySQL releases, please see

http://dev.mysql.com/doc/refman/5.1/en/installing.html

MySQL Server is available in source and binary form for a number of
platforms from our download pages at

http://dev.mysql.com/downloads/

Not all mirror sites may be up to date at this point in time, so if
you can't find this version on some mirror, please try again later or
choose another download site.

We welcome and appreciate your feedback, bug reports, bug fixes,
patches, etc.:

http://forge.mysql.com/wiki/Contributing

For information on open issues in MySQL 5.1, please see the errata
list at

http://dev.mysql.com/doc/refman/5.1/en/open-bugs.html

The following section lists the changes in the MySQL source code since
the previous released version of MySQL 5.1.  It may also be viewed
online at

http://dev.mysql.com/doc/refman/5.1/en/news-5-1-47.html

Enjoy!

C.1.1. Changes in MySQL 5.1.47 (06 May 2010)

   InnoDB Plugin Notes:

 * InnoDB Plugin has been upgraded to version 1.0.8. This version
   is considered of General Availability (GA) quality. InnoDB
   Plugin Change History
   (http://dev.mysql.com/doc/innodb-plugin/1.0/en/innodb-changes.
   html), may contain information in addition to those changes
   reported here.
   In this release, the InnoDB Plugin is included in source and
   binary distributions, except RHEL3, RHEL4, SuSE 9 (x86,
   x86_64, ia64), and generic Linux RPM packages. It also does
   not work for FreeBSD 6 and HP-UX or for Linux on generic ia64.

   Functionality added or changed:

 * InnoDB stores redo log records in a hash table during
   recovery. On 64-bit systems, this hash table was 1/8 of the
   buffer pool size. To reduce memory usage, the dimension of the
   hash table was reduced to 1/64 of the buffer pool size (or
   1/128 on 32-bit systems).
   (Bug#53122: http://bugs.mysql.com/bug.php?id=53122)

   Bugs fixed:

 * Security Fix: The server failed to check the table name
   argument of a COM_FIELD_LIST command packet for validity and
   compliance to acceptable table name standards. This could be
   exploited to bypass almost all forms of checks for privileges
   and table-level grants by providing a specially crafted table
   name argument to COM_FIELD_LIST.
   In MySQL 5.0 and above, this allowed an authenticated user
   with SELECT privileges on one table to obtain the field
   definitions of any table in all other databases and
   potentially of other MySQL instances accessible from the
   server's file system.
   Additionally, for MySQL version 5.1 and above, an
   authenticated user with DELETE or SELECT privileges on one
   table could delete or read content from any other table in all
   databases on this server, and potentially of other MySQL
   instances accessible from the server's file system.
   (Bug#53371: http://bugs.mysql.com/bug.php?id=53371,
   CVE-2010-1848
   (http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2010-1848))

 * Security Fix: The server was susceptible to a buffer-overflow
   attack due to a failure to perform bounds checking on the
   table name argument of a COM_FIELD_LIST command packet. By
   sending long data for the table name, a buffer is overflown,
   which could be exploited by an authenticated user to inject
   malicious code.
   (Bug#53237: http://bugs.mysql.com/bug.php?id=53237,
   CVE-2010-1850
   (http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2010-1850))

 * Security Fix: The server could be tricked into reading packets
   indefinitely if it received a packet larger than the maximum
   size of one packet.
   (Bug#50974: http://bugs.mysql.com/bug.php?id=50974,
   CVE-2010-1849
   (http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2010-1849))

 * Important Change: Replication: When invoked, CHANGE MASTER TO
   and SET GLOBAL sql_slave_skip_counter now cause information to
   be written to the error log about the slave's state prior to
   execution of the statement. For CHANGE MASTER TO, this
   information includes the previous values for MASTER_HOST,
   MASTER_PORT, MASTER_LOG_FILE, and MASTER_LOG_POS. For SET
   GLOBAL SQL_SLAVE_SKIP_COUNTER, this information includes the
   previous values of sql_slave_skip_counter, the group relay log
   name, and the group relay log position.
   (Bug#43406: http://bugs.mysql.com/bug.php?id=43406,
   Bug#43407: http://bugs.mysql.com/bug.php?id=43407

Re: Another Foreign Key Problem

2010-05-21 Thread Victor Subervi
I'm canceling this thread. It belongs in the Python list. Sorry!
V

On Fri, May 21, 2010 at 1:24 PM, Victor Subervi wrote:

> Hi;
> When I try to execute this code from my Python script, I get this error:
>
> Traceback (most recent call last):
>   File 
> "/var/www/html/creative.vi/clients/sea-flight/reservations/create_edit_bags3.py",
>  line 38, in ?
>
> create_edit_bags3()
>   File 
> "/var/www/html/creative.vi/clients/sea-flight/reservations/create_edit_bags3.py",
>  line 32, in create_edit_bags3
>
> cursor.execute('insert into Baggage values (Null, %s, %s, %s, %s)', 
> (flight_id, customer_id, weight, ticket_no))
>   File "/usr/lib64/python2.4/site-packages/MySQLdb/cursors.py", line 163, in 
> execute
>
> self.errorhandler(self, exc, value)
>   File "/usr/lib64/python2.4/site-packages/MySQLdb/connections.py", line 35, 
> in defaulterrorhandler
> raise errorclass, errorvalue
> OperationalError: (1452, 'Cannot add or update a child row: a foreign key 
> constraint fails (`seaflight/Baggage`, CONSTRAINT `Baggage_ibfk_2` FOREIGN 
> KEY (`customer_id`) REFERENCES `Customers` (`id`))')
>
> However, when I try from the MySQL prompt after duly printing it out from
> the code, it works. Why?
> TIA,
> Victor
>


Another Foreign Key Problem

2010-05-21 Thread Victor Subervi
Hi;
When I try to execute this code from my Python script, I get this error:

Traceback (most recent call last):
  File 
"/var/www/html/creative.vi/clients/sea-flight/reservations/create_edit_bags3.py",
line 38, in ?
create_edit_bags3()
  File 
"/var/www/html/creative.vi/clients/sea-flight/reservations/create_edit_bags3.py",
line 32, in create_edit_bags3
cursor.execute('insert into Baggage values (Null, %s, %s, %s,
%s)', (flight_id, customer_id, weight, ticket_no))
  File "/usr/lib64/python2.4/site-packages/MySQLdb/cursors.py", line
163, in execute
self.errorhandler(self, exc, value)
  File "/usr/lib64/python2.4/site-packages/MySQLdb/connections.py",
line 35, in defaulterrorhandler
raise errorclass, errorvalue
OperationalError: (1452, 'Cannot add or update a child row: a foreign
key constraint fails (`seaflight/Baggage`, CONSTRAINT `Baggage_ibfk_2`
FOREIGN KEY (`customer_id`) REFERENCES `Customers` (`id`))')

However, when I try from the MySQL prompt after duly printing it out from
the code, it works. Why?
TIA,
Victor


Re: Recover accidentally deleted MySQL database files

2010-05-21 Thread Johan De Meersman
And this is why you have backups :-)

You have little guarantee that the recovered blocks form complete files, but
you can try to move them into the directory (with the correct mdi, myd and
frm extensions and named consistently, of course) and try to figure out what
contains which data from the contents of the tables.

The first challenge, however, is going to be matching the correct .frm file
to the correct .myd and .mdi. I guess you could skip the .mdi files, as
they're just indices, that'll make the job slightly easier at least.

Keep the originally recovered files, too, just in case MySQL tries to write
to some of them and corrupts them.

I hope you enjoy puzzles...



On Fri, May 21, 2010 at 6:48 PM, Jose Luis Marin Perez <
jma...@isp.qnet.com.pe> wrote:

> thanks for your answer, it seems these files were deleted when running
> fsck.
>
> In the /Lost+found directory files are referenced to Mysql for example:
>
> #114470: MySQL table definition file Version 9
> #114471: MySQL MISAM compressed data file Version 1
> #114472: DBase 3 data file (256 records)
> #114473: MySQL table definition file Version 9
> #114474: MySQL MISAM compressed data file Version 1
> #114475: DBase 3 data file (258 records)
> #114476: MySQL table definition file Version 9
> #114477: MySQL MISAM compressed data file Version 1
> #114478: DBase 3 data file (33489404 records)
> #114479: MySQL table definition file Version 9
> #114480: MySQL MISAM compressed data file Version 1
> #114482: MySQL table definition file Version 9
> #114483: MySQL MISAM compressed data file Version 1
> #114484: DBase 3 data file (256 records)
> #114485: MySQL table definition file Version 9
> #114486: MySQL MISAM compressed data file Version 1
> #114487: DBase 3 data file (8960 records)
> #114488: MySQL table definition file Version 9
> #114489: MySQL MISAM compressed data file Version 1
> #114490: DBase 3 data file (256 records)
>
> There any way to recover these files in its original location?
>
> Thanks
>
> Jose Luis
>
> -Mensaje original-
> De: mos [mailto:mo...@fastmail.fm]
> Enviado el: Viernes, 21 de Mayo de 2010 11:24 a.m.
> Para: mysql@lists.mysql.com
> Asunto: Re: Recover accidentally deleted MySQL database files
>
> At 10:42 AM 5/21/2010, you wrote:
> >Dear sirs,
> >
> >
> >
> >Accidentally files in a database have been deleted (/ var/lib/mysql
> >/"database") when entering the mysql console shows that the database is
> >created but does not show any table, there is some method to recever the
> >information in this database?
> >
> >
>
> You need to restore your database data directory from backup. You could try
> to undelete the files in the data directory but that may not recover all of
> the data since the tables may have been open when the files were erased.
>
> Before restoring the files from your backup, make sure you either flush the
> tables or shutdown the mysql server.
>
> Mike
>
>
> >Centos 4.6
> >
> >mysql  Ver 14.7 Distrib 4.1.20, for redhat-linux-gnu (i686) using readline
> >4.3
> >
> >
> >
> >Thanks
> >
> >
> >
> >Jose Luis
>
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:
> http://lists.mysql.com/mysql?unsub=jma...@isp.qnet.com.pe
>
>
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:http://lists.mysql.com/mysql?unsub=vegiv...@tuxera.be
>
>


-- 
Bier met grenadyn
Is als mosterd by den wyn
Sy die't drinkt, is eene kwezel
Hy die't drinkt, is ras een ezel


RE: Recover accidentally deleted MySQL database files

2010-05-21 Thread Jose Luis Marin Perez
thanks for your answer, it seems these files were deleted when running fsck.

In the /Lost+found directory files are referenced to Mysql for example:

#114470: MySQL table definition file Version 9
#114471: MySQL MISAM compressed data file Version 1
#114472: DBase 3 data file (256 records)
#114473: MySQL table definition file Version 9
#114474: MySQL MISAM compressed data file Version 1
#114475: DBase 3 data file (258 records)
#114476: MySQL table definition file Version 9
#114477: MySQL MISAM compressed data file Version 1
#114478: DBase 3 data file (33489404 records)
#114479: MySQL table definition file Version 9
#114480: MySQL MISAM compressed data file Version 1
#114482: MySQL table definition file Version 9
#114483: MySQL MISAM compressed data file Version 1
#114484: DBase 3 data file (256 records)
#114485: MySQL table definition file Version 9
#114486: MySQL MISAM compressed data file Version 1
#114487: DBase 3 data file (8960 records)
#114488: MySQL table definition file Version 9
#114489: MySQL MISAM compressed data file Version 1
#114490: DBase 3 data file (256 records)

There any way to recover these files in its original location?

Thanks

Jose Luis

-Mensaje original-
De: mos [mailto:mo...@fastmail.fm] 
Enviado el: Viernes, 21 de Mayo de 2010 11:24 a.m.
Para: mysql@lists.mysql.com
Asunto: Re: Recover accidentally deleted MySQL database files

At 10:42 AM 5/21/2010, you wrote:
>Dear sirs,
>
>
>
>Accidentally files in a database have been deleted (/ var/lib/mysql
>/"database") when entering the mysql console shows that the database is
>created but does not show any table, there is some method to recever the
>information in this database?
>
>

You need to restore your database data directory from backup. You could try 
to undelete the files in the data directory but that may not recover all of 
the data since the tables may have been open when the files were erased.

Before restoring the files from your backup, make sure you either flush the 
tables or shutdown the mysql server.

Mike


>Centos 4.6
>
>mysql  Ver 14.7 Distrib 4.1.20, for redhat-linux-gnu (i686) using readline
>4.3
>
>
>
>Thanks
>
>
>
>Jose Luis


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=jma...@isp.qnet.com.pe



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: Mysqltest Unknown system variable, failed: 1193

2010-05-21 Thread Joerg Bruehe
Hi!


Meng-Ju, Hsieh wrote:
> Thank for your reply.
> 
> I've tried to use Version 5.1, but it cannot work.
> Did you have used the system variable - 'DEBUG_SYNC' ?

I don't know what you are doing exactly, but I guess you are not using
the correct options in your call to "configure".

"DEBUG_SYNC" is a tool used for internal debugging, and according to
"configure.in" it requires the server to be configured for debugging
initially - see these lines from current 5.1 "configure.in":

 1732 # Debug Sync Facility. NOTE: depends on 'with_debug'. Must be
behind it.
 1733 AC_MSG_CHECKING(if Debug Sync Facility should be enabled.)
 1734 AC_ARG_ENABLE(debug_sync,
 1735   AS_HELP_STRING([--enable-debug-sync],
 1736  [Build a version with Debug Sync
Facility]),
 1737   [ enable_debug_sync=$enableval ],
 1738   [ enable_debug_sync=$with_debug ])
 1739
 1740 if test "$enable_debug_sync" != "no"
 1741 then
 1742   AC_DEFINE([ENABLED_DEBUG_SYNC], [1],
 1743 [If Debug Sync Facility should be enabled])
 1744   AC_MSG_RESULT([yes])
 1745 else
 1746   AC_MSG_RESULT([no])
 1747 fi

So you need to use
  configure ... --with-debug ... --enable-debug-sync ...
if you really want to do something using "DEBUG_SYNC".

I noticed that the text in the Wiki reads a bit different, I can't tell
which one is right. I myself don't need "DEBUG_SYNC" in my work.


Regards,
Jörg

-- 
Joerg Bruehe,  MySQL Build Team,  joerg.bru...@sun.com
Sun Microsystems GmbH,   Komturstrasse 18a,   D-12099 Berlin
Geschaeftsfuehrer: Juergen Kunz
Amtsgericht Muenchen: HRB161028


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: Database Quotas

2010-05-21 Thread Tim Gustafson
> i guess my thinking is more along the lines of implementing
> a lustre interface 

I'm sure that I'm vastly over-simplifying this, but I was thinking something 
along the lines of:

1. Assemble the data being written, calculate its length

2. Check for any free pages in the database file, and use them if there's enough

3. If there aren't enough free pages, check the file system's available space 
and make sure it exceeds the size of the write being performed

4. If there's enough free disk space, write the record.  Otherwise, return an 
error

I'm thinking that this would be implemented at the storage engine level, and 
probably just for MyISAM tables.

Just my $0.02.  Based on the reply from Johnny Withers, I'm thinking that just 
using ZFS file system quotas will work for me, but it does seem that this would 
be a handy feature to have built in to mySQL for people who don't have ZFS, or 
who can't use it for some reason.

Tim Gustafson
Baskin School of Engineering
UC Santa Cruz
t...@soe.ucsc.edu
831-459-5354

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: Recover accidentally deleted MySQL database files

2010-05-21 Thread mos

At 10:42 AM 5/21/2010, you wrote:

Dear sirs,



Accidentally files in a database have been deleted (/ var/lib/mysql
/"database") when entering the mysql console shows that the database is
created but does not show any table, there is some method to recever the
information in this database?




You need to restore your database data directory from backup. You could try 
to undelete the files in the data directory but that may not recover all of 
the data since the tables may have been open when the files were erased.


Before restoring the files from your backup, make sure you either flush the 
tables or shutdown the mysql server.


Mike



Centos 4.6

mysql  Ver 14.7 Distrib 4.1.20, for redhat-linux-gnu (i686) using readline
4.3



Thanks



Jose Luis



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



RE: Database Quotas

2010-05-21 Thread Martin Gainty

i guess my thinking is more along the lines of implementing a lustre interface

http://en.wikipedia.org/wiki/Lustre_%28file_system%29#Architecture

 

where the chronology *may* follow:
the File's Metadata attributes are written
the particulars of where the data is written would be handled by OSS which 
delegates to 1..n target nodes (which then passes the information to that 
target's LVM / RAID device)


Both MDS and OSS can implement either ext3 or ZFS/DMU Storage algos..in either 
case the metadata(MDT) metadata object record is written by the MDS ..
the data will be written to one or more LOV formatted ext3 or ZFS/DMU nodes 
specifying byte-offset and size..
When the requesting client issues a write request for the OST
the governing OSS issues the write request to the target that can fulfill 
it..if the requested target cannot complete the request 
that target passes ENOSPC back to OSS which then looks up the next target
The admin of the target node will be notified of the failed attempt by alert or 
log
but the OSS will hunt for the next target that can fulfill the write request of 
the OST

 

this is my (albeit cursory) interpretation of Object Oriented Disk Architectures

does this conform to your understanding?
Martin Gainty 
__ 
Please do not alter/modify or disrupt this transmission. Thank You



 


> Date: Fri, 21 May 2010 07:21:22 -0700
> From: t...@soe.ucsc.edu
> To: mgai...@hotmail.com
> CC: mysql@lists.mysql.com
> Subject: Re: Database Quotas
> 
> > if MYSQL attempts to insert more bytes than what is available
> > on disk you will get 28 ENOSPC No space left on device
> > http://dev.mysql.com/doc/refman/5.0/en/operating-system-error-codes.html 
> 
> Does it figured that out before it tries to write a record? So, if I have 2KB 
> left on the device and I write a 4KB record, does the first 2KB get written 
> and then the error occurs, or does the error occur before the write is 
> attempted?
> 
> I guess what I'm asking is will the tables be marked as "crashed" when an 
> ENOSPC happens, or will the tables still be in good health?
> 
> If they're still in good health, then I suppose that I could use ZFS file 
> systems to allocate space for databases...it just seems that this ought to be 
> a feature of the database. :)
> 
> Tim Gustafson
> Baskin School of Engineering
> UC Santa Cruz
> t...@soe.ucsc.edu
> 831-459-5354
  
_
Hotmail is redefining busy with tools for the New Busy. Get more from your 
inbox.
http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_2

Re: Mysqltest Unknown system variable, failed: 1193

2010-05-21 Thread Meng-Ju, Hsieh

Thank for your reply.

I've tried to use Version 5.1, but it cannot work.
Did you have used the system variable - 'DEBUG_SYNC' ?

Thank you very much.


- Original Message - 
From: "Joerg Bruehe" 

To: "Meng-Ju, Hsieh" 
Cc: 
Sent: Friday, May 21, 2010 6:25 PM
Subject: Re: Mysqltest Unknown system variable, failed: 1193



Hi!


Meng-Ju, Hsieh wrote:

I also read the URL
http://forge.mysql.com/wiki/MySQL_Internals_Test_Synchronization#Test_Synchronization

But it cannot work.


Sorry, mysql version is "mysql-6.0.0-alpha"


Development on the 6.0 branch is stalled, almost all current effort is
on the MySQL 5.5 series.

If there isn't anything specific to 6.0 which you are interested in,
you probably are better off by following 5.5 and letting 6.0 rest.


Regards,
Jörg

--
Joerg Bruehe,  MySQL Build Team,  joerg.bru...@sun.com
Sun Microsystems GmbH,   Komturstrasse 18a,   D-12099 Berlin
Geschaeftsfuehrer: Juergen Kunz
Amtsgericht Muenchen: HRB161028






--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Recover accidentally deleted MySQL database files

2010-05-21 Thread Jose Luis Marin Perez
Dear sirs,

 

Accidentally files in a database have been deleted (/ var/lib/mysql
/"database") when entering the mysql console shows that the database is
created but does not show any table, there is some method to recever the
information in this database?

 

Centos 4.6

mysql  Ver 14.7 Distrib 4.1.20, for redhat-linux-gnu (i686) using readline
4.3

 

Thanks

 

Jose Luis



Re: Database Quotas

2010-05-21 Thread Johnny Withers
I ran out of space on a large, busy production database just a few weeks
ago. All tables are InnoDB and I experienced zero data loss.

It was actually running out of space for almost 2 weeks after a review of
the log file. As temp files were deleted transactions were able to continue
until all but zero bytes of the disk were available.

I think MySQL did a fantastic job handling the problem.

JW

On Fri, May 21, 2010 at 9:21 AM, Tim Gustafson  wrote:

> > if MYSQL attempts to insert more bytes than what is available
> > on disk you will get 28 ENOSPC No space left on device
> > http://dev.mysql.com/doc/refman/5.0/en/operating-system-error-codes.html
>
> Does it figured that out before it tries to write a record?  So, if I have
> 2KB left on the device and I write a 4KB record, does the first 2KB get
> written and then the error occurs, or does the error occur before the write
> is attempted?
>
> I guess what I'm asking is will the tables be marked as "crashed" when an
> ENOSPC happens, or will the tables still be in good health?
>
> If they're still in good health, then I suppose that I could use ZFS file
> systems to allocate space for databases...it just seems that this ought to
> be a feature of the database.  :)
>
> Tim Gustafson
> Baskin School of Engineering
> UC Santa Cruz
> t...@soe.ucsc.edu
> 831-459-5354
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:http://lists.mysql.com/mysql?unsub=joh...@pixelated.net
>
>


-- 
-
Johnny Withers
601.209.4985
joh...@pixelated.net


Re: Innodb buffer pool size

2010-05-21 Thread Raj Shekhar
In infinite wisdom "Machiel Richards"  wrote:

> The current Innodb buffer pool size is at 4Gb for instance, and the
> innodb tables then grow to be about 8Gb in size.

InnoDB manages the pool as a list, using a least recently used (LRU) algorithm 
incorporating a midpoint insertion strategy. When room is needed to add a new 
block to the pool, InnoDB evicts the least recently used block and adds the new 
block to the middle of the list.

(see http://dev.mysql.com/doc/refman/5.1/en/innodb-buffer-pool.html)

> 
>What would be the appropriate actions for this to ensure the buffers are
> set to the size to best suit the database needs?

- Try to set your innodb_buffer_pool to be the same size as your data.
- have monitoring for the innodb_buffer_pool.  "show innodb status"
  prints out stats about the buffer pool as well

--
BUFFER POOL AND MEMORY
--
Total memory allocated 84966343; in additional pool allocated 1402624
Buffer pool size   3200
Free buffers   110
Database pages 3074
Modified db pages  2674
Pending reads 0
Pending writes: LRU 0, flush list 0, single page 0
Pages read 171380, created 51968, written 194688
28.72 reads/s, 20.72 creates/s, 47.55 writes/s
Buffer pool hit rate 999 / 1000

Monitoring free buffers can help in figuring out if the allocated memory
is optimum or not.

-- 
Raj Shekhar
-
If there's anything more important than my ego around, I want it
caught and shot now.



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: Database Quotas

2010-05-21 Thread Tim Gustafson
> if MYSQL attempts to insert more bytes than what is available
> on disk you will get 28 ENOSPC No space left on device
> http://dev.mysql.com/doc/refman/5.0/en/operating-system-error-codes.html 

Does it figured that out before it tries to write a record?  So, if I have 2KB 
left on the device and I write a 4KB record, does the first 2KB get written and 
then the error occurs, or does the error occur before the write is attempted?

I guess what I'm asking is will the tables be marked as "crashed" when an 
ENOSPC happens, or will the tables still be in good health?

If they're still in good health, then I suppose that I could use ZFS file 
systems to allocate space for databases...it just seems that this ought to be a 
feature of the database.  :)

Tim Gustafson
Baskin School of Engineering
UC Santa Cruz
t...@soe.ucsc.edu
831-459-5354

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



RE: Database Quotas

2010-05-21 Thread Martin Gainty

Tim-

if MYSQL attempts to insert more bytes than what is available on disk you will 
get 28 ENOSPC No space left on device

http://dev.mysql.com/doc/refman/5.0/en/operating-system-error-codes.html


does this help?
Martin Gainty 
__ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité

 
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.Ce message est confidentiel et peut être 
privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec 
bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non 
autorisée ou la copie de ceci est interdite. Ce message sert à l'information 
seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant 
donné que les email peuvent facilement être sujets à la manipulation, nous ne 
pouvons accepter aucune responsabilité pour le contenu fourni.



 

> Date: Thu, 20 May 2010 18:09:42 -0700
> From: t...@soe.ucsc.edu
> To: noel.but...@ausics.net
> CC: mysql@lists.mysql.com
> Subject: Re: Database Quotas
> 
> > Ummm, you're going to have the same problem either way when
> > the limit is reached, be it a MySQL quota or system quota,
> > if its full, its full.
> 
> Yes, but mySQL could return a more friendly "you're out of space" message and 
> not corrupt the data files if a given statement would cause the database to 
> exceed its quota (and it could do so in a way that doesn't corrupt the 
> database files)
> 
> Or it could work the opposite way: check the current usage against the quota 
> before executing a statement, and if the database is already over quota, 
> don't even attempt it.
> 
> Tim Gustafson
> Baskin School of Engineering
> UC Santa Cruz
> t...@soe.ucsc.edu
> 831-459-5354
> 
> -- 
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe: http://lists.mysql.com/mysql?unsub=mgai...@hotmail.com
> 
  
_
The New Busy think 9 to 5 is a cute idea. Combine multiple calendars with 
Hotmail. 
http://www.windowslive.com/campaign/thenewbusy?tile=multicalendar&ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_5

Re: Mysqltest Unknown system variable, failed: 1193

2010-05-21 Thread Joerg Bruehe
Hi!


Meng-Ju, Hsieh wrote:
> I also read the URL
> http://forge.mysql.com/wiki/MySQL_Internals_Test_Synchronization#Test_Synchronization
> 
> But it cannot work.
> 
> 
> Sorry, mysql version is "mysql-6.0.0-alpha"

Development on the 6.0 branch is stalled, almost all current effort is
on the MySQL 5.5 series.

If there isn't anything specific to 6.0 which you are interested in,
you probably are better off by following 5.5 and letting 6.0 rest.


Regards,
Jörg

-- 
Joerg Bruehe,  MySQL Build Team,  joerg.bru...@sun.com
Sun Microsystems GmbH,   Komturstrasse 18a,   D-12099 Berlin
Geschaeftsfuehrer: Juergen Kunz
Amtsgericht Muenchen: HRB161028


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: Mysqltest Unknown system variable, failed: 1193

2010-05-21 Thread Meng-Ju, Hsieh

Thank you for your reply.

Thank for your suggest.
I'll try to send question to the mail address.

Thank you very much.


- Original Message - 
From: "Johan De Meersman" 

To: "Meng-Ju, Hsieh" 
Cc: 
Sent: Friday, May 21, 2010 4:29 PM
Subject: Re: Mysqltest Unknown system variable, failed: 1193



You may want to try this on the mysql-dev list, I think.

2010/5/21 Meng-Ju, Hsieh 


I also read the URL

http://forge.mysql.com/wiki/MySQL_Internals_Test_Synchronization#Test_Synchronization
But it cannot work.


Sorry, mysql version is "mysql-6.0.0-alpha"


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=vegiv...@tuxera.be





--
Bier met grenadyn
Is als mosterd by den wyn
Sy die't drinkt, is eene kwezel
Hy die't drinkt, is ras een ezel





--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: Mysqltest Unknown system variable, failed: 1193

2010-05-21 Thread Johan De Meersman
You may want to try this on the mysql-dev list, I think.

2010/5/21 Meng-Ju, Hsieh 

> I also read the URL
>
> http://forge.mysql.com/wiki/MySQL_Internals_Test_Synchronization#Test_Synchronization
> But it cannot work.
>
>
> Sorry, mysql version is "mysql-6.0.0-alpha"
>
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:http://lists.mysql.com/mysql?unsub=vegiv...@tuxera.be
>
>


-- 
Bier met grenadyn
Is als mosterd by den wyn
Sy die't drinkt, is eene kwezel
Hy die't drinkt, is ras een ezel