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

numerous issues in MASTER_GTID_WAIT()

    Details

      Description

      class Item_master_gtid_wait :public Item_int_func
      {
        longlong val_int();
        void fix_length_and_dec() { max_length=10+1+10+1+20+1; maybe_null=0;}
      };
       
      longlong Item_master_gtid_wait::val_int()
      {
        if (args[0]->null_value)
        {
          null_value= 1;
          return 0;
        }
        String *gtid_pos = args[0]->val_str(&value);
      }
      

      Few issues here:

      • weird max_length for a integer function that can only ever return -1, 0, 1
      • it promises maybe_null=0 and returns NULL
      • it checks args[0]->null_value before args[0]->val_str()

        Attachments

          Activity

            People

            • Assignee:
              serg Sergei Golubchik
              Reporter:
              serg Sergei Golubchik
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: