Ad Widget

Collapse

Update 1.1.6 to 1.4.2 _ mysql update problems

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • stkr
    Junior Member
    • Feb 2007
    • 18

    #1

    Update 1.1.6 to 1.4.2 _ mysql update problems

    Hello,

    I try to update zabbix from 1.1.6 to 1.4.2.
    I habe installed the new version. Now I want to upgrade the mysql database.

    But there are mistakes.

    - "Table action_tmp already exists"
    - "Table operations already exists"

    I read that you can drop this tables. So I did this. But now there is a problem that I found in another thread here:

    When I apply /upgrades/dbpatches/1.4/mysql/patch.sql from 1.3.6 or 1.3.7 distribution it show this error:
    ERROR 1054 (42S22) at line 38: Unknown column 'source' in 'field list'

    This line is:
    insert into actions_tmp select actionid,actionid,source,0,status from actions;

    Column 'source' is missing in actions_tmp and actions.
    I have the same message. Is there a patch for this? How can I fix it?

    Regards
    stkr
  • Alexei
    Founder, CEO
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • Sep 2004
    • 5654

    #2
    Originally posted by stkr
    But there are mistakes.

    - "Table action_tmp already exists"
    - "Table operations already exists"
    The upgrade script is not supposed to work with non-standard ZABBIX database schema. There are no tables action_tmp and operations in original 1.1.x database schema.
    Alexei Vladishev
    Creator of Zabbix, Product manager
    New York | Tokyo | Riga
    My Twitter

    Comment

    • stkr
      Junior Member
      • Feb 2007
      • 18

      #3
      Hi Alexei,

      I think there is a misunderstanding, so I`ll try to explain.

      After i make the install of the new 1.4.2 Zabbix version, I use this syntax to upgrade the database.

      Shell> mysql --user=xxxx -p < patch.sql

      Then there was an error message, that there is a wrong syntax in SQL Script with the word "serial" ... So I search for this in the forum and find the solution, that this should be replace with "bigint unsigned EFAULT '0' NOT NULL" ..

      After this change, I`ll try to patch the database again. NOW the message from my previous post take effect.

      In the patch.sql of 1.4.2 there is a "Create Table" for the tables "actions_tmp" and "operations", so I think these tables are created before the "serial" - error code was triggered.

      So I think I must drop these tables, so that the patch.sql could be effect now. But then the following message is triggered:

      ERROR 1054 (42S22) at line 38: Unknown column 'source' in 'field list'

      This line is:
      insert into actions_tmp select actionid,actionid,source,0,status from actions;

      Column 'source' is missing in actions_tmp and actions.
      When you say that the tables actions_tmp and operations are non-standard of zabbix - why you create this tables in the upgrade patch.sql?
      When these new tables are correct - then there is a mistake in the insert lines, like:

      insert into actions_tmp select actionid,actionid,source,0,status from actions;

      or

      insert into operations select actionid,actionid,actiontype,recipient,userid,subj ect,message,scripts from actions;

      because in actions_tmp and operations there isn“t a column source or actiontype.

      The attachment shows the patch.sql from the upgrades/1.4/mysql -folder

      So what I must change to upgrade my database.

      Thanks for help
      Best Regards

      stkr
      Attached Files

      Comment

      • Alexei
        Founder, CEO
        Zabbix Certified Trainer
        Zabbix Certified SpecialistZabbix Certified Professional
        • Sep 2004
        • 5654

        #4
        Originally posted by stkr
        After this change, I`ll try to patch the database again. NOW the message from my previous post take effect.
        The patch does not support multiple executions.
        Originally posted by stkr
        When you say that the tables actions_tmp and operations are non-standard of zabbix - why you create this tables in the upgrade patch.sql?
        I mean non-standard for ZABBIX 1.1.x.
        Alexei Vladishev
        Creator of Zabbix, Product manager
        New York | Tokyo | Riga
        My Twitter

        Comment

        Working...