Quantcast
Viewing all 1956 articles
Browse latest View live

What Word Password Recovery Can Do for You? (no replies)

Lost your Microsoft Word password and couldn’t open your file?
Wasting time on opening the MS Word document with long and complex Word passwords?
Spending too much money on high cost of commercial password software?
Word Password Recovery is a program that recovers forgotten passwords for Microsoft Word documents. The program recovers all types of passwords, including instant recovery of document and passwords to modify. The program supports the versions of Microsoft Word 1997-2003.

Word Password Recovery instantly recovers passwords for the read only permissions, editing restrictions. The interface is simple and easy to use.

http://www.allpasswordrecovery.com/feature-word.php

Innodb with HUGE row of varchar(500)s (4 replies)

Hello,

I am building a database, it requires each row to be about 60,000 bytes (very close to mysql max row size, basically lots of varchar(500) statements [Its a bad strucutre, but necessary]). now, that is ok in myism as far as I know.

However, I am considering innodb due to its row locking behaviour (I get lots of updates to my table). I have only just come across some troubling information regarding innodb not liking large rows (something about 8000 bytes max or something) - http://forums.innodb.com/read.php?3,1196,1204

So, given that my table must have rows of approx 60,000 bytes each, is this a problem for innodb? Is it a big problem? deal breaker? what would you suggest?

Table structure: ID (int, autoinc, primary key), varchar(500), varchar(500)...repeat...varchar(500) until end of table reached

inserting only 1000 records/rows and ignoring rest (no replies)

Hello

i have a large database where the client stores personal messages and fire email notifications [if allowed by the users]. certain users have the option of sending messages to their entire network of friends. some users have over 5000 friends in their network so if they select the whole network they'll be sending messages to over 5000 friends and system will store all the messages into a table. the problem is this that it does not insert more than 1000 records and ignores all inserts after the first 1000. i have increased the packet size, bulk_insert_buffer_size but still no luck. since the system stores some of the info in another table for reports, every insert returns its new message id. due to this i can not use the "insert into table (column1,column2) values (value1,value2) , (value1,value2)....etc."

table engine is innodb, mysql version is 5.1.3 and is hosted on amazon web services. all i want is to fix this issue of inserting more than 1000 records at a time. as mentioned earlier, it works fine but only up to 1000 records and simply ignores all the records after that.

thank you in advance for all the help and support.

WMA.

Could socket failure be related to InnoDB errors? (2 replies)

Can't get MYSQL running

Ubuntu 10.04, linux 2.6.32-27-generic, 2G mem, intel duo T5250 1.5 ghz
dual boot with Vista

Apache2 works fine, PHP info page shows up, mysql -V works
mysql Ver 14.14 Distrib 5.1.41, for debian-linux-gnu (x86_64) using readline 6.1
ha

Error msgs
mysql Ver 14.14 Distrib 5.1.41, for debian-linux-gnu (x86_64) using readline 6.1
hannah@ubuntu:~$ sudo mysql -u root -p
[sudo] password for hannah:
Enter password:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysqld.sock' (2)
hannah@ubuntu:~$

I have chmoded /etc/mysql and /tmp, put a link from /tmp to /var/run/mysqld
Some posts use mysql/mysql.sock, others show myslqd/mysqld.sock, which is correct for Ubuntu?

my.cnf info
hannah@ubuntu:~$ cat /etc/mysql/my.cnf | grep socket
# Remember to edit /etc/mysql/debian.cnf when changing the socket location.
#socket = /var/run/mysqld/mysqld.sock
socket = /tmp/mysqld.sock
#socket = /var/run/mysqld/mysqld.sock
socket = /tmp/mysqld.sock
#socket = /var/run/mysqld/mysqld.sock
socket = /tmp/mysqld.sock
hannah@ubuntu:~$ cat /etc/mysql/my.cnf | grep port
# One can use all long options that the program supports.
# It has been reported that passwords should be enclosed with ticks/quotes
port = 3306
port = 3306
hannah@ubuntu:~$ cat /etc/mysql/my.cnf | grep dir
basedir = /usr
datadir = /var/lib/mysql
tmpdir = /tmp
!includedir /etc/mysql/conf.d/
hannah@ubuntu:~$ cat /etc/mysql/my.cnf | grep addr
#bind-address = 192.168.1.20
bind-address = 127.0.0.1
#bind-address = localhost

I have created a mysql dir in /var/run, but it disappears when i reboot.

Here are the log files msgs
kern.log
-rw-r----- 1 syslog adm 2657550 2010-12-31 15:11 /var/log/kern.log
Dec 31 15:06:54 ubuntu kernel: [ 1954.728774] type=1505 audit(1293836814.701:82): operation="profile_replace" pid=6655 name="/usr/sbin/mysqld"
Dec 31 15:07:24 ubuntu kernel: [ 1985.003696] type=1505 audit(1293836844.981:83): operation="profile_replace" pid=6729 name="/usr/sbin/mysqld"
Dec 31 15:07:55 ubuntu kernel: [ 2015.276972] type=1505 audit(1293836875.251:84): operation="profile_replace" pid=6807 name="/usr/sbin/mysqld"
Dec 31 15:08:25 ubuntu kernel: [ 2045.554549] type=1505 audit(1293836905.531:85): operation="profile_replace" pid=6886 name="/usr/sbin/mysqld"
Dec 31 15:08:55 ubuntu kernel: [ 207

5.831692] type=1505 audit(1293836935.811:86): operation="profile_replace" pid=6978 name="/usr/sbin/mysqld"
Dec 31 15:09:26 ubuntu kernel: [ 2106.107412] type=1505 audit(1293836966.081:87): operation="profile_replace" pid=7061 name="/usr/sbin/mysqld"
Dec 31 15:09:56 ubuntu kernel: [ 2136.383562] type=1505 audit(1293836996.361:88): operation="profile_replace" pid=7139 name="/usr/sbin/mysqld"
Dec 31 15:10:26 ubuntu kernel: [ 2166.660813] type=1505 audit(1293837026.633:89): operation="profile_replace" pid=7214 name="/usr/sbin/mysqld"
Dec 31 15:10:56 ubuntu kernel: [ 2196.938785] type=1505 audit(1293837056.913:90): operation="profile_replace" pid=7288 name="/usr/sbin/mysqld"
Dec 31 15:11:27 ubuntu kernel: [ 2227.213716] type=1505 audit(1293837087.191:91): operation="profile_replace" pid=7362 name="/usr/sbin/mysqld"
----------------------------------------------------------------------
sys.log
-rw-r----- 1 syslog adm 392717 2010-12-31 15:11 /var/log/syslog
Dec 31 15:10:26 ubuntu init: mysql main process (7218) terminated with status 1
Dec 31 15:10:26 ubuntu init: mysql main process ended, respawning
Dec 31 15:10:56 ubuntu init: mysql post-start process (7219) terminated with status 1
Dec 31 15:10:56 ubuntu kernel: [ 2196.938785] type=1505 audit(1293837056.913:90): operation="profile_replace" pid=7288 name="/usr/sbin/mysqld"
Dec 31 15:10:56 ubuntu init: mysql main process (7292) terminated with status 1
Dec 31 15:10:56 ubuntu init: mysql main process ended, respawning
Dec 31 15:11:27 ubuntu init: mysql post-start process (7293) terminated with status 1
Dec 31 15:11:27 ubuntu kernel: [ 2227.213716] type=1505 audit(1293837087.191:91): operation="profile_replace" pid=7362 name="/usr/sbin/mysqld"
Dec 31 15:11:27 ubuntu init: mysql main process (7366) terminated with status 1
Dec 31 15:11:27 ubuntu init: mysql main process ended, respawning
----------------------------------------------------------------------
apache2 error.log
-rw-r----- 1 root adm 42847 2010-12-31 14:40 /var/log/apache2/error.log
[Fri Dec 31 14:34:41 2010] [error] mod_log_sql: insufficient configuration info to establish database link
[Fri Dec 31 14:34:41 2010] [error] mod_log_sql: child spawned but unable to open database link
[Fri Dec 31 14:40:37 2010] [error] mod_log_sql: insufficient configuration info to establish database link
[Fri Dec 31 14:40:37 2010] [error] mod_log_sql: child spawned but unable to open database link
[Fri Dec 31 14:40:40 2010] [error] [client 127.0.0.1] File does not exist: /var/www/favicon.ico
[Fri Dec 31 14:40:49 2010] [error] [client 127.0.0.1] File does not exist: /var/www/~user
[Fri Dec 31 14:40:49 2010] [error] [client 127.0.0.1] File does not exist: /var/www/favicon.ico
[Fri Dec 31 14:40:50 2010] [error] mod_log_sql: insufficient configuration info to establish database link
[Fri Dec 31 14:40:50 2010] [error] mod_log_sql: child spawned but unable to open database link
[Fri Dec 31 14:40:52 2010] [error] [client 127.0.0.1] File does not exist: /var/www/favicon.ico
----------------------------------------------------------------------
Here's the msql error log

101231 15:21:32 [Note] Plugin 'FEDERATED' is disabled.
/usr/sbin/mysqld: Can't find file: './mysql/plugin.frm' (errno: 13)
101231 15:21:32 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
101231 15:21:32 InnoDB: Operating system error number 13 in a file operation.
InnoDB: The error means mysqld does not have the access rights to
InnoDB: the directory.
InnoDB: File name ./ibdata1
InnoDB: File operation call: 'create'.
InnoDB: Cannot continue operation.
101231 15:22:03 [Note] Plugin 'FEDERATED' is disabled.
/usr/sbin/mysqld: Can't find file: './mysql/plugin.frm' (errno: 13)
101231 15:22:03 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
101231 15:22:03 InnoDB: Operating system error number 13 in a file operation.
InnoDB: The error means mysqld does not have the access rights to
InnoDB: the directory.
InnoDB: File name ./ibdata1
InnoDB: File operation call: 'create'.
InnoDB: Cannot continue operation.
root@ubuntu:/#

Can someone point me to a detailed description of how mysql and/or php5 create a socket? Thanks.

InnoDB plugin version (no replies)

Dear All,

I want to use MySQL 5.1.47 (64 bit). Please let me know if InnoDB plugin is bundled with this version of mysql or should I install plugin separately? Can anybody give me download Link and installation manual of InnoDB plugin for MySQL 5.1.47 (64 bit)

Thanks for your support.

Regards,
Asad

Dumping data from a seemingly corrupted database? (no replies)

Hello all,

From time to time we're having an issue with MySQL / InnoDB databases. For unknown reasons it becomes impossible to dump a database. The error from mysqldump is always the same:

Error 2020: Got packet bigger than 'max_allowed_packet' bytes when dumping table `XXXXX` at row: YYYYYY

Of course, we checked our configuration to allow packets of the right size :-).

When using's mysqldump option --force we are given some more information. For example:

mysqldump: Error 2020: Got packet bigger than 'max_allowed_packet' bytes when dumping table `properties` at row: 134563351
mysqldump: Couldn't execute 'SHOW TRIGGERS LIKE 'properties'': MySQL server has gone away (2006)
mysqldump: Couldn't execute 'show table status like 'receivefolder'': MySQL server has gone away (2006)
mysqldump: Couldn't execute 'SET OPTION SQL_QUOTE_SHOW_CREATE=1': MySQL server has gone away (2006)
mysqldump: Couldn't execute 'show fields from `receivefolder`': MySQL server has gone away (2006)
mysqldump: Couldn't execute 'SHOW TRIGGERS LIKE 'receivefolder'': MySQL server has gone away (2006)
mysqldump: Couldn't execute 'show table status like 'searchresults'': MySQL server has gone away (2006)
mysqldump: Couldn't execute 'SET OPTION SQL_QUOTE_SHOW_CREATE=1': MySQL server has gone away (2006)
mysqldump: Couldn't execute 'show fields from `searchresults`': MySQL server has gone away (2006)
mysqldump: Couldn't execute 'SHOW TRIGGERS LIKE 'searchresults'': MySQL server has gone away (2006)
mysqldump: Couldn't execute 'show table status like 'settings'': MySQL server has gone away (2006)
mysqldumop: Couldn't execute 'SET OPTION SQL_QUOTE_SHOW_CREATE=1': MySQL server has gone away (2006)
mysqldump: Couldn't execute 'show fields from `settings`': MySQL server has gone away (2006)
mysqldump: Couldn't execute 'SHOW TRIGGERS LIKE 'settings'': MySQL server has gone away (2006)
mysqldump: Couldn't execute 'show table status like 'stores'': MySQL server has gone away (2006)
mysqldump: Couldn't execute 'SET OPTION SQL_QUOTE_SHOW_CREATE=1': MySQL server has gone away (2006)
mysqldump: Couldn't execute 'show fields from `stores`': MySQL server has gone away (2006)
mysqldump: Couldn't execute 'SHOW TRIGGERS LIKE 'stores'': MySQL server has gone away (2006)
mysqldump: Couldn't execute 'show table status like 'syncs'': MySQL server has gone away (2006)
mysqldump: Couldn't execute 'SET OPTION SQL_QUOTE_SHOW_CREATE=1': MySQL server has gone away (2006)
mysqldump: Couldn't execute 'show fields from `syncs`': MySQL server has gone away (2006)
mysqldump: Couldn't execute 'SHOW TRIGGERS LIKE 'syncs'': MySQL server has gone away (2006)
mysqldump: Couldn't execute 'show table status like 'usergroup\_acl'': MySQL server has gone away (2006)
mysqldump: Couldn't execute 'SET OPTION SQL_QUOTE_SHOW_CREATE=1': MySQL server has gone away (2006)
mysqldump: Couldn't execute 'show fields from `usergroup_acl`': MySQL server has gone away (2006)
mysqldump: Couldn't execute 'SHOW TRIGGERS LIKE 'usergroup\_acl'': MySQL server has gone away (2006)
mysqldump: Couldn't execute 'show table status like 'users'': MySQL server has gone away (2006)
mysqldump: Couldn't execute 'SET OPTION SQL_QUOTE_SHOW_CREATE=1': MySQL server has gone away (2006)
mysqldump: Couldn't execute 'show fields from `users`': MySQL server has gone away (2006)
mysqldump: Couldn't execute 'SHOW TRIGGERS LIKE 'users'': MySQL server has gone away (2006)
mysqldump: Couldn't execute 'show table status like 'versions'': MySQL server has gone away (2006)
mysqldump: Couldn't execute 'SET OPTION SQL_QUOTE_SHOW_CREATE=1': MySQL server has gone away (2006)
mysqldump: Couldn't execute 'show fields from `versions`': MySQL server has gone away (2006)
mysqldump: Couldn't execute 'SHOW TRIGGERS LIKE 'versions'': MySQL server has gone away (2006)
mysqldump: Couldn't execute 'UNLOCK TABLES': MySQL server has gone away (2006)

Could I somehow figure out what's going wrong where and how to fix this? Will dumping with --force give me a useable dump (in case there's one corrupted record.. well... that's mostly okay).

Thanks!

100% of connections causing High CPU usage ? (5 replies)

Hi,
I'm wondering if my 100% CPU usage of my mysql server is caused by the 100% use of connections. And secondly if there are same ways to decrese the usage of connections. I have 2 servers with 2GB RAM in the first i have set mpm.conf to have max 600 connections on the second (dedicated to mysql only) my.cnf only 365. This is my my.cnf:

## MySQL 5.1 Configuration
##

[client]
port = 3306
socket = /tmp/mysql.sock
default-character-set = utf8

# The MySQL server
[mysqld]
user = mysql
basedir = /mysql
datadir = /databases
bind-address = 10.17.80.28
port = 3306
socket = /tmp/mysql.sock
tmpdir = /tmp
slow_query_log = /databases/slowquery.log
long_query_time = 1
skip_external_locking
default-storage-engine = innodb
server-id = 1
character-set-server = utf8

# Capacity Limits
#thread_concurrency = 0
# max_connections = 250
max_connections = 420
max_allowed_packet = 24M
table_open_cache = 400
table_cache = 2000

# General
# query_cache_size = 16M
query_cache_size = 32M
# thread_cache_size = 128
thread_cache_size = 300

# MyISAM Engine Settings
# key_buffer = 100M
key_buffer = 256M
# myisam_sort_buffer_size = 32M
myisam_sort_buffer_size = 64M

# InnoDB Engine settings
innodb_data_home_dir = /databases
innodb_data_file_path = ibdata1:100M:autoextend
innodb_buffer_pool_size = 512M
innodb_additional_mem_pool_size = 30M
#innodb_thread_concurrency = 0
innodb_flush_log_at_trx_commit = 2
#innodb_doublewrite = 0
innodb_log_buffer_size = 32M
innodb_log_file_size = 512M


[mysqldump]
quick
max_allowed_packet = 16M

[mysql]
no-auto-rehash

[isamchk]
key_buffer = 128M
sort_buffer_size = 128M
read_buffer = 2M
write_buffer = 2M

[myisamchk]
key_buffer = 128M
sort_buffer_size = 128M
read_buffer = 2M
write_buffer = 2M

[mysqlhotcopy]
interactive-timeout

-----------------------------------------------
And this is the report of tuning-primer.sh


-- MYSQL PERFORMANCE TUNING PRIMER --
- By: Matthew Montgomery -

MySQL Version 5.1.51 x86_64

Uptime = 0 days 2 hrs 1 min 50 sec
Avg. qps = 381
Total Questions = 2787895
Threads Connected = 17

Warning: Server has not been running for at least 48hrs.
It may not be safe to use these recommendations

To find out more information on how each of these
runtime variables effects performance visit:
http://dev.mysql.com/doc/refman/5.1/en/server-system-variables.html
Visit http://www.mysql.com/products/enterprise/advisors.html
for info about MySQL's Enterprise Monitoring and Advisory Service

SLOW QUERIES
The slow query log is NOT enabled.
Current long_query_time = 1.000000 sec.
You have 34764 out of 2788011 that take longer than 1.000000 sec. to complete
syntax error on line 1, teletype
./tuning-primer.sh: line 606: [: -gt: unary operator expected
Your long_query_time seems to be fine

BINARY UPDATE LOG
The binary update log is NOT enabled.
You will not be able to do point in time recovery
See http://dev.mysql.com/doc/refman/5.1/en/point-in-time-recovery.html

WORKER THREADS
Current thread_cache_size = 300
Current threads_cached = 287
Current threads_per_sec = 0
Historic threads_per_sec = 0
Your thread_cache_size is fine

MAX CONNECTIONS
Current max_connections = 420
Current threads_connected = 17
Historic max_used_connections = 421
The number of used connections is 100% of the configured maximum.
You should raise max_connections

INNODB STATUS
Current InnoDB index space = 87 M
Current InnoDB data space = 275 M
Current InnoDB buffer pool free = 41 %
Current innodb_buffer_pool_size = 512 M
Depending on how much space your innodb indexes take up it may be safe
to increase this value to up to 2 / 3 of total system memory

MEMORY USAGE
Max Memory Ever Allocated : 1.97 G
Configured Max Per-thread Buffers : 1.12 G
Configured Max Global Buffers : 862 M
Configured Max Memory Limit : 1.96 G
Physical Memory : 2.00 G

nMax memory limit exceeds 90% of physical memory

KEY BUFFER
No key reads?!
Seriously look into using some indexes
Current MyISAM index space = 98 K
Current key_buffer_size = 256 M
Key cache miss rate is 1 : 0
Key buffer free ratio = 81 %
Your key_buffer_size seems to be fine

QUERY CACHE
Query cache is enabled
Current query_cache_size = 32 M
Current query_cache_used = 4 M
Current query_cache_limit = 1 M
Current Query cache Memory fill ratio = 14.43 %
Current query_cache_min_res_unit = 4 K
Your query_cache_size seems to be too high.
Perhaps you can use these resources elsewhere
MySQL won't cache query results that are larger than query_cache_limit in size

SORT OPERATIONS
Current sort_buffer_size = 2 M
Current read_rnd_buffer_size = 256 K
Sort buffer seems to be fine

JOINS
Current join_buffer_size = 132.00 K
You have had 0 queries where a join could not use an index properly
Your joins seem to be using indexes properly

OPEN FILES LIMIT
Current open_files_limit = 4430 files
The open_files_limit should typically be set to at least 2x-3x
that of table_cache if you have heavy MyISAM usage.
Your open_files_limit value seems to be fine

TABLE CACHE
Current table_open_cache = 2000 tables
Current table_definition_cache = 256 tables
You have a total of 53 tables
You have 1353 open tables.
The table_cache value seems to be fine

TEMP TABLES
Current max_heap_table_size = 16 M
Current tmp_table_size = 16 M
Of 14078 temp tables, 6% were created on disk
Created disk tmp tables ratio seems fine

TABLE SCANS
Current read_buffer_size = 128 K
Current table scan ratio = 95 : 1
read_buffer_size seems to be fine

TABLE LOCKING
Current Lock Wait ratio = 0 : 2789568
Your table locking seems to be fine


----------------------

Thanks,
Marco

Error "Deadlock found when trying to get lock" with two indexes and batch update (5 replies)

Hi,

I get an error "Deadlock found when trying to get lock; try restarting transaction" when there are 2 indexes (primary key index + one more) for a table, but not when there is only primary key index.
I concluded that this is a side effect of using a second index, by reading 'show innodb status' output (included below).
So my question is, is there any solution to my problem where multiple indexes can be involved but without causing deadlocks during transaction?

Table structure:
CREATE TABLE `gallery` (
`gallery_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`gallery_name` varchar(20) NOT NULL,
`video_id` int(10) unsigned NOT NULL,
PRIMARY KEY (`gallery_id`),
KEY `Index_2` (`gallery_name`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

The error occurs consistently when multiple concurrent transactions are simulated and both indexes have been created for table. But with 'Index_2' dropped, there is no deadlock.

Each transaction involves
- one delete * from gallery where gallery_name='name';
- Multiple insert into gallery values (...);

The second index was just to improve performance for queries having 'where' conditions with string matching, but is not critical and can be removed.

I'm new to innodb status report, but what I could infer is that one thread has got lock on primary index and is waiting for lock on 'Index_2', while another thread has got lock on 'Index_2' and is waiting for lock on primary. Is this correct? What can be done to prevent this? Should I look into transaction levels (am new to them too) to solve such issues?

Thanks
Karthik

Details:
--------
MySQL version: 5.1.30-community (x86 build)
OS: Windows 7 64 bit

The application is java. Mysql Connector/J verion is 5.1.12.
Junitperf LoadTest was used to simulate 10 concurrent updates.

Relevant code:
try {
 ...
 conn.setAutoCommit(false); 
			
 stmt = conn.createStatement();
 stmt.addBatch(String.format(DELETE_GALLERY_QRY, gallery.getName()));
 for (Integer videoID : videoIDs) {
  stmt.addBatch(String.format(INSERT_GALLERY_ITEM_QRY, gallery.getName(),  videoID));
 }
			 
 stmt.executeBatch(); // <== EXCEPTION THROWN HERE:  java.sql.BatchUpdateException: Deadlock
                      // found when trying to get lock; try restarting transaction

 conn.commit();

} catch (SQLException e) {
 if (conn != null) { // can be null in case of too many concurrent connections
  try {
   conn.rollback();
  } catch (SQLException rollbackEx) {
   LOG.error("updateGallery rollback failed", rollbackEx);
  }

} finally {
 if (stmt != null) {
  try {stmt.close();} catch (Exception ignored) {;}
 }

 if (conn != null) {
  try {conn.close();} catch (Exception ignored) {;}
 }
}



show innodb status output:

----------
SEMAPHORES
----------
OS WAIT ARRAY INFO: reservation count 341, signal count 273
Mutex spin waits 0, rounds 6913, OS waits 205
RW-shared spins 151, OS waits 66; RW-excl spins 78, OS waits 49
------------------------
LATEST DETECTED DEADLOCK
------------------------
110105 12:31:30
*** (1) TRANSACTION:
TRANSACTION 0 19754, ACTIVE 0 sec, OS thread id 5200 starting index read
mysql tables in use 1, locked 1
LOCK WAIT 3 lock struct(s), heap size 320, 14 row lock(s)
MySQL thread id 125, query id 1504 localhost 127.0.0.1 root updating
delete from gallery where gallery_name='Corporate'
*** (1) WAITING FOR THIS LOCK TO BE GRANTED:
RECORD LOCKS space id 0 page no 220 n bits 112 index `PRIMARY` of table `app_test`.`gallery` trx id 0 19754 lock_
mode X locks rec but not gap waiting
Record lock, heap no 5 PHYSICAL RECORD: n_fields 5; compact format; info bits 32
0: len 4; hex 00000115; asc ;; 1: len 6; hex 000000004d2d; asc M-;; 2: len 7; hex 000000003a1de7; asc : ?;;
3: len 9; hex 436f72706f72617465; asc Corporate;; 4: len 4; hex 00000001; asc ;;

*** (2) TRANSACTION:
TRANSACTION 0 19757, ACTIVE 0 sec, OS thread id 6080 updating or deleting, thread declared inside InnoDB 0
mysql tables in use 1, locked 1
4 lock struct(s), heap size 320, 14 row lock(s), undo log entries 1
MySQL thread id 127, query id 1540 localhost 127.0.0.1 root updating
delete from gallery where gallery_name='Corporate'
*** (2) HOLDS THE LOCK(S):
RECORD LOCKS space id 0 page no 220 n bits 112 index `PRIMARY` of table `app_test`.`gallery` trx id 0 19757 lock_
mode X
Record lock, heap no 5 PHYSICAL RECORD: n_fields 5; compact format; info bits 32
0: len 4; hex 00000115; asc ;; 1: len 6; hex 000000004d2d; asc M-;; 2: len 7; hex 000000003a1de7; asc : ?;;
3: len 9; hex 436f72706f72617465; asc Corporate;; 4: len 4; hex 00000001; asc ;;

Record lock, heap no 22 PHYSICAL RECORD: n_fields 5; compact format; info bits 32
0: len 4; hex 00000109; asc ;; 1: len 6; hex 000000004d25; asc M%;; 2: len 7; hex 000000003a18e3; asc
: ?;; 3: len 9; hex 436f72706f72617465; asc Corporate;; 4: len 4; hex 00000001; asc ;;

Record lock, heap no 23 PHYSICAL RECORD: n_fields 5; compact format; info bits 32
0: len 4; hex 0000010a; asc ;; 1: len 6; hex 000000004d25; asc M%;; 2: len 7; hex 000000003a1910; asc : ;;
3: len 9; hex 436f72706f72617465; asc Corporate;; 4: len 4; hex 00000002; asc ;;

Record lock, heap no 24 PHYSICAL RECORD: n_fields 5; compact format; info bits 32
0: len 4; hex 0000010b; asc ;; 1: len 6; hex 000000004d25; asc M%;; 2: len 7; hex 000000003a193d; asc : =;;
3: len 9; hex 436f72706f72617465; asc Corporate;; 4: len 4; hex 00000003; asc ;;

Record lock, heap no 36 PHYSICAL RECORD: n_fields 5; compact format; info bits 32
0: len 4; hex 0000010e; asc ;; 1: len 6; hex 000000004d26; asc M&;; 2: len 7; hex 000000003a1a7e; asc : ~;;
3: len 9; hex 436f72706f72617465; asc Corporate;; 4: len 4; hex 00000003; asc ;;

Record lock, heap no 37 PHYSICAL RECORD: n_fields 5; compact format; info bits 32
0: len 4; hex 0000010d; asc ;; 1: len 6; hex 000000004d26; asc M&;; 2: len 7; hex 000000003a1a51; asc : Q;;
3: len 9; hex 436f72706f72617465; asc Corporate;; 4: len 4; hex 00000002; asc ;;

Record lock, heap no 38 PHYSICAL RECORD: n_fields 5; compact format; info bits 32
0: len 4; hex 0000010f; asc ;; 1: len 6; hex 000000004d27; asc M';; 2: len 7; hex 000000003a1b65; asc : e;;
3: len 9; hex 436f72706f72617465; asc Corporate;; 4: len 4; hex 00000001; asc ;;

Record lock, heap no 39 PHYSICAL RECORD: n_fields 5; compact format; info bits 32
0: len 4; hex 0000010c; asc ;; 1: len 6; hex 000000004d26; asc M&;; 2: len 7; hex 000000003a1a24; asc : $;;
3: len 9; hex 436f72706f72617465; asc Corporate;; 4: len 4; hex 00000001; asc ;;

Record lock, heap no 40 PHYSICAL RECORD: n_fields 5; compact format; info bits 32
0: len 4; hex 00000110; asc ;; 1: len 6; hex 000000004d27; asc M';; 2: len 7; hex 000000003a1b92; asc : ?;;
3: len 9; hex 436f72706f72617465; asc Corporate;; 4: len 4; hex 00000002; asc ;;

Record lock, heap no 41 PHYSICAL RECORD: n_fields 5; compact format; info bits 32
0: len 4; hex 00000111; asc ;; 1: len 6; hex 000000004d27; asc M';; 2: len 7; hex 000000003a1bbf; asc : ?;;
3: len 9; hex 436f72706f72617465; asc Corporate;; 4: len 4; hex 00000003; asc ;;

Record lock, heap no 43 PHYSICAL RECORD: n_fields 5; compact format; info bits 32
0: len 4; hex 00000113; asc ;; 1: len 6; hex 000000004d28; asc M(;; 2: len 7; hex 000000003a1cd3; asc : ?;;
3: len 9; hex 436f72706f72617465; asc Corporate;; 4: len 4; hex 00000002; asc ;;

Record lock, heap no 44 PHYSICAL RECORD: n_fields 5; compact format; info bits 32
0: len 4; hex 00000114; asc ;; 1: len 6; hex 000000004d28; asc M(;; 2: len 7; hex 000000003a1d00; asc : ;;
3: len 9; hex 436f72706f72617465; asc Corporate;; 4: len 4; hex 00000003; asc ;;

*** (2) WAITING FOR THIS LOCK TO BE GRANTED:
RECORD LOCKS space id 0 page no 221 n bits 112 index `Index_2` of table `app_test`.`gallery` trx id 0 19757 lock_
mode X locks rec but not gap waiting
Record lock, heap no 5 PHYSICAL RECORD: n_fields 2; compact format; info bits 0
0: len 9; hex 436f72706f72617465; asc Corporate;; 1: len 4; hex 00000115; asc ;;

*** WE ROLL BACK TRANSACTION (1)
------------
TRANSACTIONS
------------
Trx id counter 0 19926
Purge done for trx's n:o < 0 19923 undo n:o < 0 0
History list length 20
LIST OF TRANSACTIONS FOR EACH SESSION:
---TRANSACTION 0 0, not started, OS thread id 4372
MySQL thread id 221, query id 2745 localhost 127.0.0.1 root
show innodb status
---TRANSACTION 0 19925, not started, OS thread id 6080
MySQL thread id 182, query id 2741 localhost 127.0.0.1 root
--------
FILE I/O
--------
I/O thread 0 state: wait Windows aio (insert buffer thread)
I/O thread 1 state: wait Windows aio (log thread)
I/O thread 2 state: wait Windows aio (read thread)
I/O thread 3 state: wait Windows aio (write thread)
Pending normal aio reads: 0, aio writes: 0,
ibuf aio reads: 0, log i/o's: 0, sync i/o's: 0
Pending flushes (fsync) log: 0; buffer pool: 0
84 OS file reads, 424 OS file writes, 297 OS fsyncs
0.00 reads/s, 0 avg bytes/read, 0.00 writes/s, 0.00 fsyncs/s
-------------------------------------
INSERT BUFFER AND ADAPTIVE HASH INDEX
-------------------------------------
Ibuf: size 1, free list len 0, seg size 2,
0 inserts, 0 merged recs, 0 merges
Hash table size 419291, node heap has 1 buffer(s)
0.00 hash searches/s, 0.00 non-hash searches/s
---
LOG
---
Log sequence number 0 465789
Log flushed up to 0 465789
Last checkpoint at 0 465789
0 pending log writes, 0 pending chkp writes
230 log i/o's done, 0.00 log i/o's/second
----------------------
BUFFER POOL AND MEMORY
----------------------
Total memory allocated 119727652; in additional pool allocated 1402624
Dictionary memory allocated 32888
Buffer pool size 6464
Free buffers 6385
Database pages 78
Modified db pages 0
Pending reads 0
Pending writes: LRU 0, flush list 0, single page 0
Pages read 74, created 4, written 164
0.00 reads/s, 0.00 creates/s, 0.00 writes/s
No buffer pool page gets since the last printout
--------------
ROW OPERATIONS
--------------
0 queries inside InnoDB, 0 queries in queue
1 read views open inside InnoDB
Main thread id 6000, state: waiting for server activity
Number of rows inserted 504, updated 0, deleted 501, read 663
0.00 inserts/s, 0.00 updates/s, 0.00 deletes/s, 0.00 reads/s
----------------------------
END OF INNODB MONITOR OUTPUT

error when i want to install shop script (2 replies)

Hi

when i want to install my shop script i have an error :


You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') TYPE=InnoDB' at line 1 SQL query : CREATE TABLE SKH_system () TYPE=InnoDB


please notice : innodb engine in mysql is ON ,list of my engines :

Storage Engine Description
MyISAM Default engine as of MySQL 3.23 with great performance
MEMORY Hash based, stored in memory, useful for temporary tables
InnoDB Supports transactions, row-level locking, and foreign keys
BerkeleyDB Supports transactions and page-level locking
BLACKHOLE /dev/null storage engine (anything you write to it disappears)
EXAMPLE Example storage engine
ARCHIVE Archive storage engine
CSV CSV storage engine
ndbcluster Clustered, fault-tolerant, memory-based tables
FEDERATED Federated MySQL storage engine
MRG_MYISAM Collection of identical MyISAM tables
ISAM Obsolete storage engine



but its not default ( default is myisam) and its my innodb engine Variables in my phpadmin :



InnoDB is available on this MySQL server.

innodb_additional_mem_pool_size 1,024 KiB
1 Autoextend increment 8
innodb_buffer_pool_awe_mem_mb 0 B
2 Buffer pool size 8,192 KiB
innodb_checksums ON
innodb_commit_concurrency 0
innodb_concurrency_tickets 500
Data files ibdata1:10M:autoextend
3 Data home directory
innodb_adaptive_hash_index ON
innodb_doublewrite ON
innodb_fast_shutdown 1
innodb_file_io_threads 4
innodb_file_per_table OFF
innodb_flush_log_at_trx_commit 1
innodb_flush_method
innodb_force_recovery 0
innodb_lock_wait_timeout 50
innodb_locks_unsafe_for_binlog OFF
innodb_log_arch_dir
innodb_log_archive OFF
innodb_log_buffer_size 1,024 KiB
innodb_log_file_size 5,120 KiB
innodb_log_files_in_group 2
innodb_log_group_home_dir ./
innodb_max_dirty_pages_pct 90
innodb_max_purge_lag 0
innodb_mirrored_log_groups 1
innodb_open_files 300
innodb_rollback_on_timeout OFF
innodb_support_xa ON
innodb_sync_spin_loops 20
innodb_table_locks 0
innodb_thread_concurrency 8
innodb_thread_sleep_delay 10 k
innodb_use_legacy_cardinality_algorithm ON


i dont know what i must to do , please help me , its very necessary for me.

Thanks

transaction and foreign key costraints in mysql 5.5 with new InnoDB (2 replies)

Hi everybody,

I'm opening this thread to ask a couple of questions about the new InnoDB engine in the latest version of MySQL (now 5.5.8).

First of all, I'd like to know if there is now "full" support to transaction. With the term "full" I refer to the possibility to rollback any query executed, even those that modify the database structure: if I remember well, in previous versions of MySQL and InnoDB if, when inside a transaction, was executed a query like "ALTER TABLE ..." or similar, an implicit commit would take place. I wanted to know if such behaviour has been corrected.

Lastly, I wanted to ask if there is now support to deferred key constraint check, that is, the possibility to tell to the DB engine to defer key constraint checking until the end of the transaction.

Thanks for your attention.

Deadlock between two transactions just inserting (4 replies)

Hi

I have an "operation" in my system where I insert some rows into a table ArchivedId. Before inserting there has been no selecting (or anything else) from ArchivedId - the first thing the "operation" needs to do against table ArchivedId is to do the inserts.

Sometimes two transactions running this operation (inserting completely different rows into ArchivedId) get into a deadlock. See deadlock detection from "SHOW INNODB STATUS" below. I cannot understand why? It seems like one of the transactions already hold a S (shared) lock, while they are both trying to get a X lock. I dont understand why one of the transactions already hold the S lock, since no reading has been done from the ArchivedId table in the transactions.

On http://dev.mysql.com/doc/refman/5.1/en/innodb-deadlocks.html there is a line saying "You can get deadlocks even in the case of transactions that just insert or delete a single row". Maybe this is what happens to me?

Can someone please explain to me how I can get into this deadlock when two transactions just want to insert completely different new rows into the same table "at the same time"? And more important, what to do about it?

Regards, Per Steffensen

------ below relevant output from SHOW INNODB STATUS ----------

------------------------
LATEST DETECTED DEADLOCK
------------------------
110110 16:56:35
*** (1) TRANSACTION:
TRANSACTION 9012, ACTIVE 33 sec, process no 10416, OS thread id 140227825432336 inserting
mysql tables in use 1, locked 1
LOCK WAIT 6 lock struct(s), heap size 1216, 2 row lock(s), undo log entries 2
MySQL thread id 68, query id 845608 ubuntu104template-6.local 192.168.99.146 root update
/* */ insert into ArchivedId (id, version, createDate, description, a, name, reference, b, c, archivedIS_pid) values ('678a4f3e-9948-43de-b6da-1630123ec1d6', 0, '2011-01-10', 'Description8c449339-cf72-4bd5-aba8-bddca1ad4bd1', 'Ad4ebbabb-13a0-4251-8976-d247bdc2d9da', 'Id55703108-8090-4fe6-9317-853a35759bfa', 'Reference11060ce8-3416-4ddb-9cf6-1bebc492a138', 'B', 'C', 13)
*** (1) WAITING FOR THIS LOCK TO BE GRANTED:
RECORD LOCKS space id 50 page no 4 n bits 72 index `id` of table `tlt`.`archivedid` trx id 9012 lock_mode X insert intention waiting
Record lock, heap no 1 PHYSICAL RECORD: n_fields 1; compact format; info bits 0
0: len 8; hex 73757072656d756d; asc supremum;;

*** (2) TRANSACTION:
TRANSACTION 901F, ACTIVE 33 sec, process no 10416, OS thread id 140227827439376 inserting
mysql tables in use 1, locked 1
6 lock struct(s), heap size 1216, 2 row lock(s), undo log entries 2
MySQL thread id 57, query id 845593 ubuntu104template-4.local 192.168.99.144 root update
/* */ insert into ArchivedId (id, version, createDate, description, a, name, reference, b, c, archivedIS_pid) values ('2f3f46c3-04b8-46f6-ae2f-83bf80365337', 0, '2011-01-10', 'Description35fdc38e-e470-4ee3-bbe7-3b8a39dff516', 'Afc1d901a-8837-4ffa-83b6-da577775d6bd', 'Id9e28b96-ea2f-4795-95a5-1a508cf21070', 'Reference0dcf1812-f576-4958-aad7-43119346d83c', 'B', 'C', 12)
*** (2) HOLDS THE LOCK(S):
RECORD LOCKS space id 50 page no 4 n bits 72 index `id` of table `tlt`.`archivedid` trx id 901F lock mode S
Record lock, heap no 1 PHYSICAL RECORD: n_fields 1; compact format; info bits 0
0: len 8; hex 73757072656d756d; asc supremum;;

*** (2) WAITING FOR THIS LOCK TO BE GRANTED:
RECORD LOCKS space id 50 page no 4 n bits 72 index `id` of table `tlt`.`archivedid` trx id 901F lock_mode X insert intention waiting
Record lock, heap no 1 PHYSICAL RECORD: n_fields 1; compact format; info bits 0
0: len 8; hex 73757072656d756d; asc supremum;;

*** WE ROLL BACK TRANSACTION (2)

InnoDB is missing (3 replies)

Hi,

I'm using the mysql version
mysql Ver 14.12 Distrib 5.0.77, for redhat-linux-gnu (i686) using readline 5.1
on CentOS Linux 5.5.

When I try to use innoDB, I get the following message
Your MySQL server does not support InnoDB tables or InnoDB support is disabled.

mysql> show engines;
+------------+---------+-----------------------------------------------------------+--------------+------+------------+
| Engine | Support | Comment | Transactions | XA | Savepoints |
+------------+---------+-----------------------------------------------------------+--------------+------+------------+
| CSV | YES | CSV storage engine | NO | NO | NO |
| MRG_MYISAM | YES | Collection of identical MyISAM tables | NO | NO | NO |
| MEMORY | YES | Hash based, stored in memory, useful for temporary tables | NO | NO | NO |
| MyISAM | DEFAULT | Default engine as of MySQL 3.23 with great performance | NO | NO | NO |
+------------+---------+-----------------------------------------------------------+--------------+------+------------+
4 rows in set (0.00 sec)

The engine InnoDB is not available.

When I try to activate it in my.cnf I get the following error message:
110112 02:25:01 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
110112 2:25:01 [Warning] '--skip-locking' is deprecated and will be removed in a future release. Please use '--skip-external-locking' instead.
110112 2:25:01 [ERROR] /usr/local/mysql/libexec/mysqld: unknown variable 'innodb_data_home_dir=/var/lib/mysql/'
110112 2:25:01 [ERROR] Aborting

110112 2:25:01 [Note] /usr/local/mysql/libexec/mysqld: Shutdown complete

My my.cnf innoDB config is

# Uncomment the following if you are using InnoDB tables
innodb_data_home_dir = /var/lib/mysql/
innodb_data_file_path = ibdata1:10M:autoextend
innodb_log_group_home_dir = /var/lib/mysql/
# You can set .._buffer_pool_size up to 50 - 80 %
# of RAM but beware of setting memory usage too high
innodb_buffer_pool_size = 16M
innodb_additional_mem_pool_size = 2M
# Set .._log_file_size to 25 % of buffer pool size
innodb_log_file_size = 5M
innodb_log_buffer_size = 8M
innodb_flush_log_at_trx_commit = 1
innodb_lock_wait_timeout = 50

There is no skip-innodb parameters in the config file.

Any Idea?
Thanks for your help.

Regards
Dimitri

Memory Usage suddenly grew and never retracts (1 reply)

Hi,

I have this big Db running a number of innodb tables having tens of millions of rows. It has been running smoothly without problem and using a steady amount of memory for a long time.

We had an incident one day and when things came back up, users rush in and it loaded up the DB. The DB was using more memory than before since then. Even though the load got back to normal now, the DB is still taking up a lot of memory. It never retracted. I'm wondering if there's anything we can do to free up those memory other than restarting the DB?

DEALOCK why are locks hold by transaction 1 not shown (no replies)

Hi

I run with innodb status logging in MySQL error.log (CREATE TABLE innodb_lock_monitor (a INT) ENGINE=INNODB;)

Every time I see a deadlock it always shows a section "WAITING FOR THIS LOCK TO BE GRANTED" for transaction 1, and "HOLDS THE LOCK(S)" and "WAITING FOR THIS LOCK TO BE GRANTED" sections for transaction 2.

Why are there no "HOLDS THE LOCK(S)" section for transaction 1? Guess a transaction cannot be involved in a deadlock unless it holds at least one lock (the one transaction 2 wants)?

Regards, Per Steffensen

Example:
------------------------
LATEST DETECTED DEADLOCK
------------------------
110126 8:22:52
*** (1) TRANSACTION:
TRANSACTION 1AF6AC, ACTIVE 0 sec, process no 9646, OS thread id 140412887099152 starting index read
mysql tables in use 10, locked 3
LOCK WAIT 4 lock struct(s), heap size 1216, 2 row lock(s), undo log entries 1
MySQL thread id 231, query id 44545800 ubuntu104template-6.local 192.168.99.146 root Updating
/* */ ...
*** (1) WAITING FOR THIS LOCK TO BE GRANTED:
RECORD LOCKS ...
Record lock ... one of those that transaction 2 holds ...

*** (2) TRANSACTION:
TRANSACTION 1AF6AE, ACTIVE 0 sec, process no 9646, OS thread id 140412900144912 starting index read
mysql tables in use 1, locked 1
10 lock struct(s), heap size 1216, 20 row lock(s), undo log entries 13
MySQL thread id 63, query id 44545850 ubuntu104template-4.local 192.168.99.144 root updating
/* */ ...
*** (2) HOLDS THE LOCK(S):
RECORD LOCKS …
Record lock …

Record lock …



*** (2) WAITING FOR THIS LOCK TO BE GRANTED:
RECORD LOCKS …
Record lock …

*** WE ROLL BACK TRANSACTION (1)

How many have InnoDB engine turned off/on? (2 replies)

Hi,

as I am developing a web application where transactions are a very helpful thing, I just want to know how many of you have turned the support on/off. Because it is an OpenSource application I want to reach many people and in fact systems where it can be run.

Thanks!
Best regards,
Daniel M.

Converting a huge myisam table to innodb (9 replies)

I have a huge myisam table (~30GB on disk) that I need to convert to innodb.
On a test machine, I tried using "alter table", which took about three days to complete.
That won't work at all, the system is live and I have a window of about four hours.

I guess the first question is, what information do I need to provide so that the good folks here can help me?

Thanks!

Got error 139 from storage engine (1 reply)

I have an InnoDB table that has a text field, longblob, a few bigint unsigned fields, and a varchar(128) that has been in our database for some time now. All of a sudden I am getting the following error when I try to select the logblob field in one of the rows:

ERROR 1030 (HY000): Got error 139 from storage engine

Any help would be greatly appreciated.

rsync corruption mystery (2 replies)

Most of my databases use MyIsam tables. However, I've been experimenting with Drupal, which uses InnoDB tables. This is on a test machine, which serves double duty as a backup machine. So, this is not a critical issue, yet I'd like to find the solution.

Here's my problem, I run an rsync backup script like this -- /etc/init.d/mysqld stop
rsync -aHuv --progress --exclude 'drupal' --exclude 'mysql' --exclude 'mysql.sock' --delete --inplace --force --rsh='ssh -p202' /var/lib/mysql/ root@xx.xx.xxx.xx:/var/lib/mysql > /var/log/rsync_mysql.log
/etc/init.d/mysqld start

What I'm doing here is backing up the MySQL directory from another machine, but ignoring the drupal directory, because it is only on my test machine at the moment. Whenever this script runs, the drupal directory becomes corrupted. I can view all the tables with SHOW TABLES command, all the .frm files are in place. But if I try to access the tables, MySQL sends an error 1146 telling me the table does not exist. I'd like to figure out why I am corrupting this one database with the rsync script. Any ideas?

InnoDB: Failing assertion: page_get_n_recs(page) > 1 (1 reply)

Hi,

i am in the process of evaluating MySQL 5.5.8 (InnoDB 1.1.4) on a test server for several months now.

Same error occured several months ago with MySQL 5.5.7 (Innodb 1.1.3)

About once a month the database crashes without possibility to be repaired.

Same software runs fine on several 24/7 systems with MySQL 5.0.51a

Error i get is:

110128 9:25:27 InnoDB: Assertion failure in thread 1115703616 in file /export/home/pb2/build/sb_0-2629600-1291407776.04/rpm/BUILD/mysql-5.5.8/mysql-5.5.8/storage/innobase/ibuf/ibuf0ibuf.c line 4069

InnoDB: Failing assertion: page_get_n_recs(page) > 1

MySQL tries to start again but fails indefinitely.
Force recovery with level 4 was not successful.

Before i generate a bug report (err file tells to do that) i want to check if this error is known to anyone else.

kind regards,

Toni

PS: Test server is FSI TX200S2 2*Xeon EM64T 3 GHz 2mb SLc 4 GB RAM Hardware RAID LSI 128 MB, SLES10 (x86_64) SP3, MySQL Community 64bit

Adding primary key to large InnoDB table (1 reply)

Hi

I have a table with around 30 million rows. The table does not have a primary key, but has a foreign key to another table. There are on average around 10 rows in this table for each row in the other table (i.e. there are around 3 million rows in the other table).

I want to add a primary key to the larger table (there is already one on the smaller table) and am not sure how best to go about this.

I understand InnoDB has an internal record ID and was wondering if I could use that somehow. How do I access it?

Or would it be better to SELECT INTO OUTFILE... add an ID field to the file and then LOAD FILE again after recreating the table with the primary key?
Viewing all 1956 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>