403Webshell
Server IP : 172.67.216.182  /  Your IP : 172.70.208.74
Web Server : Apache
System : Linux krdc-ubuntu-s-2vcpu-4gb-amd-blr1-01.localdomain 5.15.0-142-generic #152-Ubuntu SMP Mon May 19 10:54:31 UTC 2025 x86_64
User : www ( 1000)
PHP Version : 7.4.33
Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /www/server/mysql/src/mysql-test/suite/ndb/t/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /www/server/mysql/src/mysql-test/suite/ndb/t/ndb_autoinc.test
# The include statement below is a temp one for tests that are yet to
#be ported to run with InnoDB,
#but needs to be kept for tests that would need MyISAM in future.
--source include/force_myisam_default.inc

-- source include/have_ndb.inc
-- source include/not_embedded.inc

--disable_warnings
DROP TABLE IF EXISTS t1,t2,t3;
--enable_warnings

USE test;

CREATE TABLE t1 (
  id INT AUTO_INCREMENT,
  PRIMARY KEY(id)
) ENGINE=NDBCLUSTER;

# Test For bug#30417
--error 1296

CREATE TABLE t2 (
  id INT AUTO_INCREMENT,
  KEY(id)
) ENGINE=NDBCLUSTER;

SHOW TABLES;

CREATE TABLE t3 (
  id INT AUTO_INCREMENT,
  KEY(id)
) ENGINE=MYISAM;

--error 1296
ALTER TABLE t3
ENGINE NDBCLUSTER;

SHOW CREATE TABLE t3;

ALTER TABLE t3
ADD PRIMARY KEY (id);

SHOW CREATE TABLE t3;

DROP TABLE t1, t3;

--echo End of 5.1 tests


set @@auto_increment_increment=4;
set @@auto_increment_offset=1;
set @@ndb_autoincrement_prefetch_sz=2;
create table t1 (a int unsigned not null primary key auto_increment)
engine ndb;
insert into t1 values ();
insert into t1 values (2);
insert into t1 values ();
insert into t1 values ();
select * from t1 order by a;
drop table t1;



set @@auto_increment_increment=2;
set @@auto_increment_offset=1;

--echo First look at default SE behaviour on manual insert unaligned with
--echo offset + step

create table t1 (a int unsigned not null primary key auto_increment);
show variables like 'LAST_INSERT_ID';
insert into t1 values();
show variables like 'LAST_INSERT_ID';
insert into t1 values(18);
show variables like 'LAST_INSERT_ID';
insert into t1 values();
show variables like 'LAST_INSERT_ID';
insert into t1 values();
show variables like 'LAST_INSERT_ID';
insert into t1 values();
show variables like 'LAST_INSERT_ID';
insert into t1 values(22);
show variables like 'LAST_INSERT_ID';
insert into t1 values();
show variables like 'LAST_INSERT_ID';
insert into t1 values(28);
show variables like 'LAST_INSERT_ID';
insert into t1 values();
show variables like 'LAST_INSERT_ID';
insert into t1 values();
show variables like 'LAST_INSERT_ID';
select * from t1 order by a;
drop table t1;

Youez - 2016 - github.com/yon3zu
LinuXploit