AnonSec Shell
Server IP : 185.86.78.101  /  Your IP : 216.73.216.213
Web Server : Apache
System : Linux 675867-vds-valikoshka1996.gmhost.pp.ua 5.4.0-150-generic #167-Ubuntu SMP Mon May 15 17:35:05 UTC 2023 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 : OFF
Directory :  /www/server/mysql/mysql-test/r/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     

Current File : /www/server/mysql/mysql-test/r/csv_not_null.result
# ===== csv_not_null.1 =====
DROP TABLE IF EXISTS t1, t2;
# === Will fail -- no NOT NULL ===
CREATE TABLE t1 (a int) ENGINE = CSV;
ERROR 42000: The storage engine for the table doesn't support nullable columns
# === Good CREATE ===
CREATE TABLE t1 (a int NOT NULL) ENGINE = CSV;
# === Will fail -- ALL columns need NOT NULL ==
CREATE TABLE t2 (a int NOT NULL, b char(20)) ENGINE = CSV;
ERROR 42000: The storage engine for the table doesn't support nullable columns
DROP TABLE t1;
# ===== csv_not_null.2 =====
DROP TABLE IF EXISTS t1;
SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
Warnings:
Warning	3090	Changing sql mode 'NO_AUTO_CREATE_USER' is deprecated. It will be removed in a future release.
CREATE TABLE t1 (a int NOT NULL, b blob NOT NULL, c CHAR(20) NOT NULL, 
d VARCHAR(20) NOT NULL, e enum('foo','bar') NOT NULL,f DATE NOT NULL) 
ENGINE = CSV;
# === should result in default for each datatype ===
INSERT INTO t1 VALUES();
SELECT * FROM t1;
a	b	c	d	e	f
0				foo	0000-00-00
INSERT INTO t1 VALUES(default,default,default,default,default,default);
SELECT * FROM t1;
a	b	c	d	e	f
0				foo	0000-00-00
0				foo	0000-00-00
INSERT INTO t1 VALUES(0,'abc','def','ghi','bar','1999-12-31');
SELECT * FROM t1;
a	b	c	d	e	f
0				foo	0000-00-00
0				foo	0000-00-00
0	abc	def	ghi	bar	1999-12-31
# === insert failures ===
INSERT INTO t1 VALUES(NULL,'ab','a','b','foo','2007-01-01');
ERROR 23000: Column 'a' cannot be null
INSERT INTO t1 VALUES(default(a),default(b), default(c), default(d),
default(e), default(f));
ERROR HY000: Field 'a' doesn't have a default value
DROP TABLE t1;
# ===== csv_not_null.3 =====
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (a int NOT NULL, b char(10) NOT NULL) ENGINE = CSV;
INSERT INTO t1 VALUES();
SELECT * FROM t1;
a	b
0	
UPDATE t1 set b = 'new_value' where a = 0;
SELECT * FROM t1;
a	b
0	new_value
UPDATE t1 set b = NULL where b = 'new_value';
Warnings:
Warning	1048	Column 'b' cannot be null
SELECT * FROM t1;
a	b
0	
DROP TABLE t1;
SET sql_mode = default;

Anon7 - 2022
AnonSec Team