Re: MySQL 4.0 released

2002-02-15 Thread Huang-Ming

Hello,

I'm encountering a serious program fault at using MySQL Win32 client library
LIBMYSQL.DLL.

I found LIBMYSQL.DLL not thread-safe. When 10 threads are launched to run
the following two blocks of C statements, very quickly a program fault
window pops up to LIBMYSQL.DLL.

 block #1 -
EnterCriticalSection(dcs);
mysql_real_query(db,stmt,strlen(stmt));
res=mysql_store_result(db);
LeaveCriticalSection(dcs);

 block #1 - (in another C function)
EnterCriticalSection(dcs);
row=mysql_fetch_row(res);
nfld=mysql_num_fields(res);
flds=mysql_fetch_fields(res);
LeaveCriticalSection(dcs);

But, if I merged the two blocks into one as:

EnterCriticalSection(dcs);
mysql_real_query(db,stmt,strlen(stmt));
res=mysql_store_result(db);
row=mysql_fetch_row(res);
nfld=mysql_num_fields(res);
flds=mysql_fetch_fields(res);
LeaveCriticalSection(dcs);

then, the threads run fine for hours without any program fault pop up.

HOWEVER, the second scenario is irrelevant to my (and most multithreaded)
application where there are many nested queries of rows.

Is there any thread-safe LIBMYSQL.DLL downloadable on mysql.com?? or is
there any other solution to make SQL queries by simultaneous threads safe?

Thank You!

Best Regards,
Peter

- Original Message -
From: Michael Widenius [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Tuesday, October 16, 2001 6:29 AM
Subject: MySQL 4.0 released



 Hi!

 MySQL 4.0.0-alpha is now available at:
 http://www.mysql.com/downloads/mysql-4.0.html

 You can find information about upgrading from MySQL 3.23 to 4.0 at:
 http://www.mysql.com/doc/U/p/Upgrading-from-3.23.html

 The MySQL 4.0 release includes a lot of new exciting features, like
 MySQL as an embedded library, InnoDB (transactions) as standard table
 type, UNION, multi table delete and much more.

 MySQL 4.0 is basically a 'reconstruction release' that will enable us to
 easier add new features to MySQL in the future.  The intention is to
 quickly add features list at:

 http://www.mysql.com/doc/T/O/TODO_MySQL_4.0.html

 and then start to work on the 4.1 branch while 4.0 stabilizes.

 Changes in release 4.0.0
 

* Added documentation for `libmysqld', the embedded MySQL server
  library.  Also added example programs (a `mysql' client and
  `mysqltest' test program) which use `libmysqld'.

* Removed all Gemini hooks from MySQL.

* Removed `my_thread_init()' and `my_thread_end()' from mysql_com.h,
  and added `mysql_thread_init()' and `mysql_thread_end()' to
  mysql.h.

* Secure connections (with SSL).

* Unsigned `BIGINT' constants now work. `MIN()' and `MAX()' now
  handles signed and unsigned `BIGINT' numbers correctly.

* New character set `latin_de' which provides correct German sorting.

* `TRUNCATE TABLE' and `DELETE FROM table_name' are now separate
  functions. One bonus is that `DELETE FROM table_name' now returns
  the number of deleted rows.

* `DROP DATABASE' now executes a `DROP TABLE' on all tables in the
  database, which fixes a problem with InnoDB tables.

* Added support for `UNION'.

* A new `HANDLER' interface to `MyISAM' tables.

* Added support for `INSERT' on `MERGE' tables. Patch from Benjamin
  Pflugmann.

* Changed `WEEK(#,0)' to match the calender in the USA.

* `COUNT(DISTINCT)' is about 30% faster.

* Speed up all internal list handling.

* Speed up `IS NULL()' and some other internal primitives.

* Creating full text indexes are now much faster.

* Tree-like cache to speed up bulk inserts and
  `myisam_bulk_insert_tree_size' variable.

* Searching on packed (`CHAR'/`VARCHAR') keys are now much faster.

* Optimized queries of type: `SELECT DISTINCT * from table_name
  ORDER by key_part1 LIMIT #'

* `SHOW CREATE TABLE' now shows all table attributes.

* `ORDER BY ... DESC' can now use keys.

* `LOAD DATA FROM MASTER' auto-magically sets up a slave.

* Renamed `safe_mysqld' to `mysqld_safe'.

* Added support for symbolic links to `MyISAM' tables. Symlink
  handling is now enabled by default for Windows.

* `LOAD DATA FROM MASTER' auto-magically sets up a slave.

* Added `SQL_CALC_FOUND_ROWS' and `FOUND_ROWS()'. This makes it
  possible to know how many rows a query would have returned without
  a `LIMIT' clause.

* Changed output format of `SHOW OPEN TABLES'.

* Allow `SELECT expression LIMIT ...'.

* Added `IDENTITY' as a synonym for `AUTO_INCREMENT' (like Sybase).

* Added `ORDER BY' syntax to `UPDATE' and `DELETE'.

* `SHOW INDEXES' is now a synonym for `SHOW INDEX'.

* Added `ALTER TABLE table_name DISABLE KEYS' and `ALTER TABLE
  table_name ENABLE KEYS' commands.

* Allow one to use `IN' instead of `FROM' in `SHOW' commands.

* Allow ANSI SQL syntax `X'hexadecimal-number''

* 

Re: MySQL constantly crash on BLOB insertions...

2001-01-22 Thread Huang-Ming

hi,

the fatal "MySQL gone away..." error remains outstanding even after i upgraded 3.22.25 
to 3.23.31 just now. i also run mysql_convert_table_format with my database, which 
should have converted all tables to MyISAM format.

does anybody have good idea of working around this? i cannot go on any more!!!

s.o.ss.o.ss.o.s

thanks.
peter
  - Original Message - 
  From: Huang-Ming 
  To: [EMAIL PROTECTED] 
  Cc: [EMAIL PROTECTED] 
  Sent: Monday, January 22, 2001 9:33 AM
  Subject: MySQL constantly crash on BLOB insertions...


  hi sirs,

  i met a serious bug on inserting a 900+KB data into a LONGBLOB column. 

  the error shows 

   "MySQL server has gone away on executingSQL=
INSERT INTO ebody(rtime,body,size,subj,pri,froms,tos,ccs,bccs,nattach,msgid) 
VALUES(date_add(curdate(),interval curtime() hour_second),?,?,?,?,?,?,?,?,?,?) "

  it seems occurring only on insertions of "big data", eg. data500KB. but when the 
  error occurs, it still has NO problem to insert smaller data, eg. 100KB- data. so the
  fault might happen only to big data insertion.

  i'm using MySQL 3.22.25. 

  this is schema of table 'ebody': (it has 75 rows now)

  create table ebody( 
   bid integer auto_increment not null,
   msgid   varchar(80) not null, 
   bodylongtext,  
   length  integer,  
   subjvarchar(128),  
   pri tinyint,  
   rtime   datetime,  
   froms   varchar(80),  
   tos text,   
   ccs text,   
   bccstext,   
   nattach tinyint,  
   #
   KEY i_msgid (msgid(8)), 
   PRIMARY KEY (bid)
   );

  for your easier insepction, i also attach log message of my application which 
  is a Perl5 script and is NOT running under mod_perl.

  at your earliest convenience, please advise me on how to go on inserting big data
  to this table. eg., should i need to upgrade to 2.23.31 for this problem.

  thanks a lot.
  Peter Pan

   



Re: MySQL constantly crash on BLOB insertions...

2001-01-22 Thread Huang-Ming


hi Tim,

thanks for the prompt response which is hard to be seen with Oracle and Microsoft.

sorry, i should have had studied hard the manual a year ago. regarding the error, 
however, would the error message be better to tell users to adjust relevant 
configuration than only to say "MySQL gone away"? it's misleading to some serious 
fault in MySQL which actually is not therein, isn't it?

thanks anyway.
peter

- Original Message - 
From: Thimble Smith [EMAIL PROTECTED]
To: Huang-Ming [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Monday, January 22, 2001 7:04 PM
Subject: Re: MySQL constantly crash on BLOB insertions...


 On Mon, Jan 22, 2001 at 12:33:46PM +0200, Thimble Smith wrote:
  I can repeat this problem; I'm looking into it and we'll hopefully
  have a patch for it shortly.
 
 Well, the problem is simply that max_allowed_packet needs to
 be increased.  Check the manual entry.
 
 http://mysql.tonnikala.org/doc/S/H/SHOW_VARIABLES.html
 
 Tim
 
 -- 
__  ___ ___   __
   /  |/  /_ __/ __/ __ \/ /Tim Smith [EMAIL PROTECTED]
  / /|_/ / // /\ \/ /_/ / /__   MySQL AB, Development Team
 /_/  /_/\_, /___/\___\_\___/   Helsinki, Finland (for a few weeks)
___/   www.mysql.com
 



MySQL constantly crash on BLOB insertions...

2001-01-21 Thread Huang-Ming



hi sirs,

i met a serious bug on 
inserting a 900+KB data into a LONGBLOB column. 

the error shows 


"MySQL server has gone away on executingSQL= INSERT INTO 
ebody(rtime,body,size,subj,pri,froms,tos,ccs,bccs,nattach,msgid)  
VALUES(date_add(curdate(),interval curtime() hour_second),?,?,?,?,?,?,?,?,?,?) 
"

it seems occurring only on 
insertions of "big data", eg. data500KB. but when the error occurs, it 
still has no problem to inset smaller data, eg. 100KB- data. so the
fault might happen only to 
big data insertion.

i'm using MySQL 3.22.25. 


this is schema of table 
'ebody': (it has 75 rows now)

create table 
ebody(bid integerauto_increment 
not null,msgid varchar(80) not 
null,bodylongtext,lengthinteger,subjvarchar(128),pri 
tinyint,rtime 
datetime,froms 
varchar(80),tostext,ccs 
text,bccs 
text,nattachtinyint,#KEY 
i_msgid(msgid(8)),PRIMARY 
KEY(bid));

for your easier insepction, 
i also attach log message of my application which is a Perl5 script and is 
NOT running under mod_perl.

at your earliest 
convenience, please advise me on how to go on inserting big datato this 
table. eg., should i need to upgrade to 2.23.31 for this problem.

thanks a lot.
Peter Pan



Mailhost=vmail.unknown.com
Domain=unknown.com
child 177 working: SOCKIO::Socket::INET=GLOB(0x85f2e50)TOARRAY(0x85f2e44)FROMMSG
-- SMTP server 177 starts --
---MIME headers---
subject=444
[EMAIL PROTECTED]
from=pipi [EMAIL PROTECTED]
content-type=multipart/mixed; boundary="5747514527BE3D5B45C15B20"
mime-version=1.0
date=Mon, 22 Jan 2001 07:38:19 +0800
message-id=[EMAIL PROTECTED]
x-mailer=Mozilla 4.05 [en] (Win95; I)
---end MIME headers---
Local: [EMAIL PROTECTED]
Relay: 
boundary=5747514527BE3D5B45C15B20
Attachment: 1.14R2 B1 (to all).zip (163700 bytes)
(177): LOCK TABLES ebody WRITE
(177): INSERT INTO ebody(rtime,body,size,subj,pri,froms,tos,ccs,bccs,nattach,msgid) 
VALUES(date_add(curdate(),interval curtime() hour_second),?,?,?,?,?,?,?,?,?,?)
(177): SELECT last_insert_id() FROM ebody
(177): UNLOCK TABLES
(177): SELECT value FROM sption WHERE name='blocks'
(177): SELECT uid FROM alias WHERE alias='panpipi'
user([EMAIL PROTECTED])=1
(177): SELECT options,blocks FROM eption WHERE uid=1
(177): SELECT areply,signature FROM eption WHERE uid=1
(177): SELECT date_add(curdate(),INTERVAL curtime() HOUR_SECOND)
(177): SELECT filters FROM eption WHERE uid=1
(177): SELECT date_add(curdate(),INTERVAL curtime() HOUR_SECOND)
(177): SELECT sum(size) FROM email,ebody WHERE oid='1' AND email.bid=ebody.bid
(177): SELECT sum(size) FROM email,ebody WHERE oid='1' AND email.bid=ebody.bid
(177): INSERT INTO email(bid,fid,oid,filtered) VALUES('75','0','1',?)
-- SMTP server 177 exits --
child 179 working: SOCKIO::Socket::INET=GLOB(0x85f5200)TOARRAY(0x814878c)FROMMSG
-- SMTP server 179 starts --
---MIME headers---
subject=all.zip
[EMAIL PROTECTED]
from=pipi [EMAIL PROTECTED]
content-type=multipart/mixed; boundary="C6046A0F3A7DD29D3AE1F1B9"
mime-version=1.0
date=Mon, 22 Jan 2001 07:38:21 +0800
message-id=[EMAIL PROTECTED]
x-mailer=Mozilla 4.05 [en] (Win95; I)
---end MIME headers---
Local: [EMAIL PROTECTED]
Relay: 
boundary=C6046A0F3A7DD29D3AE1F1B9
Attachment: 1.14R2 B1 (to all).zip (163700 bytes)
(179): LOCK TABLES ebody WRITE
(179): INSERT INTO ebody(rtime,body,size,subj,pri,froms,tos,ccs,bccs,nattach,msgid) 
VALUES(date_add(curdate(),interval curtime() hour_second),?,?,?,?,?,?,?,?,?,?)
(179): SELECT last_insert_id() FROM ebody
(179): UNLOCK TABLES
(179): SELECT value FROM sption WHERE name='blocks'
(179): SELECT uid FROM alias WHERE alias='panpipi'
user([EMAIL PROTECTED])=1
(179): SELECT options,blocks FROM eption WHERE uid=1
(179): SELECT areply,signature FROM eption WHERE uid=1
(179): SELECT date_add(curdate(),INTERVAL curtime() HOUR_SECOND)
(179): SELECT filters FROM eption WHERE uid=1
(179): SELECT date_add(curdate(),INTERVAL curtime() HOUR_SECOND)
(179): SELECT sum(size) FROM email,ebody WHERE oid='1' AND email.bid=ebody.bid
(179): SELECT sum(size) FROM email,ebody WHERE oid='1' AND email.bid=ebody.bid
(179): INSERT INTO email(bid,fid,oid,filtered) VALUES('76','0','1',?)
-- SMTP server 179 exits --
child 182 working: SOCKIO::Socket::INET=GLOB(0x85f2e5c)TOARRAY(0x85f2e2c)FROMMSG
-- SMTP server 182 starts --
---MIME headers---
subject=9
[EMAIL PROTECTED]
from=pipi [EMAIL PROTECTED]
content-type=multipart/mixed; boundary="83A59136D174F01D5551A302"
mime-version=1.0
date=Mon, 22 Jan 2001 07:40:02 +0800
message-id=[EMAIL PROTECTED]
x-mailer=Mozilla 4.05 [en] (Win95; I)
---end MIME headers---
Local: [EMAIL PROTECTED]
Relay: 
boundary=83A59136D174F01D5551A302
Attachment: J-Pcrystal.zip (1348720 bytes)
(182): LOCK TABLES ebody WRITE
(182): INSERT INTO ebody(rtime,body,size,subj,pri,froms,tos,ccs,bccs,nattach,msgid) 
VALUES(date_add(curdate(),interval curtime() hour_second),?,?,?,?,?,?,?,?,?,?)
(182):