converting mysql tables to engine=ndbcluser

John Stile john at stilen.com
Tue Nov 9 22:21:43 CET 2004


Environment:
  Using nagios-plugins 1.3.1.0-9, nagios-mysql 2:1.2-3.5, and 
nagios-statd-client 3.09-7, with mysql-max-4.1.7-pc-linux-i686 on
Debian, with 2GB RAM, with dual 2.4G Xeon.

Problem:
  In converting mysql tables from TYPE=MyISAM to ENGINE=NDBCUSTER, I
encountered 'CREATE TABLE' errors when a 'default 0' and 'autoincrement'
are set on a column.  I do not get an error if the 'default 0' is
removed from these lines.  It does seem strange to set both
'autoincrement', 'NOT NULL', and 'default 0' on a primary key. 

Questions:
  I would like to know if this change will break Nagios?  
  Shouldn't the release schema be changed?

Error: converting to ndbclusert
  zcat /usr/share/doc/nagios-mysql/create_mysql.sql.gz | \
  sed -e 's/^)\;$/) ENGINE=NDBCLUSTER\;/g' |  mysql -uroot -ppassword nagios

     ERROR 1067 (42000) at line 11: Invalid default value for 'hostcomment_id'

Proposed Fix: remove the 'default 0'
  zcat /usr/share/doc/nagios-mysql/create_mysql.sql.gz | \
  sed -e 's/^)\;$/) ENGINE=NDBCLUSTER\;/g' \
      -e "s/DEFAULT '0' NOT NULL auto_increment/NOT NULL auto_increment/g"


-- 
._____________________.
|   \0/    John Stile |
| UniX Administration |
|   / \  510-305-3800 |     
|     john at stilen.com |
.---------------------.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <https://www.monitoring-lists.org/archive/users/attachments/20041109/cc5ab03b/attachment.sig>


More information about the Users mailing list