- Properties of $\{x\in X\mid f(x)=||f||\}$
- Why do we need sub-gradient methods for non-differentiable functions?
- For any prime number $p$, let $A_p$ be the set of integers $d\in \{1,2,\dots, 999\}$ s. Then what is the cardinality of $A_p$?
- Order of convergence of false position method is the golden ratio.
- Are vectors in classical mechanics really tensors?
- Why does such $M$ exist in this proof for Skorohod representation theorem?
- A Euclidean-like property for partially-ordered magmas
- Example 20.10 Fitzpatrick's Advanced Calculus
- How can I see how well 'shuffled' a group of elements in a sequence are?
- Is this proof of Cauchy about limits valid?
- Is it guaranteed that a linear programming problem has a unique solution?
- Performance increase claculation
- Solve $\min_{\mathbf{x},\mathbf{R},\mathbf{\lambda}}\left\|\mathbf{y}-\mathbf{x}\right\|_{\mathbf{R}}^2+\mathbf{\lambda}^T\mathbf{A}\mathbf{
- Rudin theorem 5.19, MVT for vector function
- On the Definition of the Derivative
- Convergence both in $L^p$ and $L^q$
- Polynomial cannot have all roots real?
- How do I find the set of functions that would make this non-linear operator diverge?
- If $X$ has more than one element, then the norm $||f||=\sup_{x\in X}|f(x)|$ don't come from a inner product
- $X$ and $Y$ independent and uniform on $[0,1]$. Find PDF of $X+Y$.

# MySQL FOREIGN KEY constraint is incorrectly formed

I have the following table definition:

CREATE TABLE `async_task` (

`idasync_task` bigint(20) unsigned NOT NULL AUTO_INCREMENT,

`idasync_type` int(10) unsigned NOT NULL,

`priority` tinyint(3) NOT NULL,

`status` enum('todo','doing','failed') NOT NULL DEFAULT 'todo',

`iduser` int(11) NOT NULL,

`date_added` datetime NOT NULL,

PRIMARY KEY (`idasync_task`),

KEY `priority_id` (`priority`,`idasync_task`),

KEY `status_type` (`status`,`idasync_type`)

) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;

I've added a column to the my notification table which I want to point to async_task:

ALTER TABLE `notification` ADD COLUMN `async_task_id` BIGINT(20)

And when I add the following foreign key:

ALTER TABLE `notification` ADD CONSTRAINT `fk_notification_async_task`

FOREIGN KEY (`async_task_id`) REFERENCES `async_task`(`idasync_task`);

I get:

ERROR 1005 (HY000): Can't create table `my_database`.`#sql-182_2d`

(errno: 150 "Foreign key constraint is inco