mirror of
				https://github.com/MariaDB/server.git
				synced 2025-10-30 04:26:45 +03:00 
			
		
		
		
	- open and create derived tables - detect which tables should be locked for write - lock and fill derived tables some unitialized variables fixed mysql-test/r/lock_multi.result: correct results returned mysql-test/r/multi_update.result: correct results returned mysql-test/r/view.result: correct results returned mysql-test/t/multi_update.test: correct results returned mysql-test/t/view.test: correct results returned sql/mysql_priv.h: derived tables processing splited on table creation and table filling sql/sql_base.cc: derived tables processing splited on table creation and table filling sql/sql_class.h: function to detect when we need fill derived tables sql/sql_derived.cc: derived tables processing splited on table creation and table filling sql/sql_lex.cc: fixed uninitialized value sql/sql_load.cc: fixed uninitialized value sql/sql_parse.cc: initialization muved (will be done for all queries) sql/sql_prepare.cc: preparation of multiupdate changed a bit because new locking procedure sql/sql_update.cc: new lock for multiupdate: - open and create derived tables - detect which tables should be locked for write - lock and fill derived tables sql/table.h: place to store select_result between creation and filling tables
		
			
				
	
	
		
			39 lines
		
	
	
		
			785 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			39 lines
		
	
	
		
			785 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| drop table if exists t1,t2;
 | |
| create table t1(n int);
 | |
| insert into t1 values (1);
 | |
| lock tables t1 write;
 | |
|  update low_priority t1 set n = 4;
 | |
|  select n from t1;
 | |
| unlock tables;
 | |
| n
 | |
| 4
 | |
| drop table t1;
 | |
| create table t1(n int);
 | |
| insert into t1 values (1);
 | |
| lock tables t1 read;
 | |
|  update low_priority t1 set n = 4;
 | |
|  select n from t1;
 | |
| unlock tables;
 | |
| n
 | |
| 1
 | |
| drop table t1;
 | |
| create table t1 (a int, b int);
 | |
| create table t2 (c int, d int);
 | |
| insert into t1 values(1,1);
 | |
| insert into t1 values(2,2);
 | |
| insert into t2 values(1,2);
 | |
| lock table t1 read;
 | |
|  update t1,t2 set c=a where b=d;
 | |
| select c from t2;
 | |
| c
 | |
| 2
 | |
| drop table t1;
 | |
| drop table t2;
 | |
| create table t1 (a int);
 | |
| create table t2 (a int);
 | |
| lock table t1 write, t2 write;
 | |
|  insert t1 select * from t2;
 | |
| drop table t2;
 | |
| ERROR 42S02: Table 'test.t2' doesn't exist
 | |
| drop table t1;
 |