
grant create on my_schema1.* to 'someuser'@'localhost';
grant create temporary tables on radius.* to 'someuser'@'localhost';
grant file on *.* to 'someuser'@'localhost';
-- grant by user radius
grant
	select
	,update
	,delete
	,insert
on
	radusergroup
to
	'someuser'@'localhost';
-- DDL
create temporary table table_a(
	x1 varchar(64) not null
	,x2 varchar(64) not null
	,key myip (x1(32))
) engine=memory;
-- LOAD
use my_schema1;
load data infile '/tmp/sometable.txt'
	into table table_a
	fields terminated by ' '
	optionally enclosed by '"'
	escaped by '\\'
	lines terminated by '\n';
commit;
start transaction;
update
	table_b
set
	y1 = y1 + 1
where
	(x1, x2)
in 	(
	select
		x1
		,x2
	from
		table_a);
insert into table_b(x1, x2)
	(
	select
		x1
		,x2
	from
		table_a
	where
		(x1, x2)
	not in
		(
		select
			x1
			,x2
		from
			table_b
		)
	);
commit;
