mirror of
				https://github.com/MariaDB/server.git
				synced 2025-11-03 14:33:32 +03:00 
			
		
		
		
	MDEV-11 - Modifed tests and result files to use explicit column lists
          in INSERT and SELECT statements
		
	
		
			
				
	
	
		
			82 lines
		
	
	
		
			2.0 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			82 lines
		
	
	
		
			2.0 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
# 
 | 
						|
# This test checks some very basic capabilities
 | 
						|
# which will be used in almost every other test,
 | 
						|
# and will not be checked through support* variables.
 | 
						|
# If this test does not pass, there is no point
 | 
						|
# at executing other ones.
 | 
						|
#
 | 
						|
# Minimal requirements:
 | 
						|
# - supported column types: INT, CHAR (default CHAR(8), INT(11));
 | 
						|
# - column attributes as declared in define_engine.inc ($default_col_opts)
 | 
						|
#     (by default empty, which means no additional attributes apart from the type);
 | 
						|
# - table attributes as declared in define_engine.inc ($default_tbl_opts)
 | 
						|
#     (by default empty, which means no additional attributes apart from ENGINE);
 | 
						|
# - CREATE TABLE .. (column1 <column options>, column2 <column options>) ENGINE=<storage_engine>;
 | 
						|
# - INSERT INTO TABLE .. VALUES (val1,val2);
 | 
						|
# - DROP TABLE ..
 | 
						|
# - SELECT a,b FROM ..
 | 
						|
# - SHOW CREATE TABLE ..
 | 
						|
# - SHOW COLUMNS IN ...
 | 
						|
#
 | 
						|
 | 
						|
--source have_engine.inc
 | 
						|
 | 
						|
--disable_warnings
 | 
						|
DROP TABLE IF EXISTS t1;
 | 
						|
--enable_warnings
 | 
						|
 | 
						|
--source create_table.inc
 | 
						|
if ($mysql_errname)
 | 
						|
{
 | 
						|
  --let $functionality = CREATE TABLE
 | 
						|
  --source unexpected_result.inc
 | 
						|
}
 | 
						|
if (!$mysql_errname)
 | 
						|
{
 | 
						|
  --disable_result_log
 | 
						|
  SHOW CREATE TABLE t1;
 | 
						|
  if ($mysql_errname)
 | 
						|
  {
 | 
						|
    --let $functionality = SHOW CREATE TABLE
 | 
						|
    --source unexpected_result.inc
 | 
						|
  }
 | 
						|
  SHOW COLUMNS IN t1;
 | 
						|
  if ($mysql_errname)
 | 
						|
  {
 | 
						|
    --let $functionality = SHOW COLUMNS
 | 
						|
    --source unexpected_result.inc
 | 
						|
  }
 | 
						|
  --enable_result_log
 | 
						|
 | 
						|
  INSERT INTO t1 VALUES (1,'a');
 | 
						|
  if ($mysql_errname)
 | 
						|
  {
 | 
						|
    --let $functionality = INSERT INTO .. VALUES
 | 
						|
    --source unexpected_result.inc
 | 
						|
  }
 | 
						|
 | 
						|
  INSERT INTO t1 (a,b) VALUES (2,'b');
 | 
						|
  if ($mysql_errname)
 | 
						|
  {
 | 
						|
    --let $functionality = INSERT INTO .. (column_list) VALUES
 | 
						|
    --source unexpected_result.inc
 | 
						|
  }
 | 
						|
 | 
						|
  SELECT a,b FROM t1;
 | 
						|
  if ($mysql_errname)
 | 
						|
  {
 | 
						|
    --let $functionality = SELECT a,b FROM ..
 | 
						|
    --source unexpected_result.inc
 | 
						|
  }
 | 
						|
 | 
						|
  DROP TABLE t1;
 | 
						|
  if ($mysql_errname)
 | 
						|
  {
 | 
						|
    --let $functionality = DROP TABLE
 | 
						|
    --source unexpected_result.inc
 | 
						|
  }
 | 
						|
 | 
						|
}
 | 
						|
--source cleanup_engine.inc
 | 
						|
 |