>Description:
        When trying to create a type=BDB table under NetBSD 1.6, mysql reports:

        ERROR 1005: Can't create table './test/test.frm' (errno: 9)

        and the error log shows:

        030114 17:10:19  bdb:  fstat: Bad file descriptor
        030114 17:10:19  bdb:  /home/mysql/././test/test.db: Bad file descriptor

>How-To-Repeat:
        I've reproduced this using the default data directory of
        '/var/mysql' which was symlinked to /home/mysql and
        recompiling with the datadir set to /home/mysql.

        Run mysql (as root, with password).

        Input to mysql:

                use test;
                create table test(id int not null primary key) type=bdb;

        A trace of this shows (in relevant part):

T@5    : | | | | | | >ha_berkeley::create
T@5    : | | | | | | | >fn_format
T@5    : | | | | | | | | enter: name: ./test/test.frm  dsk:   form: .db  flag: 6
T@5    : | | | | | | | | >dirname_part
T@5    : | | | | | | | | | enter: './test/test.frm'
T@5    : | | | | | | | | <dirname_part
T@5    : | | | | | | | | >unpack_dirname
T@5    : | | | | | | | | | >dirname_part
T@5    : | | | | | | | | | | enter: './test/'
T@5    : | | | | | | | | | <dirname_part
T@5    : | | | | | | | | | >cleanup_dirname
T@5    : | | | | | | | | | | enter: from: './test/'
T@5    : | | | | | | | | | | exit: to: './test/'
T@5    : | | | | | | | | | <cleanup_dirname
T@5    : | | | | | | | | <unpack_dirname
T@5    : | | | | | | | <fn_format
T@5    : | | | | | | | >create_sub_table
T@5    : | | | | | | | | enter: sub_name: main
T@5    : | | | | | | | <create_sub_table
T@5    : | | | | | | | >create_sub_table
T@5    : | | | | | | | | enter: sub_name: key01
T@5    : | | | | | | | | >sql_print_error
T@5    : | | | | | | | | | error: bdb:  fstat: Bad file descriptor
T@5    : | | | | | | | | <sql_print_error
T@5    : | | | | | | | | >sql_print_error
T@5    : | | | | | | | | | error: bdb:  /var/mysql/././test/test.db: Bad file 
descriptor
T@5    : | | | | | | | | <sql_print_error
T@5    : | | | | | | | | error: Got error: 9 when opening table './test/test.db'
T@5    : | | | | | | | <create_sub_table
T@5    : | | | | | | <ha_berkeley::create
T@5    : | | | | | | >closefrm

        Creating a myisam type table with the same parameters works.

        I'm more than willing to assist in tracking/fixing this problem.
        I need a transactional based table, and innodb won't even compile,
        due to configuration problems where the include directory for
        mit-pthreads is missed.

>Fix:
        Don't use BDB tables.  No work around known.

>Submitter-Id:  Resun2003001
>Originator:    Don Phillips
>Organization:
 
>MySQL support: none
>Synopsis:      BDB table creation fails under NetBSD 1.6.
>Severity:      critical
>Priority:      high
>Category:      mysql
>Class:         sw-bug
>Release:       mysql-3.23.49 (Source distribution)

>Environment:
        
System: NetBSD sqlhost01.resun.com 1.6 NetBSD 1.6 (resun) #2: Fri Oct  4 18:06:47 UTC 
2002     root@:/usr/src/sys/arch/i386/compile/resun i386


Some paths:  /usr/pkg/bin/perl /usr/bin/make /usr/pkg/bin/gmake /usr/bin/gcc 
/usr/bin/cc
GCC: Using builtin specs.
gcc version 2.95.3 20010315 (release) (NetBSD nb3)
Compilation info: CC='cc'  CFLAGS='-I/usr/pkg/include -O2'  CXX='c++'  
CXXFLAGS='-I/usr/pkg/include -I/usr/pkg/include -O2'  LDFLAGS='-L/usr/pkg/lib  
-Wl,-R/usr/pkg/lib/mysql -Wl,-R/usr/pkg/lib'
LIBC: 
-r--r--r--  1 root  wheel  1345334 Sep  8 11:49 /usr/lib/libc.a
lrwxr-xr-x  1 root  wheel  13 Sep  8 11:49 /usr/lib/libc.so -> libc.so.12.83
lrwxr-xr-x  1 root  wheel  13 Sep  8 11:49 /usr/lib/libc.so.12 -> libc.so.12.83
-r--r--r--  1 root  wheel  700411 Sep  8 11:49 /usr/lib/libc.so.12.83
Configure command: ./configure  --localstatedir=/var/mysql --with-named-z-libs=z 
--without-libwrap '--with-named-curses-libs=-lcurses -ltermcap' --without-readline 
--without-docs --without-debug --without-bench --with-low-memory --without-server 
--host=i386--netbsdelf --prefix=/usr/pkg

---------------------------------------------------------------------
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

Reply via email to