Slow MySQL Workbench startup

2011-01-09 Thread Yves Goergen
Hello,

Why does it take ages for MySQL Workbench to startup? When I start it
(5.2.31 CE) on Windows (XP), the splash screen sits there around 15-30
seconds until the main window appears. There's moderate to high CPU
usage in this time and the hard disk is active. I believe this has been
much faster in the past.

-- 
Yves Goergen LonelyPixel nospam.l...@unclassified.de
Visit my web laboratory at http://beta.unclassified.de

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



Re: Slow MySQL Workbench startup

2011-01-09 Thread Felix E. Klee
On Sun, Jan 9, 2011 at 1:54 PM, Yves Goergen
nospam.l...@unclassified.de wrote:
 Why does it take ages for MySQL Workbench to startup?

I rarely use MySQL Workbench. But I remember that reducing the maximum
number of items in the undo history greatly improves speed, though maybe
not startup time.

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



RE: export result from select statement

2011-01-09 Thread Jerry Schwartz
The technique I've settled on is this:

mysql blah blah blah  the_select_query.sql  the_output_i_want.txt

That gives you a tab-delimited text file with column headings.

Regards,

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

860.674.8796 / FAX: 860.674.8341
E-mail: je...@gii.co.jp
Web site: www.the-infoshop.com

-Original Message-
From: LAMP [mailto:l...@afan.net]
Sent: Saturday, January 08, 2011 6:05 PM
To: mysql@lists.mysql.com
Subject: export result from select statement

Hi guys,
I wonder how to store to csv or txt file result from SELECT query?
not a whole table nor database. Just results from SELECT query.
Usually I use MySQL Query Browser and Export feature, but in this
case I don't have access with MySQL Query Browser. Though, I have a
command line access.
I found on one place something like
#SELECT 2+2 into outfile '/path/to/specific/directory/test.csv';
Though, it doesn't work?!?

Thanks.

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=je...@gii.co.jp





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



Re: export result from select statement

2011-01-09 Thread Michael Dykman
I  second Jerry's recommendation.  It always works like a charm for me.

 - michael dykman

On Sun, Jan 9, 2011 at 2:44 PM, Jerry Schwartz je...@gii.co.jp wrote:
 The technique I've settled on is this:

 mysql blah blah blah  the_select_query.sql  the_output_i_want.txt

 That gives you a tab-delimited text file with column headings.

 Regards,

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

 860.674.8796 / FAX: 860.674.8341
 E-mail: je...@gii.co.jp
 Web site: www.the-infoshop.com

-Original Message-
From: LAMP [mailto:l...@afan.net]
Sent: Saturday, January 08, 2011 6:05 PM
To: mysql@lists.mysql.com
Subject: export result from select statement

Hi guys,
I wonder how to store to csv or txt file result from SELECT query?
not a whole table nor database. Just results from SELECT query.
Usually I use MySQL Query Browser and Export feature, but in this
case I don't have access with MySQL Query Browser. Though, I have a
command line access.
I found on one place something like
#SELECT 2+2 into outfile '/path/to/specific/directory/test.csv';
Though, it doesn't work?!?

Thanks.

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/mysql?unsub=je...@gii.co.jp





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





-- 
 - michael dykman
 - mdyk...@gmail.com

 May the Source be with you.

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



Re: export result from select statement

2011-01-09 Thread LAMP

Eric Bergen wrote:

select into outfile is the correct way. What do you mean by doesn't
work? Does it give you an error?
  

It was an issue with permissions :-)

Thanks


On Sat, Jan 8, 2011 at 3:04 PM, LAMP l...@afan.net wrote:
  

Hi guys,
I wonder how to store to csv or txt file result from SELECT query? not a
whole table nor database. Just results from SELECT query.
Usually I use MySQL Query Browser and Export feature, but in this case I
don't have access with MySQL Query Browser. Though, I have a command line
access.
I found on one place something like
#SELECT 2+2 into outfile '/path/to/specific/directory/test.csv';
Though, it doesn't work?!?

Thanks.

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







  




Re: export result from select statement

2011-01-09 Thread LAMP

maybe it's clear to other but it's pretty unclear.
#mysql -username -p select * from table_name where id=123  
'/home/me/test/test.txt'

actually doesn't work?!?



Jerry Schwartz wrote:

The technique I've settled on is this:

mysql blah blah blah  the_select_query.sql  the_output_i_want.txt

That gives you a tab-delimited text file with column headings.

Regards,

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

860.674.8796 / FAX: 860.674.8341
E-mail: je...@gii.co.jp
Web site: www.the-infoshop.com

  

-Original Message-
From: LAMP [mailto:l...@afan.net]
Sent: Saturday, January 08, 2011 6:05 PM
To: mysql@lists.mysql.com
Subject: export result from select statement

Hi guys,
I wonder how to store to csv or txt file result from SELECT query?
not a whole table nor database. Just results from SELECT query.
Usually I use MySQL Query Browser and Export feature, but in this
case I don't have access with MySQL Query Browser. Though, I have a
command line access.
I found on one place something like
#SELECT 2+2 into outfile '/path/to/specific/directory/test.csv';
Though, it doesn't work?!?

Thanks.

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=je...@gii.co.jp







  




Reading .MYD file of Mysql Tables

2011-01-09 Thread Adarsh Sharma

Dear all,

I am facing a issue which should be resolved by editing .MYD file of a 
Table.


I know there are 3 files foe a MyISAM table in Mysql but i want to read 
and edit some changes in .MYD file.


If it is possible , Can anyone PLease tell me the way to do this.


Thanks  Regards

Adarsh Sharma

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



Re: Reading .MYD file of Mysql Tables

2011-01-09 Thread Reindl Harald
Why in the world will you manually change a binary file form a db-server
instead using sql-statements?

I would mean this is russian roulette with no winning chance

Am 10.01.2011 05:14, schrieb Adarsh Sharma:
 Dear all,
 
 I am facing a issue which should be resolved by editing .MYD file of a Table.
 
 I know there are 3 files foe a MyISAM table in Mysql but i want to read and 
 edit some changes in .MYD file.
 
 If it is possible , Can anyone PLease tell me the way to do this.
 
 
 Thanks  Regards
 Adarsh Sharma



signature.asc
Description: OpenPGP digital signature


Re: Help needed with what appears to be a corrupted innodb db

2011-01-09 Thread Ananda Kumar
Pito,

can u show us the innodb parameters in the my.cnf file.

regards
anandkl

On Sat, Jan 8, 2011 at 10:31 PM, Pito Salas r...@salas.com wrote:

 I am very new to trying to solve a problem like this and have searched
 and searched the web for a useful troubleshooting guide but I am
 honestly stuck. I wonder if anyone out there could take a look at this
 bit of mysqld log. Any help at all would be greatly appreciated!!!

 Pito

 110107 15:07:15  mysqld started
 110107 15:07:15  InnoDB: Database was not shut down normally!
 InnoDB: Starting crash recovery.
 InnoDB: Reading tablespace information from the .ibd files...
 InnoDB: Restoring possible half-written data pages from the doublewrite
 InnoDB: buffer...
 110107 15:07:15  InnoDB: Starting log scan based on checkpoint at
 InnoDB: log sequence number 35 515914826.
 InnoDB: Doing recovery: scanned up to log sequence number 35 515915839
 InnoDB: 1 transaction(s) which must be rolled back or cleaned up
 InnoDB: in total 1 row operations to undo
 InnoDB: Trx id counter is 0 1697553664
 110107 15:07:15  InnoDB: Starting an apply batch of log records to the
 database...
 InnoDB: Progress in percents: 26 27 28 29 30 31 32 33 34 35 36 37 38
 39 40 41 42 43 44
 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67
 68 69 70 71 72 73
 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98
 99
 InnoDB: Apply batch completed
 InnoDB: Starting rollback of uncommitted transactions
 InnoDB: Rolling back trx with id 0 1697553198, 1 rows to undoInnoDB:
 Error: trying to
 access page number 3522914176 in space 0,
 InnoDB: space name ./ibdata1,
 InnoDB: which is outside the tablespace bounds.
 InnoDB: Byte offset 0, len 16384, i/o type 10
 110107 15:07:15InnoDB: Assertion failure in thread 3086403264 in file
 fil0fil.c line
 3922
 InnoDB: We intentionally generate a memory trap.
 InnoDB: Submit a detailed bug report to http://bugs.mysql.com.
 InnoDB: If you get repeated assertion failures or crashes, even
 InnoDB: immediately after the mysqld startup, there may be
 InnoDB: corruption in the InnoDB tablespace. Please refer to
 InnoDB: http://dev.mysql.com/doc/mysql/en/Forcing_recovery.html
 InnoDB: about forcing recovery.
 mysqld got signal 11;

 This could be because you hit a bug. It is also possible that this binary
 or one of the libraries it was linked against is corrupt, improperly built,
 or misconfigured. This error can also be caused by malfunctioning hardware.
 We will try our best to scrape up some info that will hopefully help
 diagnose
 the problem, but since we have already crashed, something is definitely
 wrong
 and this may fail.

 key_buffer_size=0
 read_buffer_size=131072
 max_used_connections=0
 max_connections=100
 threads_connected=0
 It is possible that mysqld could use up to
 key_buffer_size + (read_buffer_size +
 sort_buffer_size)*max_connections = 217599 K
 bytes of memory
 Hope that's ok; if not, decrease some variables in the equation.

 thd=(nil)
 Attempting backtrace. You can use the following information to find out
 where mysqld died. If you see no messages after this, something went
 terribly wrong...
 Cannot determine thread, fp=0xbffc55ac, backtrace may not be correct.
 Stack range sanity check OK, backtrace follows:
 0x8139eec
 0x83721d5
 0x833d897
 0x833db71
 0x832aa38
 0x835f025
 0x835f7a3
 0x830a77e
 0x8326b57
 0x831c825
 0x8317b8d
 0x82a9e66
 0x8315732
 0x834fc9a
 0x828d7c3
 0x81c29dd
 0x81b5620
 0x813d9fe
 0x40fdf3
 0x80d5ff1
 New value of fp=(nil) failed sanity check, terminating stack trace!

  Please read http://dev.mysql.com/doc/mysql/en/Using_stack_trace.html
 and follow
 instructions on how to resolve the stack trace. Resolved
 stack trace is much more helpful in diagnosing the problem, so please do
 resolve it The manual page at 
 http://www.mysql.com/doc/en/Crashing.htmlcontains
 information that should help you find out what is causing the crash.
 110107 15:07:15  mysqld ended

 --
 Check out http://www.salas.com and http://www.blogbridge.com/look

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




bug (or feature?) with mysqli_prepare

2011-01-09 Thread Артем Лапковский
I have a problem with mysqli_prepare function, it doesn't work properly
calling a stored procedure which contains prepare itself.

PHP example code:
?
$db = mysqli_connect(localhost,user,password,real);
$stmt = mysqli_prepare($db, call testproc_safe2_prep(?,?));
mysqli_stmt_bind_param($stmt,'ss', $_GET['param1'],$_GET['param2']);
mysqli_stmt_execute($stmt);
mysqli_stmt_bind_result($stmt, $name);

while (mysqli_stmt_fetch($stmt)) {
echo $name;
echo  ;
}
mysqli_stmt_close($stmt);
?

My procedure:

PROCEDURE `real`.testproc_safe2_prep(IN param1 VARCHAR(255), IN param2
VARCHAR(255))
BEGIN

SET @query = 'SELECT field1 FROM test_table WHERE 1=1';

IF param1 IS NOT NULL Then
SET @query = CONCAT(@query, ' AND criteria1 = ', param1);
END IF;

IF param2 IS NOT NULL Then
SET @query = CONCAT(@query, ' AND criteria2 = ', param2);
END IF;

PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
END

When i open php script i get smth like this:
http://i013.radikal.ru/1101/c3/362690f7380d.jpg

I have another procedure, that does all the same as the first one:

PROCEDURE `real`.testproc_safe2_case(IN param1 VARCHAR(255), IN param2
VARCHAR(255))
BEGIN

SELECT field1 FROM test_table
WHERE 1 = 1
AND CASE WHEN param1 IS NULL THEN 1
ELSE CASE WHEN criteria1 = param1 THEN 1
ELSE 0 END END = 1
AND CASE WHEN param2 IS NULL THEN 1
ELSE CASE WHEN criteria2 = param2 THEN 1
ELSE 0 END END = 1;


END

So, when i change this way:
$stmt = mysqli_prepare($db, call testproc_safe2_case(?,?));

everything works fine:
http://s52.radikal.ru/i138/1101/26/2e29daf0daa4.jpg

The procedures do the same thing, first using prepare and the second using
case. But why first doesn't work with mysqli_prepare?

Example of launching using console:

mysql call testproc_safe2_prep(1,1);
+---+
| field1 |
+---+
| Kuznetsov |
+---+
1 row in set (0.00 sec)

Query OK, 0 rows affected (0.00 sec)

mysql call testproc_safe2_case(1,1);
+---+
| field1 |
+---+
| Kuznetsov |
+---+
1 row in set (0.00 sec)

Query OK, 0 rows affected (0.00 sec)

mysql select * from test_table;
++---+---+---+
| id | field1 | criteria1 | criteria2 |
++---+---+---+
| 1 | Ivanov | 0 | 0 |
| 2 | Petrov | 0 | 1 |
| 3 | Sidorov | 1 | 0 |
| 4 | Kuznetsov | 1 | 1 |
++---+---+---+
4 rows in set (0.00 sec)

mysql select version();
+-+
| version() |
+-+
| 5.0.45-community-nt |
+-+
1 row in set (0.00 sec)

How i can use mysqli_prepare to work properly with the first procedure?
Maybe it was fixed in new versions or it's not a bug?


Re: export result from select statement

2011-01-09 Thread Yogesh Kore
#mysql -username -p -e  select * from table_name where id=123 
'/home/me/test/test.txt'


On Mon, Jan 10, 2011 at 8:15 AM, LAMP l...@afan.net wrote:

 maybe it's clear to other but it's pretty unclear.
 #mysql -username -p select * from table_name where id=123 
 '/home/me/test/test.txt'
 actually doesn't work?!?




 Jerry Schwartz wrote:

 The technique I've settled on is this:

 mysql blah blah blah  the_select_query.sql  the_output_i_want.txt

 That gives you a tab-delimited text file with column headings.

 Regards,

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

 860.674.8796 / FAX: 860.674.8341
 E-mail: je...@gii.co.jp
 Web site: www.the-infoshop.com



 -Original Message-
 From: LAMP [mailto:l...@afan.net]
 Sent: Saturday, January 08, 2011 6:05 PM
 To: mysql@lists.mysql.com
 Subject: export result from select statement

 Hi guys,
 I wonder how to store to csv or txt file result from SELECT query?
 not a whole table nor database. Just results from SELECT query.
 Usually I use MySQL Query Browser and Export feature, but in this
 case I don't have access with MySQL Query Browser. Though, I have a
 command line access.
 I found on one place something like
 #SELECT 2+2 into outfile '/path/to/specific/directory/test.csv';
 Though, it doesn't work?!?

 Thanks.

 --
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:http://lists.mysql.com/mysql?unsub=je...@gii.co.jp