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

A connection can control RAND() in following connection

    XMLWordPrintable

Details

    Description

      show variables like 'thread_cache_size';
      --connect foo,localhost,root
      set rand_seed1=0, rand_seed2=0;
      create table t1 (id int auto_increment key, b double);
      --disable_query_log
      --let $a=30
      --while ($a) {
        insert t1 (b) values (rand());
        --dec $a
      }
      --enable_query_log
      set rand_seed1=0, rand_seed2=0;
      --disconnect foo
      --connect bar,localhost,root
      set @a=rand();
      select * from t1 where b = @a;
      drop table t1;
      --disconnect bar
      

      this always prints

      id      b
      21      0.5129564902865854
      

      Attachments

        Activity

          People

            serg Sergei Golubchik
            serg Sergei Golubchik
            Votes:
            0 Vote for this issue
            Watchers:
            3 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.