403Webshell
Server IP : 172.67.216.182  /  Your IP : 162.158.108.124
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_limit.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

--disable_warnings
DROP TABLE IF EXISTS t2;
--enable_warnings


CREATE TABLE t2 (
  a bigint unsigned NOT NULL PRIMARY KEY,
  b int unsigned not null,
  c int unsigned
) engine=ndbcluster;


#
# insert records into table
#
let $1=1000;
disable_query_log;
while ($1)
{
 eval insert into t2 values($1*10, $1+9, 5*$1), ($1*10+1, $1+10, 7),($1*10+2, $1+10, 7*$1), ($1*10+3, $1+10, 10+$1), ($1*10+4, $1+10, 70*$1), ($1*10+5, $1+10, 7), ($1*10+6, $1+10, 9), ($1*10+7, $1+299, 899), ($1*10+8, $1+10, 12), ($1*10+9, $1+10, 14*$1);
 dec $1;
}
enable_query_log;

select count(*) from t2;

delete from t2 limit 1;
select count(*) from t2;

delete from t2 limit 100;
select count(*) from t2;

delete from t2 limit 1000;
select count(*) from t2;

update t2 set c=12345678 limit 100;
select count(*) from t2 where c=12345678;
select count(*) from t2 where c=12345678 limit 1000;

select * from t2 limit 0;

drop table t2;

CREATE TABLE `t2` (
  `views` int(11) NOT NULL default '0',
  `clicks` int(11) NOT NULL default '0',
  `day` date NOT NULL,
  `hour` tinyint(4) NOT NULL default '0',
  `bannerid` smallint(6) NOT NULL default '0',
  `zoneid` smallint(6) NOT NULL default '0',
  `source` varchar(50) NOT NULL default '',
  PRIMARY KEY  (`day`,`hour`,`bannerid`,`zoneid`,`source`),
  KEY `bannerid_day` (`bannerid`,`day`),
  KEY `zoneid` (`zoneid`)
) ENGINE=ndbcluster DEFAULT CHARSET=latin1;

INSERT INTO `t2` VALUES
(  1,0,'2004-09-17', 5,100,100,''),
(  1,0,'2004-09-18', 7,100,100,''),
( 17,0,'2004-09-27',20,132,100,''),
(  4,0,'2004-09-16',23,132,100,''),
( 86,0,'2004-09-18', 7,196,196,''),
( 11,0,'2004-09-16',16,132,100,''),
(140,0,'2004-09-18', 0,100,164,''),
(  2,0,'2004-09-17', 7,132,100,''),
(846,0,'2004-09-27',11,132,164,''),
(  1,0,'2004-09-18', 8,132,100,''),
( 22,0,'2004-09-27', 9,164,132,''),
(711,0,'2004-09-27', 9,100,164,''),
( 11,0,'2004-09-18', 0,196,132,''),
( 41,0,'2004-09-27',15,196,132,''),
( 57,0,'2004-09-18', 2,164,196,'');

SELECT DATE_FORMAT(day, '%Y%m%d') as date, DATE_FORMAT(day, '%d-%m-%Y')
as date_formatted FROM t2 GROUP BY day ORDER BY day DESC;

SELECT DATE_FORMAT(day, '%Y%m%d') as date, DATE_FORMAT(day, '%d-%m-%Y')
as date_formatted FROM t2 GROUP BY day ORDER BY day DESC LIMIT 2;

drop table t2;

# End of 4.1 tests

Youez - 2016 - github.com/yon3zu
LinuXploit