Re: secure connection (SSL/SSH tunneling) with windows client

2001-05-22 Thread Lutz Jaenicke

On Tue, May 22, 2001 at 12:51:50AM +, [EMAIL PROTECTED] wrote:
I know this has been discussed a lot. I did read the mail archive and
 found lots of interesting info. Although I have a problem. We're developing
 a windows software that has to exchange sensitive data with a mySQL server.
 I read about implementing a SSH tunnel. It works well, although I have not
 found a free ssh client for windows. Even if I did, it would not be really
 helpful as we don't want to explain to our users they have to install a
 third party software that does IP tunneling in order to transmit data
 securely. Any suggestions? 
 
Even if SSL support was added to mySQL, I guess I'd still have to wait
 for SSL support in the client libs we use on windows (ZeosLib)...

Hmm. If you want encryption, somebody has to add it at some point in time...

For free SSH clients: you may find links via http://www.openssh.com/
The problem with SSH tunneling is that you need an account on the target
machine to open the SSH connection. It has the advantage that once the
connection has been established, no further overhead is added (except
the actual encryption/decryption).
For SSL: if you don't integrate SSL into your product, you can use the
stunnel software (http://www.stunnel.org) to tunnel your connections.
This works without accounts on the target machines. You may see a significant
performance impact, as each new SSL connection requires a cryptograpic
handshake. (Every time a connection to the database is opened. If you
open it once and leave it open, that's fine. If you are using
open-transaction-close cycles, its horrible. In the long run for a
complete integration this problem can be tackled with session caching
but it is not available for an stunnel solution, AFAIK.)
http://www.stunnel.org/examples/mysql.html

I am ready to encrypt every sensitive fields in the database, although I
 am wondering if the username and password will be transferred in plain
 text. I've seen somewhere that it isn't, but what kind of
 security/encryption is used and can we consider it safe?

Both the designers of the SSH and the TLS/SSL protocols have spent
a considerable amount of time to design the protocols to be secure
and tamper proof (think of man-in-the-middle attacks) when correctly
used and it took more than one iteration to bring it to the state it is now.
I would therefore recommend to stay with these solutions.

Best regards,
Lutz
-- 
Lutz Jaenicke [EMAIL PROTECTED]
BTU Cottbus   http://www.aet.TU-Cottbus.DE/personen/jaenicke/
Lehrstuhl Allgemeine Elektrotechnik  Tel. +49 355 69-4129
Universitaetsplatz 3-4, D-03044 Cottbus  Fax. +49 355 69-4153

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: MySQL on HP/UX 10.20 problem

2001-04-24 Thread Lutz Jaenicke

 Installing all prepared tables
 010423 11:09:07 Warning: setrlimit couldn't increase number of open files
 to more than 200
 010423 11:09:07 Warning: Changed limits: max_connections:
 100 table_cache: 64
 scripts/mysql_install_db[284]: 15102 Memory fault(coredump)
 Installation of grant tables failed!
 
 Having searched for other solutions, one recommendation from a MySQL 
 developer was to look at the MySQL Manual for HP/UX and install all 
 necessary patches. My questions/comments are:
 1) How many open files does MySQL require? Different people have reported 
 different numbers where MySQL doesn't work.

I don't know how much open files are needed. If finally depends on your
usage. I have long since increased the number of open files allowed from
the system default, so I really cannot say.
(Note that for each connection you will need file descriptors, so when
you intend to use a lot of parallel connections, you can expect to run
into trouble, if you do not increase the limit. I your usage is low,
it may work well for you.)

 2) Which patches do I need? The person mention DCE but nothing else. I have 
 not found anything on the HP/UX pages saying which patches are required for 
 MySQL.

If it is missing in the documentation, it should be corrected. If you
check out the mailing list archive, you will see the requirement to install
the DCE patches: PHSS_19739 (required), PHSS_20608 (not sure if required,
but at least recommended.)
Your memory fault problem above is caused by the misssing patches.


Best regards,
Lutz
-- 
Lutz Jaenicke [EMAIL PROTECTED]
BTU Cottbus   http://www.aet.TU-Cottbus.DE/personen/jaenicke/
Lehrstuhl Allgemeine Elektrotechnik  Tel. +49 355 69-4129
Universitaetsplatz 3-4, D-03044 Cottbus  Fax. +49 355 69-4153

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Flags problem 3.23.34a with BDB support/Innobase on HP-UX 10.20

2001-03-13 Thread Lutz Jaenicke

On Tue, Mar 13, 2001 at 12:00:57AM +0200, Heikki Tuuri wrote:
 om scalar to scalar or to void type.
 cc: "os0thread.c", line 69: error 1554: Indirection must be through a pointer.
 cc: "os0thread.c", line 69: warning 563: Argument #2 is not the correct type.
 cc: "os0thread.c", line 69: error 1718: Types are not assignment-compatible.
 cc: "os0thread.c", line 69: warning 563: Argument #3 is not the correct type.
 cc: "os0thread.c", line 69: warning 604: Pointers are not
 assignment-compatible.
 cc: "os0thread.c", line 69: warning 563: Argument #4 is not the correct type.
 gmake[4]: *** [os0thread.o] Error 1
 I have not yet analyzed the precise reason of the failure. Since it affects
 thread functions and the platform is HP-UX 10.20, I am not sure whether
 there is a solution at all.
 
 But the easiest solution probably is to use the GNU C compiler if you
 have one on your machine. I have not compiled Innobase on the HP's
 commercial compiler and it will take some time to eliminate all
 compiler warnings there. Also the 'inline' keyword and inlined
 functions will probably cause problems on the HP compiler.

Ok, let's try to narrow things down: I have switched to GCC for the time
being and got a similar compile error:
gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../../include -I../include-O6 -DDBUG_OFF
-DHPUX -I/opt/dce/include  -DHAVE_BROKEN_SNPRINTF -c os0thread.c
os0thread.c: In function `os_thread_get_curr_id':
os0thread.c:29: aggregate value used where an integer was expected
os0thread.c: In function `os_thread_create':
os0thread.c:69: warning: dereferencing `void *' pointer
os0thread.c:69: invalid use of void expression
gmake[4]: *** [os0thread.o] Error 1

Since threads are not well supported in HP-UX 10.20 I don't have experience
with threads. I can send you the thread header files, if you think this
might help.

 I will check how one could generate makefiles with less strict
 warnings control. One possibility is to create a file Makefile.i to
 the directory:
  ...your mysql source dir... /innobase/include
 
 and put the following define there:
 
 CFLAGS = -DHAVE_CONFIG_H -I. -I. -I.. -I../../include -I../include  -DHPUX
 -Dinline= -I/opt/dce/include -I/usr/local/include  -O -DDBUG_OFF 
 
 It should override the flags generated by automake.
 Then go to the innobase subdirectory and regenerate new Makefiles:
 
 automake
 autoconf
 ./configure
 
 Ignore the warnings automake and autoconf give. Then type
 
 make
 
 Probably you will get new errors from the HP compiler now :), I can help you
 tomorrow if you report the next problems you encounter.

Actually, I don't get any error. It steps into each directory and has nothing
to do at all. Seems the .o and .c files are not propagated into the Makefiles.

Best regards,
Lutz
-- 
Lutz Jaenicke [EMAIL PROTECTED]
BTU Cottbus   http://www.aet.TU-Cottbus.DE/personen/jaenicke/
Lehrstuhl Allgemeine Elektrotechnik  Tel. +49 355 69-4129
Universitaetsplatz 3-4, D-03044 Cottbus  Fax. +49 355 69-4153

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Flags problem 3.23.34a with BDB support/Innobase on HP-UX 10.20

2001-03-13 Thread Lutz Jaenicke

On Tue, Mar 13, 2001 at 06:42:19PM +0200, Heikki Tuuri wrote:
 Ok, let's try to narrow things down: I have switched to GCC for the time
 being and got a similar compile error:
 gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../../include -I../include-O6 -DDBUG_OFF
 -DHPUX -I/opt/dce/include  -DHAVE_BROKEN_SNPRINTF -c os0thread.c
 os0thread.c: In function `os_thread_get_curr_id':
 os0thread.c:29: aggregate value used where an integer was expected
 
 Here I try to cast (convert) a thread object into a long integer.
 Maybe a (handle to) thread object in HP-UX is represented as a struct,
 and the typecast is not possible. Solution: change the typedef in
 os0thread.h to:
 
 typedef pthread_t os_thread_id_t

Actually, that did not help much. Rather/additionally, I removed the explicit
cast to get rid of the error message.

There are more occurences like that, it seems. In os0thread.c:98,
an os_thread_id_t is converted to an "ulint", what must fail for the
same reason. It is more difficult to fix this one.

 Since threads are not well supported in HP-UX 10.20 I don't have experience
 with threads. I can send you the thread header files, if you think this
 might help.
 
 It would help. If you can, please send them to [EMAIL PROTECTED]
 (especially pthread.h).

In the meantime sent in private email.

  ...
  Ignore the warnings automake and autoconf give. Then type
  
  make
  
  Probably you will get new errors from the HP compiler now :), I can help you
  tomorrow if you report the next problems you encounter.
 
 Actually, I don't get any error. It steps into each directory and has nothing
 to do at all. Seems the .o and .c files are not propagated into the Makefiles.
 
 Sorry, forgot to mention you should delete all .o files in subdirs. Type
 in the innobase directory:
 
 rm ./*/*.o
 
 and only after that do the make.

Well, I decided for 'find . -name "*.o" | xargs rm' but that did not solve
my problem. The point is, that for reasons I don't see, the target definitions
are not propagated into the Makefiles, so there is nothing to be done.
To be more precise: In the "mysql configured" innobase, the os/Makefile has:
libos_a_OBJECTS =  os0proc.o os0shm.o os0sync.o os0thread.o os0file.o
This line (and other lines) are missing in the one for which I called
automake and autoconf seperately.

It seems, that for the inclusion into the mysql distribution things have
been changed.
(Just like for berkeley-db there is no "make clean" target, so that you
cannot successfully "make clean" the mysql package anymore.)

 Thank you for trying on HP-UX. On Solaris I was able to compile, but
 obviously I still have overlooked some Posix thread subtleties.

Do you have a "standalone" version of innobase available that I can test
independent from the mysql distribution?

Best regards,
Lutz
-- 
Lutz Jaenicke [EMAIL PROTECTED]
BTU Cottbus   http://www.aet.TU-Cottbus.DE/personen/jaenicke/
Lehrstuhl Allgemeine Elektrotechnik  Tel. +49 355 69-4129
Universitaetsplatz 3-4, D-03044 Cottbus  Fax. +49 355 69-4153

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Flags problem 3.23.34a with BDB support/Innobase on HP-UX 10.20

2001-03-13 Thread Lutz Jaenicke

On Tue, Mar 13, 2001 at 08:40:20PM +0200, Heikki Tuuri wrote:
 I looked at the pthread header file which is, by the way, 52000 lines long :).
When I sent it, it was a tar file with /usr/include/pthread.h and the
complete subdir /usr/include/dce. The orverall length of all files may
match the number you quote :-)

 Obviously, one cannot cast such a struct to a long integer, and neither
 can one pass NULL in place of such a struct. The compilation might
 work if you on line 29 of os0thread.c write something like:
 
return((os_thread_id_t) (pthread_self()-field1));
 
 and on line 69 replace the NULL parameter with pthread_attr_default
 
 In os0thread.h you should return to the original typedef of os_thread_id_t:
 
   typedef unsigned long int os_thread_id_t
 
 These are of course just temporary fixes, and I will modify the next
 version to adhere to strict Posix definitions.

I have started a new compilation with these quick fixes and will see what
breaks next :-)

Best regards,
Lutz
-- 
Lutz Jaenicke [EMAIL PROTECTED]
BTU Cottbus   http://www.aet.TU-Cottbus.DE/personen/jaenicke/
Lehrstuhl Allgemeine Elektrotechnik  Tel. +49 355 69-4129
Universitaetsplatz 3-4, D-03044 Cottbus  Fax. +49 355 69-4153

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Flags problem 3.23.34a with BDB support/Innobase on HP-UX 10.20

2001-03-12 Thread Lutz Jaenicke

Hi!

I am currently trying to compile 3.23.34a coming with BDB support.
I have zlib installed in the /usr/local (not normally searched for
libraries), so that until now I have
 [CFLAGS etc ] LDFLAGS=-L/usr/local/lib ./configure

When enabling --with-berkeley-db, compilation fails, because I have another
version of Berkeley DB (2.xx) installed in /usr/local/lib.
Reason: The Makefile in sql/ specifies the locations given in LDFLAGS before
-L../bdb/build-unix.
The full solution would probably be to move around options, so that 
-L../bdb/build-unix is searched before other paths in any case.
(One cannot put LIBS=-L/usr/local/lib, because -lz et al are (correctly)
added before the specified contents of LIBS.)
Is there any other solution recommended?
My platform is HP-UX 10.20 with native compilers.

Here the excerpt with the offending command (the optimization warnings can
be ignored, they come because gcc compiler flags are hardcoded without need):
aCC -O3 -DDBUG_OFF -Aa +O3 +Olibcalls +Onolimit +DAportable -DHAVE_BROKEN_SNPRINTF 
-D_INCLUDE_LONGLONG -L/usr/local/lib -o mysqld sql_lex.o item.o item_sum.o item_buff.o 
item_func.o item_cmpfunc.o item_strfunc.o item_timefunc.o thr_malloc.o item_create.o 
field.o key.o sql_class.o sql_list.o net_serv.o violite.o net_pkg.o lock.o my_lock.o 
sql_string.o sql_manager.o sql_map.o mysqld.o password.o hash_filo.o hostname.o 
convert.o sql_parse.o sql_yacc.o sql_base.o table.o sql_select.o sql_insert.o 
sql_update.o sql_delete.o procedure.o item_uniq.o sql_test.o lmmrg.a ../heap/libheap.a 
../mysys/libmysys.a ../dbug/libdbug.a ../regex/libregex.a ../strings/libmystrings.a 
-lc_r -lz -lcrypt -lm -ldce
aCC: warning 901: unknown option: `-3': use +help for online documentation.
aCC: warning 928: option +O3 overrides previous setting of +O2
/usr/ccs/bin/ld: Unsatisfied symbols:
   db_create (code)
   db_env_create (code)

BTW, the compilation of innobase fails with
cc -DHAVE_CONFIG_H -I. -I. -I.. -I../../include -I../include  -DHPUX -Dinline= -
I/opt/dce/include -I/usr/local/include  -O -DDBUG_OFF -Ae +O3 +Olibcalls +Onolim
it +DAportable  -DHAVE_BROKEN_SNPRINTF -c os0thread.c
cc: warning 454: Option +O3 overrides previous setting of +O2.
cc: "os0thread.c", line 29: error 1527: Incompatible types in cast: Must cast fr
om scalar to scalar or to void type.
cc: "os0thread.c", line 69: error 1554: Indirection must be through a pointer.
cc: "os0thread.c", line 69: warning 563: Argument #2 is not the correct type.
cc: "os0thread.c", line 69: error 1718: Types are not assignment-compatible.
cc: "os0thread.c", line 69: warning 563: Argument #3 is not the correct type.
cc: "os0thread.c", line 69: warning 604: Pointers are not assignment-compatible.
cc: "os0thread.c", line 69: warning 563: Argument #4 is not the correct type.
gmake[4]: *** [os0thread.o] Error 1
I have not yet analyzed the precise reason of the failure. Since it affects
thread functions and the platform is HP-UX 10.20, I am not sure whether
there is a solution at all.

Best regards,
Lutz
-- 
Lutz Jaenicke [EMAIL PROTECTED]
BTU Cottbus   http://www.aet.TU-Cottbus.DE/personen/jaenicke/
Lehrstuhl Allgemeine Elektrotechnik  Tel. +49 355 69-4129
Universitaetsplatz 3-4, D-03044 Cottbus  Fax. +49 355 69-4153

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Flags problem 3.23.34a with BDB support/Innobase on HP-UX 10.20

2001-03-12 Thread Lutz Jaenicke

On Tue, Mar 13, 2001 at 12:00:57AM +0200, Heikki Tuuri wrote:
 what compiler are you using? GCC? HP:s own commercial compiler, I assume.
I tend to prefer HPs commercial compiler (the code tends to be smaller
and faster when running at high optimization levels).

 BTW, the compilation of innobase fails with
 cc -DHAVE_CONFIG_H -I. -I. -I.. -I../../include -I../include  -DHPUX
 -Dinline= -
 I/opt/dce/include -I/usr/local/include  -O -DDBUG_OFF -Ae +O3 +Olibcalls
 +Onolim
 it +DAportable  -DHAVE_BROKEN_SNPRINTF -c os0thread.c
 cc: warning 454: Option +O3 overrides previous setting of +O2.
 cc: "os0thread.c", line 29: error 1527: Incompatible types in cast: Must
 cast fr
 om scalar to scalar or to void type.
 cc: "os0thread.c", line 69: error 1554: Indirection must be through a pointer.
 cc: "os0thread.c", line 69: warning 563: Argument #2 is not the correct type.
 cc: "os0thread.c", line 69: error 1718: Types are not assignment-compatible.
 cc: "os0thread.c", line 69: warning 563: Argument #3 is not the correct type.
 cc: "os0thread.c", line 69: warning 604: Pointers are not
 assignment-compatible.
 cc: "os0thread.c", line 69: warning 563: Argument #4 is not the correct type.
 gmake[4]: *** [os0thread.o] Error 1
 I have not yet analyzed the precise reason of the failure. Since it affects
 thread functions and the platform is HP-UX 10.20, I am not sure whether
 there is a solution at all.
 
 The solution might be to turn the compiler warning level to be less strict.
 I think the flag +DAportable is a HP compiler flag which produces an
 error from some less serious compiler warnings. Also the flag -Ae
 is suspect.
-Ae is extended ANSI mode. The alternate switch would be -Ac to fall back
to pure KR, so -Ae is the correct way to go.
+DAportable tells the backend to produce code that will also run on the older
PA-1.1 CPUs (approximately before 1997), it does not affect the problem
shown above.

 But the easiest solution probably is to use the GNU C compiler if you
 have one on your machine. I have not compiled Innobase on the HP's
 commercial compiler and it will take some time to eliminate all
 compiler warnings there. Also the 'inline' keyword and inlined
 functions will probably cause problems on the HP compiler.
Yes, that is true. My CPPFLAGS already include -Dinline=, so this should
not be too much of a problem. I will try GCC tomorrow (well, today :-)

 I will check how one could generate makefiles with less strict
 warnings control. One possibility is to create a file Makefile.i to
 the directory:
  ...your mysql source dir... /innobase/include
 
 and put the following define there:
 
 CFLAGS = -DHAVE_CONFIG_H -I. -I. -I.. -I../../include -I../include  -DHPUX
 -Dinline= -I/opt/dce/include -I/usr/local/include  -O -DDBUG_OFF 
 
 It should override the flags generated by automake.
 Then go to the innobase subdirectory and regenerate new Makefiles:
 
 automake
 autoconf
 ./configure
 
 Ignore the warnings automake and autoconf give. Then type
 
 make
 
 Probably you will get new errors from the HP compiler now :), I can help you
 tomorrow if you report the next problems you encounter.

Read you tomorrow,
Lutz
-- 
Lutz Jaenicke [EMAIL PROTECTED]
BTU Cottbus   http://www.aet.TU-Cottbus.DE/personen/jaenicke/
Lehrstuhl Allgemeine Elektrotechnik  Tel. +49 355 69-4129
Universitaetsplatz 3-4, D-03044 Cottbus  Fax. +49 355 69-4153

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: can I use aCC..

2001-02-14 Thread Lutz Jaenicke

On Wed, Feb 14, 2001 at 06:59:04PM +0200, Ragupathi P wrote:
 hi,
 
   basically i am reframing my earlier question.
 
   i'm using  aCC ( ansic C++ compiler from HP ) on HPUX10.2
   to compile and link my small C code with libraries available
   from mysql-3.23.32-hp-hpux10.20-hppa1.1 .
 
   i get the following:
   /usr/ccs/bin/ld: Unsatisfied symbols:
  mysql_connect (code)
  mysql_init (code)
 
 
   i wld greatly appreciate if someone can figure out if something
   is wrong.

Basically you are still not giving us the necessary information.
In my case the mysql_connect() code is in libmysqlclient.a:
ws01 48: nm libmysqlclient.a | grep mysql_connect
mysql_connect   |  6776|extern|entry  |$CODE$
So I would expect the references to be satsified if your link command
finishes with
   aCC [options] [yourmodules] -L/path/to/mysql/libraries -lmysqlclient

If you don't give us the precise command you are using, we cannot help you.

Best regards,
Lutz
-- 
Lutz Jaenicke [EMAIL PROTECTED]
BTU Cottbus   http://www.aet.TU-Cottbus.DE/personen/jaenicke/
Lehrstuhl Allgemeine Elektrotechnik  Tel. +49 355 69-4129
Universitaetsplatz 3-4, D-03044 Cottbus  Fax. +49 355 69-4153

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Porting 3.22.32 Problems to HPUX 10.20

2001-02-07 Thread Lutz Jaenicke

On Tue, Feb 06, 2001 at 12:47:20PM -0800, John Jung wrote:
 Hi All,
 
   I'm trying to port MySQL 3.22.32 to HPUX 10.20 and am encountering some
 problems.  I'm on an HPUX 10.20 box with GCC 2.95.2, the configure script
 works fine when I build I get:
 
 mysqld.cc: In function `void close_connections()':
 mysqld.cc:262: implicit declaration of function `int shutdown(...)'
 mysqld.cc: In function `void server_init()':
 mysqld.cc:581: implicit declaration of function `int setsockopt(...)'
 mysqld.cc: In function `void * handle_connections_sockets(void *)':
 mysqld.cc:1589: implicit declaration of function `int getsockname(...)'

Message sent in that regard to the original poster.
Posting to the list was censored.
Lutz
-- 
Lutz Jaenicke [EMAIL PROTECTED]
BTU Cottbus   http://www.aet.TU-Cottbus.DE/personen/jaenicke/
Lehrstuhl Allgemeine Elektrotechnik  Tel. +49 355 69-4129
Universitaetsplatz 3-4, D-03044 Cottbus  Fax. +49 355 69-4153

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: HP-UX 10.20 mysqld shutdown problem

2001-01-23 Thread Lutz Jaenicke

On Thu, Dec 21, 2000 at 09:22:40PM +0200, Sinisa Milivojevic wrote:
 Lutz Jaenicke writes:
   On Thu, Dec 21, 2000 at 07:30:23PM +0200, Sinisa Milivojevic wrote:
   
   1. It doesn't help (no surprise, as this would have meant that HP's compiler
  and gcc having the same problem which is not very likely :-).
   2. I have to revise my statement above:
  when receiving TERM, mysql reacts:
  001221 19:15:12  /usr/local/mysql1/libexec/mysqld: Normal shutdown
  Just, the daemon does not die until recieving KILL...
 
 The above is definitely a problem with HP-UX signals. Try to set a
 breakpoint in our signal handler and see what happens.

Hi!

I have just found a bit of time to to trace through the code of mysqld.
My analysis finally ended in the function "close_connections()".
Here the following loop applies:

  while (select_thread_in_use)
  {
  ...
for (uint tmp=0 ; tmp  10 ; tmp++)
{
  error=pthread_cond_timedwait(COND_thread_count,LOCK_thread_count,
   abstime);
  if (error != EINTR)
break;
}
  ...
  }

This usage of pthread_cond_timedwait does not match the manual page
on HP-UX 10.20. On Linux it says: ... 
   The pthread_cond_timedwait function returns the  following
   error codes on error:

  ETIMEDOUT
 the  condition  variable  was  not  signaled
 until the timeout specified by abstime

  EINTR  pthread_cond_timedwait was interrupted by  a
 signal

On HP-UX 10.20 the manual page however states, that the "errno" variable
is set and the return value of pthread_cond_timedwait() can only be
0 or -1:
  If the function fails, errno may  be  set  to  one  of  the  following
  values:

   Return | Error | Description
   ___|___|___
  0   |   | Successful completion.
 -1   | [EINVAL]  | The value specified by cond, mutex, or
  |   | abstime is invalid.
 -1   | [EAGAIN]  | The time specified by abstime expired.
 -1   | [EDEADLK] | A deadlock condition is detected.

I don't have experience with thread programming (from comp.sys.hp.hpux
it seems that using 10.20 and doing thread programming is more or less
exclusive :-), so I am not sure whether this is the problem or only a
symptom thereoff...

Best regards,
    Lutz
-- 
Lutz Jaenicke [EMAIL PROTECTED]
BTU Cottbus   http://www.aet.TU-Cottbus.DE/personen/jaenicke/
Lehrstuhl Allgemeine Elektrotechnik  Tel. +49 355 69-4129
Universitaetsplatz 3-4, D-03044 Cottbus  Fax. +49 355 69-4153

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php