Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-15078

Bug with virtual field

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 10.2.6, 10.2.11
    • 10.2.12
    • Virtual Columns
    • None
    • Windows 7

    Description

      if add more conditions in select i have null in virtual field

      CREATE TABLE stocks (
        codeart VARCHAR(20) DEFAULT '',
        num_lot VARCHAR(20) DEFAULT '',
        depot VARCHAR(20) DEFAULT '',
        qte_init DOUBLE DEFAULT 0,
        qte DOUBLE DEFAULT 0,
        cmdclient DOUBLE DEFAULT 0,
        qte_verr DOUBLE DEFAULT 0,
        cmdfour DOUBLE DEFAULT 0,
        rebut DOUBLE DEFAULT 0,
        recycl DOUBLE DEFAULT 0,
        qte_fac_init DOUBLE DEFAULT 0,
        qte_fac DOUBLE DEFAULT 0,
        ug DOUBLE DEFAULT 0,
        pmp_init DOUBLE DEFAULT 0,
        pmp DOUBLE DEFAULT 0,
        pmp_rebut DOUBLE DEFAULT 0,
        pmp_recycl DOUBLE DEFAULT 0,
        valstock DOUBLE AS (`qte` * `pmp`) VIRTUAL,
        valstock_rebut DOUBLE AS (`rebut` * `pmp_rebut`) VIRTUAL,
        valstock_recycl DOUBLE AS (`stocks`.`recycl` * `pmp_recycl`) VIRTUAL,
        qte_dispo DOUBLE AS (`qte` - `cmdclient`) VIRTUAL,
        INDEX IDX_stocks_codeart (codeart),
        INDEX IDX_stocks_depot (depot),
        INDEX IDX_stocks_num_lot (num_lot),
        UNIQUE INDEX UK_stocks (codeart, num_lot, depot)
      )
      ENGINE = INNODB
      AVG_ROW_LENGTH = 655
      CHARACTER SET utf8
      COLLATE utf8_unicode_ci
      ROW_FORMAT = DYNAMIC;
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            cirtasoft BENLAGHA
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.