mirror of
				https://github.com/MariaDB/server.git
				synced 2025-10-28 17:15:19 +03:00 
			
		
		
		
	Added test file for ALTER TABLE, engine = ndbcluster sql/ha_ndbcluster.cc: Add code to retriev all fields if HA_EXTRA_RETRIEVE_ALL_COLS are set. sql/ha_ndbcluster.h: Add var for retreiving all fields sql/sql_table.cc: Send HA_EXTRA_RETRIEVE_ALL_COLS to handler in copy_data_between_tables
		
			
				
	
	
		
			30 lines
		
	
	
		
			904 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			30 lines
		
	
	
		
			904 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| DROP TABLE IF EXISTS t1;
 | |
| CREATE TABLE t1 (
 | |
| a INT NOT NULL,
 | |
| b INT NOT NULL
 | |
| ) ENGINE=ndbcluster;
 | |
| INSERT INTO t1 VALUES (9410,9412);
 | |
| ALTER TABLE t1 ADD COLUMN c int not null;
 | |
| SELECT * FROM t1;
 | |
| a	b	c
 | |
| 9410	9412	0
 | |
| DROP TABLE t1;
 | |
| create table t1 (
 | |
| col1 int not null auto_increment primary key,
 | |
| col2 varchar(30) not null,
 | |
| col3 varchar (20) not null,
 | |
| col4 varchar(4) not null,
 | |
| col5 enum('PENDING', 'ACTIVE', 'DISABLED') not null,
 | |
| col6 int not null, to_be_deleted int);
 | |
| insert into t1 values (2,4,3,5,"PENDING",1,7);
 | |
| alter table t1
 | |
| add column col4_5 varchar(20) not null after col4,
 | |
| add column col7 varchar(30) not null after col5,
 | |
| add column col8 datetime not null, drop column to_be_deleted,
 | |
| change column col2 fourth varchar(30) not null after col3,
 | |
| modify column col6 int not null first;
 | |
| select * from t1;
 | |
| col6	col1	col3	fourth	col4	col4_5	col5	col7	col8
 | |
| 1	2	3	4	5		PENDING		0000-00-00 00:00:00
 | |
| drop table t1;
 |