On Tuesday, May 1, 2001, at 04:42 AM, Sinisa Milivojevic wrote:

> [EMAIL PROTECTED] writes:
>> So, I'd really like to have mysql working on OS X and while there 
>> were a
>> few people trying it out and having difficulty, I have yet to see any
>> posts of total success.
>>
>> I'm an experienced MacOS programmer, but I have little experience on
>> Unix --  so I'm way behind the curve on looking at the source and
>> figuring it out.  My only thought is to try to dive in and run mysqld
>> via gdb and then try to figure out the source tree sufficiently to see
>> where the shutdown (HUP?) message is getting handled and then set a
>> breakpoint to see if that code is ever getting called and watch where 
>> it
>> gets stuck by tracing from there.
>>
>> Unfortunately, I don't know how to use gdb (yet), and there is a LOT of
>> source to slog through to find where the shutdown code is.    Perhaps a
>> more experienced unix hack could recommend some starting places; 
>> perhaps
>> someone more experienced with the mysql source could point me to the
>> locations of signal handling code (I hope it's not too obvious, since I
>> haven't even looked yet... :-(  Got to get gdb working first... ).
>>
>>
>> So, if there is something I can do here to help get the issues 
>> resolved,
>> I'd like to do so.  Please feel free to email me directly with
>> suggestions, staring points etc.,  if that helps.
>>
>> Thanks,
>> Tyler
>> [EMAIL PROTECTED]
>>
>>
>> P.S.  The problems I have seen posted and experienced myself are:
>>
>> 1) the small edit to get it to compile (not a big deal, but should get
>> fixed)
>>
>> 2) The mysqld cannot be stopped short of kill -9
>>
>> 3) trying to use mysqladmin shutdown to stop mysqld (and safe_mysql)
>> fails (hangs, requires kill -9 to halt)
>>
>> 4) the tests do not work.
>>       4a) make test fails
>>       4b) mysql-test-run   fails
>>
>
>

Thank you Sinisa for responding.   I have made some responses below and 
I have included the logs and errors from the test run.    The errors may 
perhaps give you a clue that can direct my further efforts.  Please find 
them below after the screen output of running the tests.

Thanks very much for your assistance!  I'd really like to have Mac OS X 
be a fully supported mysql platform!


> You should first learn to use gdb ... ;o)
>
> It is truly not so difficult.

I figure, just a matter of TIME :-)

so I'm rebuilding with the -with-debugging=full now and hopefully 
that'll help see stuff.

> Regarding a diff to make it compile, if you have not sent it to us,
> please do.

I have not, but I saw someone else on the list saying they would (or you 
asked them to).

> Regarding second and third problem, you should take a deeper look at
> OS X signals and try to see what goes on. Signal handling is all done
> in mysqld.cc in sql/ subdir.

OK that's what I needed a pointer to where to look in the source.

> Regarding failing tests, you should examine the error log.


Ok.   Here's the output to the screen:

> ./mysql-test-run
> Installing Test Databases
> Removing Stale Files
> Installing Master Databases
> Installing Slave Databases
> Starting MySQL daemon
> Loading Standard Test Databases
> Starting Tests
>
>  TEST                         USER   SYSTEM  ELAPSED        RESULT
> ------------------------------------------------------------------------
> alias                         0.03     0.02     0.25       [ pass ]
> alter_table                   0.04     0.01     0.29       [ pass ]
> analyse                       0.02     0.02     0.12       [ pass ]
> auto_increment                0.01     0.02     0.26       [ pass ]
> backup                        0.01     0.06     0.27       [ pass ]
> bdb-crash                     0.02     0.03     0.07       [ pass ]
> bdb                           ....     ....     ....       [ fail ]
>
> /usr/local/bin/mysqltest: Can't get stat of 'r/have_bdb.require' 
> (Errcode: 2) real         0.07 user         0.02 sys          0.02
> Aborting. To continue, re-run with '--force'.
>
> Ending Tests
> Shutting-down MySQL daemon
>
> Warning;  Aborted waiting on pid file: '/usr/local/mysql-
> test/var/run/mysqld.pid' after 10 seconds
> Master shutdown finished
> Warning;  Aborted waiting on pid file: '/usr/local/mysql-
> test/var/run/mysqld-slave.pid' after 10 seconds
> Slave shutdown finished

So it looks like we have the shutdown failure problem here also.  Almost 
looks like it's waiting for the 'lock' on the pid file to be removed.... 
but I don't really know what I'm talking about...


When I look at the logs, the last thing in each log is:

11 Shutdown

or

2 Shutdown

The .err files say the following:

> tyler% more *.err
> ::::::::::::::
> mysqld-slave.err
> ::::::::::::::
> Warning: One can only use the --user switch if running as root
> /usr/local/bin/mysqld: ready for connections
> 010501 19:39:06  Slave: connected to master '[EMAIL PROTECTED]:9306',  
> replication started in log '
> FIRST' at position 4
> 010501 19:39:31  Aborted connection 2 to db: 'unconnected' user: 'root' 
> host: `localhost' (Got a
> n error writing communication packets)
> ::::::::::::::
> mysqld.err
> ::::::::::::::
> Warning: One can only use the --user switch if running as root
> /usr/local/bin/mysqld: ready for connections
> 010501 19:39:21  Aborted connection 11 to db: 'unconnected' user: 
> 'root' host: `localhost' (Got
> an error writing communication packets)
> [localhost:mysql-test/var/log] tyler%



So, I guess that there is perhaps only that one problem with the 
shutdown signal getting handled properly.  ???

I'll work on looking at that then.



Here's the log files (sorry about the length):


> [localhost:mysql-test/var/log] tyler% more *.log
> ::::::::::::::
> mysqld-slave.log
> ::::::::::::::
> /usr/local/bin/mysqld, Version: 3.23.36-log, started with:
> Tcp port: 9307  Unix socket: /usr/local/mysql-test/var/tmp/mysql-
> slave.sock
> Time                 Id Command    Argument
> 010501 19:39:06       1 Connect Out [EMAIL PROTECTED]:9306
> 010501 19:39:31       2 Connect     root@localhost on
>                       2 Query       SHOW VARIABLES LIKE 'pid_file'
>                       2 Shutdown
> ::::::::::::::
> mysqld.log
> ::::::::::::::
> /usr/local/bin/mysqld, Version: 3.23.36-log, started with:
> Tcp port: 9306  Unix socket: /usr/local/mysql-test/var/tmp/mysql-
> master.sock
> Time                 Id Command    Argument
> 010501 19:39:06       1 Connect     root@localhost on
>                       1 Binlog Dump
> 010501 19:39:16       2 Connect     root@localhost on test
>                       2 Query       DROP TABLE IF EXISTS t1
>                       2 Query       CREATE TABLE t1 (
> cont_nr int(11) NOT NULL auto_increment,
> ver_nr int(11) NOT NULL default '0',
> aufnr int(11) NOT NULL default '0',
> username varchar(50) NOT NULL default '',
> hdl_nr int(11) NOT NULL default '0',
> eintrag date NOT NULL default '0000-00-00',
> st_klasse varchar(40) NOT NULL default '',
> st_wert varchar(40) NOT NULL default '',
> st_zusatz varchar(40) NOT NULL default '',
> st_bemerkung varchar(255) NOT NULL default '',
> kunden_art varchar(40) NOT NULL default '',
> mcbs_knr int(11) default NULL,
> mcbs_aufnr int(11) NOT NULL default '0',
> schufa_status char(1) default '?',
> bemerkung text,
> wirknetz text,
> wf_igz int(11) NOT NULL default '0',
> tarifcode varchar(80) default NULL,
> recycle char(1) default NULL,
> sim varchar(30) default NULL,
> mcbs_tpl varchar(30) default NULL,
> emp_nr int(11) NOT NULL default '0',
> laufzeit int(11) default NULL,
> hdl_name varchar(30) default NULL,
> prov_hdl_nr int(11) NOT NULL default '0',
> auto_wirknetz varchar(50) default NULL,
> auto_billing varchar(50) default NULL,
> touch timestamp(14) NOT NULL,
> kategorie varchar(50) default NULL,
> kundentyp varchar(20) NOT NULL default '',
> sammel_rech_msisdn varchar(30) NOT NULL default '',
> p_nr varchar(9) NOT NULL default '',
> suffix char(3) NOT NULL default '',
> PRIMARY KEY (cont_nr),
> KEY idx_aufnr(aufnr),
> KEY idx_hdl_nr(hdl_nr),
> KEY idx_st_klasse(st_klasse),
> KEY ver_nr(ver_nr),
> KEY eintrag_idx(eintrag),
> KEY emp_nr_idx(emp_nr),
> KEY wf_igz(wf_igz),
> KEY touch(touch),
> KEY hdl_tag(eintrag,hdl_nr),
> KEY prov_hdl_nr(prov_hdl_nr),
> KEY mcbs_aufnr(mcbs_aufnr),
> KEY kundentyp(kundentyp),
> KEY p_nr(p_nr,suffix)
> ) TYPE=MyISAM
> 010501 19:39:17       2 Query       INSERT INTO t1 VALUES 
> (3359356,405,3359356,'Mustermann Muste
> rfrau',52500,'2000-05-20','workflow','Auftrag 
> erledigt','Originalvertrag eingegangen und gepr¸ft
> ','','privat',1485525,2122316,'+','','N',1909160,'MobilComSuper92000D2',NULL,
> NULL,'MS9ND2',3,24,
> 'MobilCom Shop 
> Koeln',52500,NULL,'auto',20010202105916,'Mobilfunk','PP','','','')
>                       2 Query       INSERT INTO t1 VALUES 
> (3359357,468,3359357,'Mustermann Muste
> rfrau',7001,'2000-05-20','workflow','Auftrag erledigt','Originalvertrag 
> eingegangen und gepr¸ft'
> ,'','privat',1503580,2139699,'+','','P',1909171,'MobilComSuper9D1T10SFreisprech(
> Akquise)',NULL,N
> ULL,'MS9NS1',327,24,'MobilCom 
> Intern',7003,NULL,'auto',20010202105916,'Mobilfunk','PP','','','')
>                       2 Query       INSERT INTO t1 VALUES 
> (3359358,407,3359358,'Mustermann Muste
> rfrau',7001,'2000-05-20','workflow','Auftrag erledigt','Originalvertrag 
> eingegangen und gepr¸ft'
> ,'','privat',1501358,2137473,'N','','N',1909159,'MobilComSuper92000D2',NULL,
> NULL,'MS9ND2',325,24
> ,'MobilCom 
> Intern',7003,NULL,'auto',20010202105916,'Mobilfunk','PP','','','')
>                       2 Query       INSERT INTO t1 VALUES 
> (3359359,468,3359359,'Mustermann Muste
> rfrau',7001,'2000-05-20','workflow','Auftrag erledigt','Originalvertrag 
> eingegangen und gepr¸ft'
> ,'','privat',1507831,2143894,'+','','P',1909162,'MobilComSuper9D1T10SFreisprech(
> Akquise)',NULL,N
> ULL,'MS9NS1',327,24,'MobilCom 
> Intern',7003,NULL,'auto',20010202105916,'Mobilfunk','PP','','','')
>                       2 Query       INSERT INTO t1 VALUES 
> (3359360,0,0,'Mustermann Musterfrau',2
> 9674907,'2000-05-20','workflow','Auftrag erledigt','Originalvertrag 
> eingegangen und gepr¸ft','',
> 'privat',1900169997,2414578,'+',NULL,'N',1909148,'',NULL,NULL,'RV99066_2'
> ,20,NULL,'POS',29674907
> ,NULL,NULL,20010202105916,'Mobilfunk','','','97317481','007')
>                       2 Query       INSERT INTO t1 VALUES 
> (3359361,406,3359361,'Mustermann Muste
> rfrau',7001,'2000-05-20','workflow','Auftrag 
> storniert','','(7001-84):Storno, Kd. mˆchte nicht m
> ehr','privat',NULL,0,'+','','P',1909150,'MobilComSuper92000D1(Akquise)',NULL,
> NULL,'MS9ND1',325,2
> 4,'MobilCom 
> Intern',7003,NULL,'auto',20010202105916,'Mobilfunk','PP','','','')
>                       2 Query       INSERT INTO t1 VALUES 
> (3359362,406,3359362,'Mustermann Muste
> rfrau',7001,'2000-05-20','workflow','Auftrag erledigt','Originalvertrag 
> eingegangen und gepr¸ft'
> ,'','privat',1509984,2145874,'+','','P',1909154,'MobilComSuper92000D1
> (Akquise)',NULL,NULL,'MS9ND
> 1',327,24,'MobilCom 
> Intern',7003,NULL,'auto',20010202105916,'Mobilfunk','PP','','','')
>                       2 Query       SELECT 
> ELT(FIELD(kundentyp,'PP','PPA','PG','PGA','FK','FKA',
> 'FP','FPA','K','KA','V','VA',''), 'Privat (Private Nutzung)','Privat 
> (Private Nutzung) Sitz im A
> usland','Privat (geschaeftliche Nutzung)','Privat (geschaeftliche 
> Nutzung) Sitz im Ausland','Fir
> ma (Kapitalgesellschaft)','Firma (Kapitalgesellschaft) Sitz im 
> Ausland','Firma (Personengesellsc
> haft)','Firma (Personengesellschaft) Sitz im Ausland','oeff. rechtl. 
> Koerperschaft','oeff. recht
> l. Koerperschaft Sitz im Ausland','Eingetragener Verein','Eingetragener 
> Verein Sitz im Ausland',
> 'Typ unbekannt') AS Kundentyp ,kategorie FROM t1 WHERE hdl_nr < 2000000 
> AND kategorie IN ('Prepa
> id','Mobilfunk') AND st_klasse = 'Workflow' GROUP BY kundentyp ORDER BY 
> kategorie
>                       2 Query       drop table t1
>                       2 Quit
>                       3 Connect     root@localhost on test
>                       3 Query       drop table if exists t1
>                       3 Query       create table t1 (
> col1 int not null auto_increment primary key,
> col2 varchar(30) not null,
> col3 varchar (20) not null,
> col4 varchar(4) not null,
> col5 enum('PENDING', 'ACTIVE', 'DISABLED') not null,
> col6 int not null, to_be_deleted int)
>                       3 Query       alter table t1
> add column col4_5 varchar(20) not null after col4,
> add column col7 varchar(30) not null after col6,
> add column col8 datetime not null, drop column to_be_deleted
>                       3 Query       drop table t1
>                       3 Query       create table t1 (bandID MEDIUMINT 
> UNSIGNED NOT NULL PRIMARY
> KEY, payoutID SMALLINT UNSIGNED NOT NULL)
>                       3 Query       insert into t1 (bandID,payoutID) 
> VALUES (1,6),(2,6),(3,4),(4
> ,9),(5,10),(6,1),(7,12),(8,12)
>                       3 Query       alter table t1 add column new_col 
> int, order by payoutid,ban
> did
>                       3 Query       select * from t1
>                       3 Query       alter table t1 order by 
> bandid,payoutid
>                       3 Query       select * from t1
>                       3 Query       drop table t1
>                       3 Query       CREATE TABLE t1 (
> GROUP_ID int(10) unsigned DEFAULT '0' NOT NULL,
> LANG_ID smallint(5) unsigned DEFAULT '0' NOT NULL,
> NAME varchar(80) DEFAULT '' NOT NULL,
> PRIMARY KEY (GROUP_ID,LANG_ID),
> KEY NAME (NAME))
>                       3 Query       ALTER TABLE t1 CHANGE NAME NAME 
> CHAR(80) not null
>                       3 Query       SHOW FULL COLUMNS FROM t1
>                       3 Query       DROP TABLE t1
>                       3 Query       create table t1 (n int)
>                       3 Query       insert into t1 
> values(9),(3),(12),(10)
>                       3 Query       alter table t1 order by n
>                       3 Query       select * from t1
>                       3 Query       drop table t1
>                       3 Query       CREATE TABLE t1 (
> id int(11) unsigned NOT NULL default '0',
> category_id tinyint(4) unsigned NOT NULL default '0',
> type_id tinyint(4) unsigned NOT NULL default '0',
> body text NOT NULL,
> user_id int(11) unsigned NOT NULL default '0',
> status enum('new','old') NOT NULL default 'new',
> PRIMARY KEY (id)
> ) TYPE=MyISAM
>                       3 Query       ALTER TABLE
> t1
> ORDER BY
> t1.id,
> t1.status,
> t1.type_id,
> t1.user_id,
> t1.body
>                       3 Query       drop table t1
>                       3 Quit
> 010501 19:39:18       4 Connect     root@localhost on test
>                       4 Query       create table t1 (i int, j int)
>                       4 Query       insert into t1 values (1,2), (3,4), 
> (5,6), (7,8)
>                       4 Query       select * from t1 procedure analyse()
>                       4 Query       create table t2 select * from t1 
> procedure analyse()
>                       4 Query       select * from t2
>                       4 Query       drop table t1,t2
>                       4 Quit
>                       5 Connect     root@localhost on test
>                       5 Query       create table t1 (a int not null 
> auto_increment,b int, primar
> y key (a)) type=myisam auto_increment=3
>                       5 Query       insert into t1 values 
> (1,1),(NULL,3),(NULL,4)
>                       5 Query       delete from t1 where a=4
>                       5 Query       insert into t1 values 
> (NULL,5),(NULL,6)
>                       5 Query       select * from t1
>                       5 Query       delete from t1 where a=6
>                       5 Query       replace t1 values (3,1)
>                       5 Query       ALTER TABLE t1 add c int
>                       5 Query       replace t1 values (3,3,3)
>                       5 Query       insert into t1 values (NULL,7,7)
>                       5 Query       update t1 set a=8,b=b+1,c=c+1 where 
> a=7
>                       5 Query       insert into t1 values (NULL,9,9)
>                       5 Query       select * from t1
>                       5 Query       drop table t1
>                       5 Query       create table t1 (a int not null 
> auto_increment,b int, primar
> y key (a)) type=isam
>                       5 Query       insert into t1 values 
> (1,1),(NULL,2),(3,3),(NULL,4)
> 010501 19:39:19       5 Query       delete from t1 where a=4 or a=2
>                       5 Query       insert into t1 values 
> (NULL,4),(NULL,5),(6,6)
>                       5 Query       select * from t1
>                       5 Query       delete from t1 where a=6
>                       5 Query       replace t1 values (3,1)
>                       5 Query       replace t1 values (3,3)
>                       5 Query       ALTER TABLE t1 add c int
>                       5 Query       insert into t1 values (NULL,6,6)
>                       5 Query       select * from t1
>                       5 Query       drop table t1
>                       5 Query       create table t1 (
> skey tinyint unsigned NOT NULL auto_increment PRIMARY KEY,
> sval char(20)
> )
>                       5 Query       insert into t1 values (NULL, 
> "hello")
>                       5 Query       insert into t1 values (NULL, "hey")
>                       5 Query       select * from t1
>                       5 Query       select _rowid,t1._rowid,skey,sval 
> from t1
>                       5 Query       drop table t1
>                       5 Query       create table t1 (a char(10) not 
> null, b int not null auto_in
> crement, primary key(a,b))
>                       5 Query       insert into t1 values 
> ("a",1),("b",2),("a",2),("c",1)
>                       5 Query       insert into t1 values 
> ("a",NULL),("b",NULL),("c",NULL),("e",
> NULL)
>                       5 Query       insert into t1 (a) values 
> ("a"),("b"),("c"),("d")
>                       5 Query       insert into t1 (a) values 
> ('k'),('d')
>                       5 Query       insert into t1 (a) values ("a")
>                       5 Query       insert into t1 values 
> ("d",last_insert_id())
>                       5 Query       select * from t1
>                       5 Query       drop table t1
>                       5 Query       create table t1 (ordid int(8) not 
> null auto_increment, ord
> varchar(50) not null, primary key (ordid), index(ord,ordid))
>                       5 Query       insert into t1 (ordid,ord) values 
> (NULL,'sdj'),(NULL,'sdj')
>                       5 Query       select * from t1
>                       5 Query       drop table t1
>                       5 Query       create table t1 (ordid int(8) not 
> null auto_increment, ord
> varchar(50) not null, primary key (ord,ordid))
>                       5 Query       insert into t1 values 
> (NULL,'sdj'),(NULL,'sdj'),(NULL,"abc")
> ,(NULL,'abc'),(NULL,'zzz'),(NULL,'sdj'),(NULL,'abc')
>                       5 Query       select * from t1
>                       5 Query       drop table t1
>                       5 Quit
>                       6 Connect     root@localhost on test
>                       7 Connect     root@localhost on test
>                       8 Connect     root@localhost on test
>                       7 Query       set SQL_LOG_BIN=0
>                       7 Query       drop table if exists t1
>                       7 Query       create table t1(n int)
>                       7 Query       backup table t1 to '../bogus'
>                       7 Query       backup table t1 to '../tmp'
>                       7 Query       drop table t1
>                       7 Query       restore table t1 from '../tmp'
>                       7 Query       select count(*) from t1
>                       7 Query       insert into t1 values (23),(45),(67)
>                       7 Query       backup table t1 to '../tmp'
>                       7 Query       drop table t1
>                       7 Query       restore table t1 from '../bogus'
>                       7 Query       restore table t1 from '../tmp'
>                       7 Query       select n from t1
>                       7 Query       create table t2(m int not null 
> primary key)
>                       7 Query       create table t3(k int not null 
> primary key)
>                       7 Query       insert into t2 values 
> (123),(145),(167)
>                       7 Query       insert into t3 values 
> (223),(245),(267)
>                       7 Query       backup table t1,t2,t3 to '../tmp'
>                       7 Query       drop table t1,t2,t3
>                       7 Query       restore table t1,t2,t3 from '../tmp'
>                       7 Query       select n from t1
>                       7 Query       select m from t2
>                       7 Query       select k from t3
>                       7 Query       drop table t1,t2,t3
>                       7 Query       restore table t1 from '../tmp'
>                       8 Query       lock tables t1 write
>                       8 Query       unlock tables
>                       7 Query       backup table t1 to '../tmp'
> 010501 19:39:20       8 Quit
>                       6 Quit
>                       7 Quit
>                       9 Connect     root@localhost on test
>                       9 Query       drop table if exists tblChange
>                       9 Query       CREATE TABLE tblCharge (
> ChargeID int(10) unsigned DEFAULT '0' NOT NULL auto_increment,
> ServiceID int(10) unsigned DEFAULT '0' NOT NULL,
> ChargeDate date DEFAULT '0000-00-00' NOT NULL,
> ChargeAmount decimal(20,2) DEFAULT '0.00' NOT NULL,
> FedTaxes decimal(20,2) DEFAULT '0.00' NOT NULL,
> ProvTaxes decimal(20,2) DEFAULT '0.00' NOT NULL,
> ChargeStatus enum('New','Auth','Unauth','Sale','Denied','Refund')
> DEFAULT 'New' NOT NULL,
> ChargeAuthorizationMessage text,
> ChargeComment text,
> ChargeTimeStamp varchar(20),
> PRIMARY KEY (ChargeID),
> KEY ServiceID (ServiceID),
> KEY ChargeDate (ChargeDate)
> ) type=BDB
>                       9 Query       BEGIN
>                       9 Query       INSERT INTO tblCharge
> VALUES(NULL,1,'2001-03-01',1,1,1,'New',NULL,NULL,'now')
>                       9 Query       COMMIT
>                       9 Query       BEGIN
>                       9 Query       UPDATE tblCharge SET 
> ChargeAuthorizationMessage = 'blablabla
> ' WHERE
> ChargeID = 1
>                       9 Query       COMMIT
>                       9 Query       INSERT INTO tblCharge
> VALUES(NULL,1,'2001-03-01',1,1,1,'New',NULL,NULL,'now')
>                       9 Query       select * from tblCharge
>                       9 Query       drop table tblCharge
>                       9 Quit
>                      10 Connect     root@localhost on test
>                      10 Query       show variables like "have_bdb"
> 010501 19:39:21      10 Quit
>                      11 Connect     root@localhost on
>                      11 Query       SHOW VARIABLES LIKE 'pid_file'
>                      11 Shutdown
> [localhost:mysql-test/var/log] tyler%

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